Browse Source

Rebuilt version 3.3. Reason: Fixed buffer overrun bug in CodeDweller/configuration.cpp.

git-svn-id: https://svn.microneil.com/svn/PKG-SNF-SDK-WIN/trunk@29 7d91e7c8-5a61-404e-b06a-95855fde9112
master
adeniz 8 years ago
parent
commit
6c6c5937dc

BIN
32bitDll/snfmulti.dll View File


BIN
32bitDll/vs2008_snfmulti.exp View File


BIN
32bitDll/vs2008_snfmulti.lib View File


BIN
64bitDll/snfmulti.dll View File


BIN
64bitDll/vs2008_snfmulti.exp View File


BIN
64bitDll/vs2008_snfmulti.lib View File


+ 4
- 4
CSSample/main.cs View File

#region DLL Imports #region DLL Imports
// Location of SNFMulti.dll. // Location of SNFMulti.dll.
//const string SNFMULTI_DLL = "..\\..\\..\\64bitDll\\SNFMulti.dll"; // Set CPU type to "Any CPU"
const string SNFMULTI_DLL = "..\\..\\..\\64bitDll\\SNFMulti.dll"; // Set CPU type to "Any CPU"
//const string SNFMULTI_DLL = "..\\..\\..\\..\\64bitDll\\SNFMulti.dll"; // Set CPU type to "x64 //const string SNFMULTI_DLL = "..\\..\\..\\..\\64bitDll\\SNFMulti.dll"; // Set CPU type to "x64
const string SNFMULTI_DLL = "..\\..\\..\\..\\32bitDll\\SNFMulti.dll"; // Set CPU type to "x86"
//const string SNFMULTI_DLL = "..\\..\\..\\..\\32bitDll\\SNFMulti.dll"; // Set CPU type to "x86"
// int setThrottle(int Threads); /* Set scan thread limit. */ // int setThrottle(int Threads); /* Set scan thread limit. */
[DllImport(SNFMULTI_DLL, CharSet = CharSet.Auto, EntryPoint = "setThrottle", CallingConvention = CallingConvention.Winapi)] [DllImport(SNFMULTI_DLL, CharSet = CharSet.Auto, EntryPoint = "setThrottle", CallingConvention = CallingConvention.Winapi)]
// const string LicenseID = "licensid"; // SNF License ID can be passed // const string LicenseID = "licensid"; // SNF License ID can be passed
// const string Authentication = "authenticationxx"; // directly or read from the // const string Authentication = "authenticationxx"; // directly or read from the
// configuration. OEMs go direct! // configuration. OEMs go direct!
//const string ConfigurationPath = "..\\..\\snf_engine.xml"; // For "Any CPU" platform.
const string ConfigurationPath = "..\\..\\..\\snf_engine.xml"; // For "x86" or "x64" platforms.
const string ConfigurationPath = "..\\..\\snf_engine.xml"; // For "Any CPU" platform.
//const string ConfigurationPath = "..\\..\\..\\snf_engine.xml"; // For "x86" or "x64" platforms.
const uint IPToTest = 0x0c22384e; // Same as IP 12.34.56.78 const uint IPToTest = 0x0c22384e; // Same as IP 12.34.56.78

BIN
SNFMultiSDK_Windows_3.3.zip View File


BIN
SNFMultiSDK_Windows_3.3/32bitDll/snfmulti.dll View File


BIN
SNFMultiSDK_Windows_3.3/32bitDll/vs2008_snfmulti.exp View File


BIN
SNFMultiSDK_Windows_3.3/32bitDll/vs2008_snfmulti.lib View File


BIN
SNFMultiSDK_Windows_3.3/64bitDll/snfmulti.dll View File


BIN
SNFMultiSDK_Windows_3.3/64bitDll/vs2008_snfmulti.exp View File


BIN
SNFMultiSDK_Windows_3.3/64bitDll/vs2008_snfmulti.lib View File


+ 4
- 4
SNFMultiSDK_Windows_3.3/CSSample/main.cs View File

#region DLL Imports #region DLL Imports
// Location of SNFMulti.dll. // Location of SNFMulti.dll.
//const string SNFMULTI_DLL = "..\\..\\..\\64bitDll\\SNFMulti.dll"; // Set CPU type to "Any CPU"
const string SNFMULTI_DLL = "..\\..\\..\\64bitDll\\SNFMulti.dll"; // Set CPU type to "Any CPU"
//const string SNFMULTI_DLL = "..\\..\\..\\..\\64bitDll\\SNFMulti.dll"; // Set CPU type to "x64 //const string SNFMULTI_DLL = "..\\..\\..\\..\\64bitDll\\SNFMulti.dll"; // Set CPU type to "x64
const string SNFMULTI_DLL = "..\\..\\..\\..\\32bitDll\\SNFMulti.dll"; // Set CPU type to "x86"
//const string SNFMULTI_DLL = "..\\..\\..\\..\\32bitDll\\SNFMulti.dll"; // Set CPU type to "x86"
// int setThrottle(int Threads); /* Set scan thread limit. */ // int setThrottle(int Threads); /* Set scan thread limit. */
[DllImport(SNFMULTI_DLL, CharSet = CharSet.Auto, EntryPoint = "setThrottle", CallingConvention = CallingConvention.Winapi)] [DllImport(SNFMULTI_DLL, CharSet = CharSet.Auto, EntryPoint = "setThrottle", CallingConvention = CallingConvention.Winapi)]
// const string LicenseID = "licensid"; // SNF License ID can be passed // const string LicenseID = "licensid"; // SNF License ID can be passed
// const string Authentication = "authenticationxx"; // directly or read from the // const string Authentication = "authenticationxx"; // directly or read from the
// configuration. OEMs go direct! // configuration. OEMs go direct!
//const string ConfigurationPath = "..\\..\\snf_engine.xml"; // For "Any CPU" platform.
const string ConfigurationPath = "..\\..\\..\\snf_engine.xml"; // For "x86" or "x64" platforms.
const string ConfigurationPath = "..\\..\\snf_engine.xml"; // For "Any CPU" platform.
//const string ConfigurationPath = "..\\..\\..\\snf_engine.xml"; // For "x86" or "x64" platforms.
const uint IPToTest = 0x0c22384e; // Same as IP 12.34.56.78 const uint IPToTest = 0x0c22384e; // Same as IP 12.34.56.78

+ 6
- 4
SNFMultiSDK_Windows_3.3/CodeDweller/configuration.cpp View File

) { // then translate the content! ) { // then translate the content!
// Create the Content buffer... // Create the Content buffer...


int BfrSize = Stopdex - Startdex; // How big a buffer do we need?
char Bfr[BfrSize]; // Make one that size.
int BfrSize = Stopdex - Startdex +1; // How big a buffer do we need?
vector<char> heapBfr(BfrSize,0); // Make one that size.
char* Bfr = &heapBfr[0];


copyDataCountLines(Bfr, Data, Startdex, Stopdex); // Get our data and ignore our lines. copyDataCountLines(Bfr, Data, Startdex, Stopdex); // Get our data and ignore our lines.




// Read our data. // Read our data.


int BfrSize = Stopdex - Startdex; // How big a buffer do we need?
char Bfr[BfrSize]; // Make one that size.
int BfrSize = Stopdex - Startdex +1; // How big a buffer do we need?
vector<char> heapBfr(BfrSize,0); // Make one that size.
char* Bfr = &heapBfr[0];


NewLines += copyDataCountLines(Bfr, Data, Startdex, Stopdex); // Get our data and count our lines. NewLines += copyDataCountLines(Bfr, Data, Startdex, Stopdex); // Get our data and count our lines.



+ 1
- 0
SNFMultiSDK_Windows_3.3/CodeDweller/configuration.hpp View File

#define configuration_included #define configuration_included


#include <string> #include <string>
#include <vector>
#include <sstream> #include <sstream>
#include <fstream> #include <fstream>
#include <cstring> #include <cstring>

Loading…
Cancel
Save