소스 검색

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 년 전
부모
커밋
6c6c5937dc

BIN
32bitDll/snfmulti.dll 파일 보기


BIN
32bitDll/vs2008_snfmulti.exp 파일 보기


BIN
32bitDll/vs2008_snfmulti.lib 파일 보기


BIN
64bitDll/snfmulti.dll 파일 보기


BIN
64bitDll/vs2008_snfmulti.exp 파일 보기


BIN
64bitDll/vs2008_snfmulti.lib 파일 보기


+ 4
- 4
CSSample/main.cs 파일 보기

@@ -19,9 +19,9 @@ namespace SNFMultiDLLExampleCsharp
#region DLL Imports
// 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 = "..\\..\\..\\..\\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. */
[DllImport(SNFMULTI_DLL, CharSet = CharSet.Auto, EntryPoint = "setThrottle", CallingConvention = CallingConvention.Winapi)]
@@ -100,8 +100,8 @@ namespace SNFMultiDLLExampleCsharp
// const string LicenseID = "licensid"; // SNF License ID can be passed
// const string Authentication = "authenticationxx"; // directly or read from the
// 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

BIN
SNFMultiSDK_Windows_3.3.zip 파일 보기


BIN
SNFMultiSDK_Windows_3.3/32bitDll/snfmulti.dll 파일 보기


BIN
SNFMultiSDK_Windows_3.3/32bitDll/vs2008_snfmulti.exp 파일 보기


BIN
SNFMultiSDK_Windows_3.3/32bitDll/vs2008_snfmulti.lib 파일 보기


BIN
SNFMultiSDK_Windows_3.3/64bitDll/snfmulti.dll 파일 보기


BIN
SNFMultiSDK_Windows_3.3/64bitDll/vs2008_snfmulti.exp 파일 보기


BIN
SNFMultiSDK_Windows_3.3/64bitDll/vs2008_snfmulti.lib 파일 보기


+ 4
- 4
SNFMultiSDK_Windows_3.3/CSSample/main.cs 파일 보기

@@ -19,9 +19,9 @@ namespace SNFMultiDLLExampleCsharp
#region DLL Imports
// 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 = "..\\..\\..\\..\\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. */
[DllImport(SNFMULTI_DLL, CharSet = CharSet.Auto, EntryPoint = "setThrottle", CallingConvention = CallingConvention.Winapi)]
@@ -100,8 +100,8 @@ namespace SNFMultiDLLExampleCsharp
// const string LicenseID = "licensid"; // SNF License ID can be passed
// const string Authentication = "authenticationxx"; // directly or read from the
// 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

+ 6
- 4
SNFMultiSDK_Windows_3.3/CodeDweller/configuration.cpp 파일 보기

@@ -905,8 +905,9 @@ bool ConfigurationElement::interpret(ConfigurationData& Data) {
) { // then translate the content!
// 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.

@@ -1097,8 +1098,9 @@ bool ConfigurationAttribute::interpret(ConfigurationData& 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.


+ 1
- 0
SNFMultiSDK_Windows_3.3/CodeDweller/configuration.hpp 파일 보기

@@ -109,6 +109,7 @@
#define configuration_included

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

Loading…
취소
저장