Browse Source

version 4.2.2.0

master XvirusSDK_4.2.2
Dani Santos 1 month ago
parent
commit
de9dbeab8d
  1. 17
      README.md
  2. BIN
      bin/Linux/XvirusSDK.so
  3. BIN
      bin/Windows/XvirusSDK.dll
  4. 9
      example/xvneng.h
  5. BIN
      functions.JPG
  6. 9
      headers/xvneng.h

17
README.md

@ -1,6 +1,6 @@
# Xvirus SDK C++ # Xvirus SDK C++
Xvirus SDK 4.2.1 C++ bindings. Xvirus SDK 4.2.2 C++ bindings.
## Table of Contents ## Table of Contents
@ -37,9 +37,15 @@ The following Operating Systems are supported:
## Changelog ## Changelog
- Version **4.2.2**:
- Optimized scanning speed of PDF files
- ScanResult now returns the file path
- Added new ScanFolder() and ScanFolderString() functions
- Version **4.2.1**: - Version **4.2.1**:
- Optimized scanning speed of big files - Optimized scanning speed of big files
- Optimized scanning speed in Linux version - Optimized scanning speed in Linux version
- Version **4.2**: - Version **4.2**:
- Reduced glibc minimum version to 2.17 on Linux - Reduced glibc minimum version to 2.17 on Linux
- Added "Logging()" function to enable/disable logging - Added "Logging()" function to enable/disable logging
@ -91,6 +97,8 @@ You can find the definition of all functions and structs in the file `xvneng.h`
- "**File not found!**" - If no file is found in the submited path. - "**File not found!**" - If no file is found in the submited path.
- "**File too big!**" - If the file size is bigger than the set limit. - "**File too big!**" - If the file size is bigger than the set limit.
- "**Could not get file hash!**" - There was an error calculating the hash of the file. - "**Could not get file hash!**" - There was an error calculating the hash of the file.
- **scanFolder** - Scans all the files inside the folder at `folderpath`. It will return an pointer for a array of [`ScanResult`](#Model).
- **scanFolderAsString** - Scans all the files inside the folder at `folderpath`. It will return the scan result message for each file scanned.
- **checkUpdates** - Checks and updates the databases and AI engine to the most recent versions. If `checkSDKUpdates`=true then it will also check for SDK updates. If `loadDBAfterUpdate`=true then it will reload the Xvirus Scan Engine after the update is done. It can return the following strings: - **checkUpdates** - Checks and updates the databases and AI engine to the most recent versions. If `checkSDKUpdates`=true then it will also check for SDK updates. If `loadDBAfterUpdate`=true then it will reload the Xvirus Scan Engine after the update is done. It can return the following strings:
- "**There is a new SDK version available!**" - "**There is a new SDK version available!**"
- "**Database was updated!**" - "**Database was updated!**"
@ -104,15 +112,16 @@ You can find the definition of all functions and structs in the file `xvneng.h`
## Model ## Model
The `scan` function returns a struct `ScanResult` with the following properties: The `scan` and `scanFolder` functions return a struct `ScanResult` with the following properties:
```c++ ```c++
struct ScanResult { struct ScanResult {
bool sucess; // true if scan was sucessful bool sucess; // true if scan was sucessful
wchar_t* error; // error message, only has value if success=false
bool isMalware; // true if malware bool isMalware; // true if malware
double score; // between 0 and 1, higher score means more likely to be malware, -1 if there was an error
wchar_t* name; // detection name wchar_t* name; // detection name
wchar_t* error; // error message, only has value if success=false double score; // between 0 and 1, higher score means more likely to be malware, -1 if there was an error
wchar_t* path; // file path
}; };
``` ```

BIN
bin/Linux/XvirusSDK.so

Binary file not shown.

BIN
bin/Windows/XvirusSDK.dll

Binary file not shown.

9
example/xvneng.h

@ -6,6 +6,8 @@
#define UnloadFnKey "unload" #define UnloadFnKey "unload"
#define ScanFnKey "scan" #define ScanFnKey "scan"
#define ScanAsStringFnKey "scanAsString" #define ScanAsStringFnKey "scanAsString"
#define ScanFolderFnKey "scanFolder"
#define ScanFolderAsStringFnKey "scanFolderAsString"
#define CheckUpdatesFnKey "checkUpdates" #define CheckUpdatesFnKey "checkUpdates"
#define GetSettingsFnKey "getSettings" #define GetSettingsFnKey "getSettings"
#define LoggingFnKey "logging" #define LoggingFnKey "logging"
@ -22,16 +24,19 @@ struct ActionResult
struct ScanResult struct ScanResult
{ {
bool sucess; bool sucess;
wchar_t *error;
bool isMalware; bool isMalware;
double score;
wchar_t *name; wchar_t *name;
wchar_t *error; double score;
wchar_t *path;
}; };
typedef ActionResult (*LoadFn)(bool force); typedef ActionResult (*LoadFn)(bool force);
typedef ActionResult (*UnloadFn)(); typedef ActionResult (*UnloadFn)();
typedef ScanResult (*ScanFn)(const wchar_t *filepath); typedef ScanResult (*ScanFn)(const wchar_t *filepath);
typedef ActionResult (*ScanAsStringFn)(const wchar_t *filepath); typedef ActionResult (*ScanAsStringFn)(const wchar_t *filepath);
typedef ScanResult *(*ScanFolderFn)(const wchar_t *folderPath);
typedef ActionResult (*ScanFolderAsStringFn)(const wchar_t *folderPath);
typedef ActionResult (*CheckUpdatesFn)(bool checkSDKUpdates, bool loadDBAfterUpdate); typedef ActionResult (*CheckUpdatesFn)(bool checkSDKUpdates, bool loadDBAfterUpdate);
typedef ActionResult (*GetSettingsFn)(); typedef ActionResult (*GetSettingsFn)();
typedef bool (*LoggingFn)(bool enableLogging); typedef bool (*LoggingFn)(bool enableLogging);

BIN
functions.JPG

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 79 KiB

9
headers/xvneng.h

@ -6,6 +6,8 @@
#define UnloadFnKey "unload" #define UnloadFnKey "unload"
#define ScanFnKey "scan" #define ScanFnKey "scan"
#define ScanAsStringFnKey "scanAsString" #define ScanAsStringFnKey "scanAsString"
#define ScanFolderFnKey "scanFolder"
#define ScanFolderAsStringFnKey "scanFolderAsString"
#define CheckUpdatesFnKey "checkUpdates" #define CheckUpdatesFnKey "checkUpdates"
#define GetSettingsFnKey "getSettings" #define GetSettingsFnKey "getSettings"
#define LoggingFnKey "logging" #define LoggingFnKey "logging"
@ -22,16 +24,19 @@ struct ActionResult
struct ScanResult struct ScanResult
{ {
bool sucess; bool sucess;
wchar_t *error;
bool isMalware; bool isMalware;
double score;
wchar_t *name; wchar_t *name;
wchar_t *error; double score;
wchar_t *path;
}; };
typedef ActionResult (*LoadFn)(bool force); typedef ActionResult (*LoadFn)(bool force);
typedef ActionResult (*UnloadFn)(); typedef ActionResult (*UnloadFn)();
typedef ScanResult (*ScanFn)(const wchar_t *filepath); typedef ScanResult (*ScanFn)(const wchar_t *filepath);
typedef ActionResult (*ScanAsStringFn)(const wchar_t *filepath); typedef ActionResult (*ScanAsStringFn)(const wchar_t *filepath);
typedef ScanResult *(*ScanFolderFn)(const wchar_t *folderPath);
typedef ActionResult (*ScanFolderAsStringFn)(const wchar_t *folderPath);
typedef ActionResult (*CheckUpdatesFn)(bool checkSDKUpdates, bool loadDBAfterUpdate); typedef ActionResult (*CheckUpdatesFn)(bool checkSDKUpdates, bool loadDBAfterUpdate);
typedef ActionResult (*GetSettingsFn)(); typedef ActionResult (*GetSettingsFn)();
typedef bool (*LoggingFn)(bool enableLogging); typedef bool (*LoggingFn)(bool enableLogging);

Loading…
Cancel
Save