You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
5.5 KiB

3 years ago
# Xvirus CLI
3 years ago
3 weeks ago
Xvirus CLI 4.2.2
3 years ago
## Table of Contents
3 years ago
- [Xvirus CLI](#xvirus-cli)
3 years ago
- [Table of Contents](#table-of-contents)
- [Minimum Requirements](#minimum-requirements)
- [Changelog](#changelog)
- [Known Issues](#known-issues)
- [Get Started](#get-started)
- [Avaiable Commands](#avaiable-commands)
- [Settings](#settings)
3 years ago
- [Exceptions](#exceptions)
3 years ago
## Minimum Requirements
1 year ago
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
3 years ago
## Changelog
3 weeks ago
- Version **4.2.2**:
- Optimized scanning speed of PDF files
- ScanResult now returns the file path
- Added new ScanFolder() and ScanFolderString() functions
1 month ago
- Version **4.2.1**:
- Optimized scanning speed of big files
- Optimized scanning speed in Linux version
1 year ago
- 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
2 years ago
1 year ago
- Version **4.1**:
2 years ago
- Upgraded from .NET 5 to .NET 7
- C++ bindings now also support Linux
- Changed how exceptions are handled in C++ bindings
- Version **4.0**:
- Completely redone in .NET 5
- Now supports Linux (CLI and C# bindings only)
- Added XvirusAI scan engine (BETA)
- Scan speed is up to 2x faster
- Fixed memory usage spike when scanning large files
- Removed file size limit for scanned files by default
- The checkUpdate function can now check for SDK updates
- Added 3 new settings "EnableAIScan", "MaxScanLength" and "DatabaseVersion"
3 years ago
## Known Issues
- XvirusAI engine is still in BETA. It is not recomended to use in production yet.
2 years ago
- XvirusAI engine does not work in C++ bindings.
3 years ago
- The checkUpdate function can now check for SDK updates but can't update it
## Get Started
2 years ago
You can run it by opening executable file in the bin folder with a command as the execution argument. For example: `XvirusSDK.exe interactive`.
3 years ago
## Avaiable Commands
You have the following commands available:
- **Interactive** - Starts Xvirus CLI in interactive mode. When in this mode you can write commands and the executable will keep running until you call the `quit` command.
- **Quit** - Stop Xvirus CLI execution.
- **Load** 'force' - 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.
- **Scan** 'filepath' - Scans the file located at `filepath`. It will print one of the following messages:
- "**Safe**" - If no malware is detected.
- "**Malware**" - If malware is detected but the name isn't known.
- **_Malware Name_** - If it is malware from a known family (example: "Trojan.Downloader").
- "**AI.{aiScore}**" - Score of the file using XvirusAI from 0 to 100, the higher the score the more probable it is malicious (example: "AI.99").
- "**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.
- "**Could not get file hash!**" - There was an error calculating the hash of the file.
3 weeks ago
- **ScanFolder** 'folderpath' - Scans all the files inside the folder at `folderpath`. It will print the scan result message for each file scanned.
3 years ago
- **Update** 'checkSDKUpdates' 'loadDBAfterUpdate' - 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 print the following messages:
- "**There is a new SDK version available!**"
- "**Database was updated!**"
- "**Database is up-to-date!**"
1 year ago
- **Logging** 'enableLogging' - Sets and prints if `Logging` is enabled. If no `enableLogging` value is provided it will only print.
- **BaseFolder** 'baseFolder' - Sets and prints the `BaseFolder` path. If no `baseFolder` value is provided it will only print.
- **Settings** - Prints the `settings.json` file.
- **Version** - Prints the version of the SDK/CLI.
3 years ago
## Settings
1 year ago
Settings are located in the "`settings.json`" file in the root folder of the SDK. There are 5 avaiable options:
3 years ago
- **EnableHeuristics** - Enables heuristics scanning of files. Default: _true_
- **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_
1 year ago
- **DatabaseFolder** - Path to the database folder, it accepts both relative and absolute paths. Default: _"Database"_
3 years ago
- **DatabaseVersion** - KeyValue list of database files version. This is updated automatically when using the "checkUpdate()" function.
Example of a `settings.json` file:
```JSON
{
"EnableHeuristics": true,
"EnableAIScan": false,
"MaxScanLength": null,
1 year ago
"DatabaseFolder": "Database",
3 years ago
"DatabaseVersion": {
"AIModel": 0,
"MainDB": 0,
"DailyDB": 0,
"WhiteDB": 0,
"DailywlDB": 0,
"HeurDB": 0,
"HeurDB2": 0,
"MalvendorDB": 0
}
}
```
## Exceptions
If any of the functions fail it may return an exception. Exception will stop the execution of the CLI.
All exceptions are logged in the `errorlog.txt` file.