Browse Source

Version 4.2

master XvirusSDK_4.2
Dani Santos 1 year ago
parent
commit
fe5c5264ef
  1. 35
      README.md
  2. BIN
      bin/Linux/XvirusSDK.so
  3. 1
      bin/Linux/settings.json
  4. BIN
      bin/Windows/XvirusSDK.dll
  5. 1
      bin/Windows/settings.json
  6. 26
      example/xvneng.h
  7. BIN
      functions.JPG
  8. 4
      headers/xvneng.h

35
README.md

@ -1,6 +1,6 @@
# Xvirus SDK C++ # Xvirus SDK C++
Xvirus SDK 4.1 C++ bindings. Xvirus SDK 4.2 C++ bindings.
## Table of Contents ## Table of Contents
@ -17,15 +17,36 @@ Xvirus SDK 4.1 C++ bindings.
## Minimum Requirements ## Minimum Requirements
No minimum requirements needed! The following Operating Systems are supported:
- Windows:
- Windows 10 1607
- Windows 11 22000
- Windows Server 2012
- Windows Server Core 2012
- Linux (glibc 2.17):
- Alpine Linux 3.15
- CentOS 7
- Debian 10
- Fedora 36
- openSUSE 15
- Oracle Linux 7
- Red Hat Enterprise Linux 7
- SUSE Enterprise Linux (SLES) 12 SP2
- Ubuntu 18.04
## Changelog ## Changelog
- Version **4.1**: - Version **4.2**:
- Reduced glibc minimum version to 2.17 on Linux
- Added "Logging()" function to enable/disable logging
- Added "BaseFolder()" function to set a custom base folder
- Added new setting "DatabaseFolder" to set the Database folder path
- Fixed C++ binding will return "Success=false" correctly when failing to scan a file
- Version **4.1**:
- Upgraded from .NET 5 to .NET 7 - Upgraded from .NET 5 to .NET 7
- C++ bindings now also support Linux - C++ bindings now also support Linux
- Removed Minimum Requirements on C++ bindings and CLI
- Changed how exceptions are handled in C++ bindings - Changed how exceptions are handled in C++ bindings
- Version **4.0**: - Version **4.0**:
@ -72,6 +93,8 @@ You can find the definition of all functions and structs in the file `xvneng.h`
- "**Database was updated!**" - "**Database was updated!**"
- "**Database is up-to-date!**" - "**Database is up-to-date!**"
- **getSettings** - returns a string representation of the `settings.json` file. - **getSettings** - returns a string representation of the `settings.json` file.
- **logging** - Sets and return if `Logging` is enabled. If `enableLogging` Null value is provided it will only return.
- **baseFolder** - Sets and return the `BaseFolder` path. If `baseFolder` Null value is provided it will only return.
- **version** - returns the version of the SDK/CLI. - **version** - returns the version of the SDK/CLI.
![functions](./functions.JPG) ![functions](./functions.JPG)
@ -102,11 +125,12 @@ struct ActionResult {
## Settings ## Settings
Settings are located in the "`settings.json`" file in the root folder of the SDK. There are 4 avaiable options: Settings are located in the "`settings.json`" file in the root folder of the SDK. There are 5 avaiable options:
- **EnableHeuristics** - Enables heuristics scanning of files. Default: _true_ - **EnableHeuristics** - Enables heuristics scanning of files. Default: _true_
- **EnableAIScan** - Enables XvirusAI scan engine. This feature is still in BETA. Default: _false_ - **EnableAIScan** - Enables XvirusAI scan engine. This feature is still in BETA. Default: _false_
- **MaxScanLength** - Maximum file size to be scanned in bytes. If set "null" then there is no limit. Default: _null_ - **MaxScanLength** - Maximum file size to be scanned in bytes. If set "null" then there is no limit. Default: _null_
- **DatabaseFolder** - Path to the database folder, it accepts both relative and absolute paths. Default: _"Database"_
- **DatabaseVersion** - KeyValue list of database files version. This is updated automatically when using the "checkUpdate()" function. - **DatabaseVersion** - KeyValue list of database files version. This is updated automatically when using the "checkUpdate()" function.
Example of a `settings.json` file: Example of a `settings.json` file:
@ -116,6 +140,7 @@ Example of a `settings.json` file:
"EnableHeuristics": true, "EnableHeuristics": true,
"EnableAIScan": false, "EnableAIScan": false,
"MaxScanLength": null, "MaxScanLength": null,
"DatabaseFolder": "Database",
"DatabaseVersion": { "DatabaseVersion": {
"AIModel": 0, "AIModel": 0,
"MainDB": 0, "MainDB": 0,

BIN
bin/Linux/XvirusSDK.so

Binary file not shown.

1
bin/Linux/settings.json

@ -2,6 +2,7 @@
"EnableHeuristics": true, "EnableHeuristics": true,
"EnableAIScan": false, "EnableAIScan": false,
"MaxScanLength": null, "MaxScanLength": null,
"DatabaseFolder": "Database",
"DatabaseVersion": { "DatabaseVersion": {
"AIModel": 0, "AIModel": 0,
"MainDB": 0, "MainDB": 0,

BIN
bin/Windows/XvirusSDK.dll

Binary file not shown.

1
bin/Windows/settings.json

@ -2,6 +2,7 @@
"EnableHeuristics": true, "EnableHeuristics": true,
"EnableAIScan": false, "EnableAIScan": false,
"MaxScanLength": null, "MaxScanLength": null,
"DatabaseFolder": "Database",
"DatabaseVersion": { "DatabaseVersion": {
"AIModel": 0, "AIModel": 0,
"MainDB": 0, "MainDB": 0,

26
example/xvneng.h

@ -8,13 +8,15 @@
#define ScanAsStringFnKey "scanAsString" #define ScanAsStringFnKey "scanAsString"
#define CheckUpdatesFnKey "checkUpdates" #define CheckUpdatesFnKey "checkUpdates"
#define GetSettingsFnKey "getSettings" #define GetSettingsFnKey "getSettings"
#define LoggingFnKey "logging"
#define BaseFolderFnKey "baseFolder"
#define VersionFnKey "version" #define VersionFnKey "version"
struct ActionResult struct ActionResult
{ {
bool sucess; bool sucess;
wchar_t* result; wchar_t *result;
wchar_t* error; wchar_t *error;
}; };
struct ScanResult struct ScanResult
@ -22,16 +24,18 @@ struct ScanResult
bool sucess; bool sucess;
bool isMalware; bool isMalware;
double score; double score;
wchar_t* name; wchar_t *name;
wchar_t* error; wchar_t *error;
}; };
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 ActionResult(*CheckUpdatesFn)(bool checkSDKUpdates, bool loadDBAfterUpdate); typedef ActionResult (*CheckUpdatesFn)(bool checkSDKUpdates, bool loadDBAfterUpdate);
typedef ActionResult(*GetSettingsFn)(); typedef ActionResult (*GetSettingsFn)();
typedef wchar_t* (*VersionFn)(); typedef bool (*LoggingFn)(bool enableLogging);
typedef wchar_t *(*BaseFolderFn)(const wchar_t *baseFolder);
typedef wchar_t *(*VersionFn)();
#endif // _XVNENG_H #endif // _XVNENG_H

BIN
functions.JPG

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 74 KiB

4
headers/xvneng.h

@ -8,6 +8,8 @@
#define ScanAsStringFnKey "scanAsString" #define ScanAsStringFnKey "scanAsString"
#define CheckUpdatesFnKey "checkUpdates" #define CheckUpdatesFnKey "checkUpdates"
#define GetSettingsFnKey "getSettings" #define GetSettingsFnKey "getSettings"
#define LoggingFnKey "logging"
#define BaseFolderFnKey "baseFolder"
#define VersionFnKey "version" #define VersionFnKey "version"
struct ActionResult struct ActionResult
@ -32,6 +34,8 @@ typedef ScanResult (*ScanFn)(const wchar_t *filepath);
typedef ActionResult (*ScanAsStringFn)(const wchar_t *filepath); typedef ActionResult (*ScanAsStringFn)(const wchar_t *filepath);
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 wchar_t *(*BaseFolderFn)(const wchar_t *baseFolder);
typedef wchar_t *(*VersionFn)(); typedef wchar_t *(*VersionFn)();
#endif // _XVNENG_H #endif // _XVNENG_H

Loading…
Cancel
Save