|
|
|
|
|
|
|
|
|
|
|
|
|
|
//// Version Info |
|
|
//// Version Info |
|
|
|
|
|
|
|
|
const char* SNF_ENGINE_VERSION = "SNFMulti Engine Version 3.0.21 Build: " __DATE__ " " __TIME__; |
|
|
|
|
|
|
|
|
const char* SNF_ENGINE_VERSION = "SNFMulti Engine Version 3.0.22 Build: " __DATE__ " " __TIME__; |
|
|
|
|
|
|
|
|
//// Script Caller Methods |
|
|
//// Script Caller Methods |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
throw FileError("snf_EngineHandler::scanMessageFile() FileEmpty!"); |
|
|
throw FileError("snf_EngineHandler::scanMessageFile() FileEmpty!"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
bool NoNeedToReadFullFile = (false == MyScanData.XHeaderInjectOn);
|
|
|
|
|
|
bool FileSizeLargerThanScanHorizon = (MessageFileSize > snf_ScanHorizon);
|
|
|
|
|
|
if(NoNeedToReadFullFile && FileSizeLargerThanScanHorizon) {
|
|
|
|
|
|
MessageFileSize = snf_ScanHorizon;
|
|
|
|
|
|
|
|
|
bool isXHeaderInjectionOn = (MyScanData.XHeaderInjectOn);
|
|
|
|
|
|
bool isNoNeedToReadFullFile = (false == isXHeaderInjectionOn);
|
|
|
|
|
|
if(isNoNeedToReadFullFile) {
|
|
|
|
|
|
MessageFileSize = min(MessageFileSize, snf_ScanHorizon);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
vector<unsigned char> MessageBuffer; // Allocate a buffer and size |
|
|
vector<unsigned char> MessageBuffer; // Allocate a buffer and size |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Inject headers if required. |
|
|
// Inject headers if required. |
|
|
|
|
|
|
|
|
if(MyScanData.XHeaderInjectOn) { // If we are to inject headers: |
|
|
|
|
|
|
|
|
if(isXHeaderInjectionOn) { // If we are to inject headers: |
|
|
const char* XHDRInjStage = "Begin"; // Keep track of what we're doing. |
|
|
const char* XHDRInjStage = "Begin"; // Keep track of what we're doing. |
|
|
try { |
|
|
try { |
|
|
|
|
|
|