Bladeren bron

Using MinGW-W64 8.1.0 (posix-seh) compiled 32- and 64-bit SNFMulti/CodeDweller,

and built 64-bit DLL.
master
adeniz 4 jaren geleden
bovenliggende
commit
9ea58fb9c2

+ 4
- 2
MinGW-32/buildSNFMultiDLL.cmd Bestand weergeven

@@ -1,7 +1,9 @@
setlocal
del snfmulti.dll snfmulti.def libsnfmulti.a
set path=c:\MinGW\bin;%path%
REM set path=c:\MinGW\bin;%path%
set path=c:\Program Files\MinGW-W64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%path%
set CXX=c++
set LIB=c:\MinGW\lib\libws2_32.a -loleaut32
REM set LIB=c:\MinGW\lib\libws2_32.a -loleaut32
set LIB="c:\Program Files\MinGW-W64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\x86_64-w64-mingw32\lib\libws2_32.a" -loleaut32
set LDFLAGS=-Wl,--output-def=snfmulti.def -Wl,--out-implib=libsnfmulti.a -Wl,-dll
%CXX% -shared -o snfmulti.dll %LDFLAGS% snfmultidll.o FilterChain.o GBUdb.o mangler.o scanner.o snfCFGmgr.o snf_engine.o snfGBUdbmgr.o snf_HeaderFinder.o snfLOGmgr.o SNFMulti.o snfNETmgr.o snf_sync.o snf_xci.o snfXCImgr.o base64codec.o configuration.o networking.o threading.o timing.o %LIB%

+ 3
- 1
MinGW-32/compileSNFMultiDLL.cmd Bestand weergeven

@@ -1,5 +1,7 @@
setlocal
set path=c:\MinGW\bin;%path%
REM set path=c:\MinGW\bin;%path%
set path=c:\Program Files\MinGW-W64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%path%
REM set path=c:\Program Files\MinGW-W64\x86_64-8.1.0-win32-seh-rt_v6-rev0\mingw64\bin;%path%
set CXX=c++
set CXXFLAGS=-I../CodeDweller -I../SNFMulti -mthreads -O3 -m32 -D_USE_32BIT_TIME_T
del *.o

+ 9
- 3
MinGW-64/buildSNFMultiDLL.cmd Bestand weergeven

@@ -1,6 +1,12 @@
setlocal
del snfmulti.dll snfmulti.def libsnfmulti.a
set path=c:\MinGW-64\bin;%path%
set CXX=x86_64-pc-mingw32-c++
set LIB=c:\MinGW-64\x86_64-pc-mingw32\lib64\libws2_32.a -loleaut32
REM set path=c:\MinGW-64\bin;%path%
REM set CXX=x86_64-pc-mingw32-c++
REM set LIB=c:\MinGW-64\x86_64-pc-mingw32\lib64\libws2_32.a -loleaut32
set path=c:\Program Files\MinGW-W64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%path%
set CXX=c++
set LIB="c:\Program Files\MinGW-W64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\x86_64-w64-mingw32\lib\libws2_32.a" -loleaut32
set LDFLAGS=-Wl,--output-def=snfmulti.def -Wl,--out-implib=libsnfmulti.a -Wl,-dll
%CXX% -shared -o snfmulti.dll %LDFLAGS% snfmultidll.o FilterChain.o GBUdb.o mangler.o scanner.o snfCFGmgr.o snf_engine.o snfGBUdbmgr.o snf_HeaderFinder.o snfLOGmgr.o SNFMulti.o snfNETmgr.o snf_sync.o snf_xci.o snfXCImgr.o base64codec.o configuration.o networking.o threading.o timing.o %LIB%

+ 6
- 3
MinGW-64/compileSNFMultiDLL.cmd Bestand weergeven

@@ -1,6 +1,9 @@
set path=c:\MinGW-64\bin;%path%
set CXX=x86_64-pc-mingw32-c++
REM set CXX=c++
REM set path=c:\MinGW-64\bin;%path%
REM set CXX=x86_64-pc-mingw32-c++
set path=c:\Program Files\MinGW-W64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%path%
set CXX=c++
set CXXFLAGS=-I../CodeDweller -I../SNFMulti -mthreads -O3
del *.o
%CXX% %CXXFLAGS% -c ../SNFMulti/FilterChain.cpp -o FilterChain.o

+ 1
- 1
SNFMulti

@@ -1 +1 @@
Subproject commit d122549f7e64c0a9a2a40011eb28c32dfa64a976
Subproject commit c5aed611cba49fe73bd998ab426b07d70c4d9565

+ 11
- 4
SNFMultiDll/snfmultidll.cpp Bestand weergeven

@@ -3,6 +3,13 @@
//
// Provides a full SNFMulti engine with dynamic scanner allocation.
#ifdef WIN32
// Required because threading.hpp includes windows.h.
#include <winsock2.h>
#endif
#include <windows.h>
#include <stdexcept>
#include <cmath>
@@ -88,9 +95,9 @@ const int ClassicReserve = 4096;
ScannerInstance::ScannerInstance(snf_RulebaseHandler* RBH, int N) : // Initialize.
Ordinal(N), // Ordinal as assigned.
ScanResult(snf_ERROR_UNKNOWN), // No good result yet.
ScanXHeaders(0,XHeaderReserve), // Pre-allocate some space for our
ScanXMLLog(0, XMLLogReserve), // result caching buffers (strings)
ScanClassicLog(0, ClassicReserve) { // so we might not have to later.
ScanXHeaders(XHeaderReserve, '\0'), // Pre-allocate some space for our
ScanXMLLog(XMLLogReserve, '\0'), // result caching buffers (strings)
ScanClassicLog(ClassicReserve, '\0') { // so we might not have to later.
clearBuffers(); // Clear the buffers.
open(RBH); // Open the engine handler.
}
@@ -299,7 +306,7 @@ int snfScannerPool::testIP(unsigned long int IPToCheck) {
if(0 == myRulebaseHandler) return snf_ERROR_NO_HANDLE; // If we have no engine, punt!
IPTestRecord Tester(IPToCheck); // Make up a test record for this IP.
myRulebaseHandler->performIPTest(Tester); // Run it past the engine.
return Tester.R; // IPRange is an enum, so use as an int.
return static_cast<int>(Tester.R); // IPRange is an enum, so use as an int.
}
double snfScannerPool::getIPReputation(unsigned long int IPToCheck) { // This is how we get IP reps.

Laden…
Annuleren
Opslaan