@ -41,9 +41,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
@ -85,7 +91,7 @@ You have the following functions available:
- **Load** - Loads Xvirus Scan Engine into memory, if set `force`=true it will reload the scan engine, even if it is already loaded.
- **Load** - Loads Xvirus Scan Engine into memory, if set `force`=true it will reload the scan engine, even if it is already loaded.
- **Unload** - Unloads Xvirus Scan Engine from memory.
- **Unload** - Unloads Xvirus Scan Engine from memory.
- **Scan** - Scans the file located at `filepath`. It will return a [`ScanResult`](#Model).
- **Scan** - Scans the file located at `filepath`. It will return a [`ScanResult`](#Model).
- **ScanAsString** - Scans the file located at `filepath`. It will return one of the following strings:
- **ScanString** - Scans the file located at `filepath`. It will return one of the following strings:
- "**Safe**" - If no malware is detected.
- "**Safe**" - If no malware is detected.
- "**Malware**" - If malware is detected but the name isn't known.
- "**Malware**" - If malware is detected but the name isn't known.
- **_Malware Name_** - If it is malware from a known family (example: "Trojan.Downloader").
- **_Malware Name_** - If it is malware from a known family (example: "Trojan.Downloader").
@ -93,6 +99,8 @@ You have the following functions available:
- "**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 IEnumerable of [`ScanResult`](#Model).
- **ScanFolderString** - 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!**"
@ -105,7 +113,7 @@ You have the following functions available:
## Model
## Model
The `scan` function returns a class `ScanResult` with the following properties:
The `scan`and `scanFolder`functions returns a class `ScanResult` with the following properties:
```c#
```c#
public class ScanResult
public class ScanResult
@ -113,6 +121,7 @@ public class ScanResult
public bool IsMalware { get; set; } // true if malware
public bool IsMalware { get; set; } // true if malware
public string Name { get; set; } // detection name
public string Name { get; set; } // detection name
public double MalwareScore { get; set; } // between 0 and 1, higher score means more likely to be malware, -1 if there was an error
public double MalwareScore { get; set; } // between 0 and 1, higher score means more likely to be malware, -1 if there was an error