Browse Source

Version 4.0.4

master XvirusSDK_4.0.4
Dani Santos 3 years ago
commit
85de1ef358
  1. 116
      README.md
  2. BIN
      bin/FastTreeNative.dll
  3. BIN
      bin/Ijwhost.dll
  4. BIN
      bin/LdaNative.dll
  5. BIN
      bin/Microsoft.ML.Core.dll
  6. BIN
      bin/Microsoft.ML.CpuMath.dll
  7. BIN
      bin/Microsoft.ML.Data.dll
  8. BIN
      bin/Microsoft.ML.DataView.dll
  9. BIN
      bin/Microsoft.ML.FastTree.dll
  10. BIN
      bin/Microsoft.ML.KMeansClustering.dll
  11. BIN
      bin/Microsoft.ML.PCA.dll
  12. BIN
      bin/Microsoft.ML.StandardTrainers.dll
  13. BIN
      bin/Microsoft.ML.Transforms.dll
  14. BIN
      bin/Microsoft.ML.dll
  15. BIN
      bin/Newtonsoft.Json.dll
  16. BIN
      bin/PeNet.Asn1.dll
  17. BIN
      bin/PeNet.dll
  18. BIN
      bin/System.CodeDom.dll
  19. BIN
      bin/System.Security.Cryptography.Pkcs.dll
  20. BIN
      bin/Validation.dll
  21. 2097
      bin/XescSDK.deps.json
  22. BIN
      bin/XescSDK.dll
  23. 12
      bin/XescSDK.runtimeconfig.json
  24. BIN
      bin/Xunit.SkippableFact.dll
  25. 0
      bin/errorlog.txt
  26. 15
      bin/settings.json
  27. BIN
      bin/xunit.abstractions.dll
  28. BIN
      bin/xunit.core.dll
  29. BIN
      bin/xunit.execution.dotnet.dll
  30. 169
      bin/xvneng.deps.json
  31. BIN
      bin/xvneng.dll
  32. BIN
      bin/xvneng.exp
  33. BIN
      bin/xvneng.lib
  34. 12
      bin/xvneng.runtimeconfig.json
  35. 35
      example/xvbdc.cpp
  36. 31
      example/xvbdc.sln
  37. 152
      example/xvbdc.vcxproj
  38. 27
      example/xvbdc.vcxproj.filters
  39. 6
      example/xvbdc.vcxproj.user
  40. 21
      example/xvneng.h
  41. BIN
      example/xvneng.lib
  42. BIN
      functions.JPG
  43. 21
      headers/xvneng.h

116
README.md

@ -0,0 +1,116 @@
# Xvirus SDK 4.0.4
Xvirus SDK 4.0.4 C++ bindings x64.
## Table of Contents
- [Xvirus SDK 4.0.4](#xvirus-sdk-40)
- [Table of Contents](#table-of-contents)
- [Minimum Requirements](#minimum-requirements)
- [Changelog](#changelog)
- [Known Issues](#known-issues)
- [Get Started](#get-started)
- [Avaiable Functions](#avaiable-functions)
- [Settings](#settings)
## Minimum Requirements
To run Xvirus SDK you need:
- .NET 5 Runtime - [download](<[https://link](https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-5.0.11-windows-x64-installer)>)
- Visual C++ Redistributable 2019 - [download](https://aka.ms/vs/16/release/vc_redist.x64.exe)
## Changelog
- 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"
## Known Issues
- XvirusAI engine is still in BETA. It is not recomended to use in production yet.
- The checkUpdate function can now check for SDK updates but can't update it
## Get Started
The "`example`" folder contains an example project on how to import and use Xvirus SDK in C++.
This project shows you how to statically load Xvirus SDK using `xvneng.lib`, you can also dinamically load `xvneng.dll` like any other dll, [see](https://stackoverflow.com/questions/8696653/dynamically-load-a-function-from-a-dll).
You can run it by building it, copying the files from the `bin` folder to the output folder of the build and then running `xvbdc.exe`.
## Avaiable Functions
You can find the declaration of all functions and structs in the file `xvneng.h` located in the "headers" folder.
- **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.
- **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:
- "**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.
- **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!**"
- "**Database was updated!**"
- "**Database is up-to-date!**"
- **getSettings** - returns a string representation of the `settings.json` file.
- **version** - returns the version of the SDK/CLI.
![functions](./functions.JPG)
## Model
The `scan` function returns a struct `ScanResult` with the following properties:
```c++
struct ScanResult {
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
char* name; // detection name
};
```
## Settings
Settings are located in the "`settings.json`" file in the root folder of the SDK. There are 4 avaiable options:
- **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_
- **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,
"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](https://www.cplusplus.com/doc/tutorial/exceptions/).
All exceptions are logged in the `errorlog.txt` file.

BIN
bin/FastTreeNative.dll

Binary file not shown.

BIN
bin/Ijwhost.dll

Binary file not shown.

BIN
bin/LdaNative.dll

Binary file not shown.

BIN
bin/Microsoft.ML.Core.dll

Binary file not shown.

BIN
bin/Microsoft.ML.CpuMath.dll

Binary file not shown.

BIN
bin/Microsoft.ML.Data.dll

Binary file not shown.

BIN
bin/Microsoft.ML.DataView.dll

Binary file not shown.

BIN
bin/Microsoft.ML.FastTree.dll

Binary file not shown.

BIN
bin/Microsoft.ML.KMeansClustering.dll

Binary file not shown.

BIN
bin/Microsoft.ML.PCA.dll

Binary file not shown.

BIN
bin/Microsoft.ML.StandardTrainers.dll

Binary file not shown.

BIN
bin/Microsoft.ML.Transforms.dll

Binary file not shown.

BIN
bin/Microsoft.ML.dll

Binary file not shown.

BIN
bin/Newtonsoft.Json.dll

Binary file not shown.

BIN
bin/PeNet.Asn1.dll

Binary file not shown.

BIN
bin/PeNet.dll

Binary file not shown.

BIN
bin/System.CodeDom.dll

Binary file not shown.

BIN
bin/System.Security.Cryptography.Pkcs.dll

Binary file not shown.

BIN
bin/Validation.dll

Binary file not shown.

2097
bin/XescSDK.deps.json

File diff suppressed because it is too large

BIN
bin/XescSDK.dll

Binary file not shown.

12
bin/XescSDK.runtimeconfig.json

@ -0,0 +1,12 @@
{
"runtimeOptions": {
"tfm": "net5.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "5.0.0"
},
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
}
}
}

BIN
bin/Xunit.SkippableFact.dll

Binary file not shown.

0
bin/errorlog.txt

15
bin/settings.json

@ -0,0 +1,15 @@
{
"EnableHeuristics": true,
"EnableAIScan": false,
"MaxScanLength": null,
"DatabaseVersion": {
"AIModel": 0,
"MainDB": 0,
"DailyDB": 0,
"WhiteDB": 0,
"DailywlDB": 0,
"HeurDB": 0,
"HeurDB2": 0,
"MalvendorDB": 0
}
}

BIN
bin/xunit.abstractions.dll

Binary file not shown.

BIN
bin/xunit.core.dll

Binary file not shown.

BIN
bin/xunit.execution.dotnet.dll

Binary file not shown.

169
bin/xvneng.deps.json

@ -0,0 +1,169 @@
{
"runtimeTarget": {
"name": "net5.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
"net5.0": {
"xvneng/1.0.0": {
"dependencies": {
"XescSDK": "4.0.4.0"
},
"runtime": {
"xvneng.dll": {}
}
},
"XescSDK/4.0.4.0": {
"runtime": {
"XescSDK.dll": {
"assemblyVersion": "4.0.4.0",
"fileVersion": "4.0.4.0"
}
}
},
"Microsoft.ML.Data/1.0.0.0": {
"runtime": {
"Microsoft.ML.Data.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "1.700.122.15804"
}
}
},
"Microsoft.ML.Core/1.0.0.0": {
"runtime": {
"Microsoft.ML.Core.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "1.700.122.15804"
}
}
},
"Microsoft.ML.DataView/1.0.0.0": {
"runtime": {
"Microsoft.ML.DataView.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "1.700.122.15804"
}
}
},
"PeNet/1.6.1.0": {
"runtime": {
"PeNet.dll": {
"assemblyVersion": "1.6.1.0",
"fileVersion": "1.6.1.0"
}
}
},
"Microsoft.ML.Transforms/1.0.0.0": {
"runtime": {
"Microsoft.ML.Transforms.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "1.700.122.15804"
}
}
},
"Microsoft.ML.FastTree/1.0.0.0": {
"runtime": {
"Microsoft.ML.FastTree.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "1.700.122.15804"
}
}
},
"Microsoft.ML.StandardTrainers/1.0.0.0": {
"runtime": {
"Microsoft.ML.StandardTrainers.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "1.700.122.15804"
}
}
},
"Newtonsoft.Json/10.0.0.0": {
"runtime": {
"Newtonsoft.Json.dll": {
"assemblyVersion": "10.0.0.0",
"fileVersion": "10.0.3.21018"
}
}
},
"Microsoft.ML.CpuMath/1.0.0.0": {
"runtime": {
"Microsoft.ML.CpuMath.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "1.700.122.15804"
}
}
},
"PeNet.Asn1/1.3.3.0": {
"runtime": {
"PeNet.Asn1.dll": {
"assemblyVersion": "1.3.3.0",
"fileVersion": "1.3.3.0"
}
}
}
}
},
"libraries": {
"xvneng/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"XescSDK/4.0.4.0": {
"type": "reference",
"serviceable": false,
"sha512": ""
},
"Microsoft.ML.Data/1.0.0.0": {
"type": "reference",
"serviceable": false,
"sha512": ""
},
"Microsoft.ML.Core/1.0.0.0": {
"type": "reference",
"serviceable": false,
"sha512": ""
},
"Microsoft.ML.DataView/1.0.0.0": {
"type": "reference",
"serviceable": false,
"sha512": ""
},
"PeNet/1.6.1.0": {
"type": "reference",
"serviceable": false,
"sha512": ""
},
"Microsoft.ML.Transforms/1.0.0.0": {
"type": "reference",
"serviceable": false,
"sha512": ""
},
"Microsoft.ML.FastTree/1.0.0.0": {
"type": "reference",
"serviceable": false,
"sha512": ""
},
"Microsoft.ML.StandardTrainers/1.0.0.0": {
"type": "reference",
"serviceable": false,
"sha512": ""
},
"Newtonsoft.Json/10.0.0.0": {
"type": "reference",
"serviceable": false,
"sha512": ""
},
"Microsoft.ML.CpuMath/1.0.0.0": {
"type": "reference",
"serviceable": false,
"sha512": ""
},
"PeNet.Asn1/1.3.3.0": {
"type": "reference",
"serviceable": false,
"sha512": ""
}
}
}

BIN
bin/xvneng.dll

Binary file not shown.

BIN
bin/xvneng.exp

Binary file not shown.

BIN
bin/xvneng.lib

Binary file not shown.

12
bin/xvneng.runtimeconfig.json

@ -0,0 +1,12 @@
{
"runtimeOptions": {
"tfm": "net5.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "5.0.0"
},
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
}
}
}

35
example/xvbdc.cpp

@ -0,0 +1,35 @@
#include <iostream>
#include "xvneng.h"
using namespace std;
int main (
int argc,
char* argv[]
)
{
string info = string ( version () );
try
{
load(false);
}
catch (const std::exception& e )
{
cout << e.what() << endl;
}
if ( info.length () )
{
cout << info.c_str () << endl;
}
else
{
cout << "N/A" << endl;
}
(void) getchar ();
return EXIT_SUCCESS;
}

31
example/xvbdc.sln

@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31727.386
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xvbdc", "xvbdc.vcxproj", "{4BB437D2-6130-4B33-BD70-6131B4C491EB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4BB437D2-6130-4B33-BD70-6131B4C491EB}.Debug|x64.ActiveCfg = Debug|x64
{4BB437D2-6130-4B33-BD70-6131B4C491EB}.Debug|x64.Build.0 = Debug|x64
{4BB437D2-6130-4B33-BD70-6131B4C491EB}.Debug|x86.ActiveCfg = Debug|Win32
{4BB437D2-6130-4B33-BD70-6131B4C491EB}.Debug|x86.Build.0 = Debug|Win32
{4BB437D2-6130-4B33-BD70-6131B4C491EB}.Release|x64.ActiveCfg = Release|x64
{4BB437D2-6130-4B33-BD70-6131B4C491EB}.Release|x64.Build.0 = Release|x64
{4BB437D2-6130-4B33-BD70-6131B4C491EB}.Release|x86.ActiveCfg = Release|Win32
{4BB437D2-6130-4B33-BD70-6131B4C491EB}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C7B73751-3C79-4487-BDAC-775522402091}
EndGlobalSection
EndGlobal

152
example/xvbdc.vcxproj

@ -0,0 +1,152 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{4bb437d2-6130-4b33-bd70-6131b4c491eb}</ProjectGuid>
<RootNamespace>xvbdc</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="xvbdc.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="xvneng.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

27
example/xvbdc.vcxproj.filters

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="xvbdc.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="xvneng.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

6
example/xvbdc.vcxproj.user

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ShowAllFiles>true</ShowAllFiles>
</PropertyGroup>
</Project>

21
example/xvneng.h

@ -0,0 +1,21 @@
#pragma once
#ifndef _XVNENG_H
#define _XVNENG_H
#pragma comment ( lib, "xvneng.lib" )
struct ScanResult {
bool isMalware;
double score;
char* name;
};
__declspec(dllimport) void load(bool force);
__declspec(dllimport) void unload();
__declspec(dllimport) ScanResult scan(const wchar_t* filepath);
__declspec(dllimport) char* scanAsString(const wchar_t* filepath);
__declspec(dllimport) char* checkUpdates(bool checkSDKUpdates, bool loadDBAfterUpdate);
__declspec(dllimport) char* getSettings();
__declspec(dllimport) char* version();
#endif // _XVNENG_H

BIN
example/xvneng.lib

Binary file not shown.

BIN
functions.JPG

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

21
headers/xvneng.h

@ -0,0 +1,21 @@
#pragma once
#ifndef _XVNENG_H
#define _XVNENG_H
#pragma comment ( lib, "xvneng.lib" )
struct ScanResult {
bool isMalware;
double score;
char* name;
};
__declspec(dllimport) void load(bool force);
__declspec(dllimport) void unload();
__declspec(dllimport) ScanResult scan(const wchar_t* filepath);
__declspec(dllimport) char* scanAsString(const wchar_t* filepath);
__declspec(dllimport) char* checkUpdates(bool checkSDKUpdates, bool loadDBAfterUpdate);
__declspec(dllimport) char* getSettings();
__declspec(dllimport) char* version();
#endif // _XVNENG_H
Loading…
Cancel
Save