diff --git a/Build/Test/YaraSharp.dll b/Build/Test/YaraSharp.dll index 89f3d0a..e74424d 100644 Binary files a/Build/Test/YaraSharp.dll and b/Build/Test/YaraSharp.dll differ diff --git a/Build/Test/YaraTest.exe b/Build/Test/YaraTest.exe index aad9f99..5fdf45c 100644 Binary files a/Build/Test/YaraTest.exe and b/Build/Test/YaraTest.exe differ diff --git a/YaraSharp.sln b/YaraSharp.sln index d788bac..52ed4c4 100644 --- a/YaraSharp.sln +++ b/YaraSharp.sln @@ -4,9 +4,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 VisualStudioVersion = 15.0.27428.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "YaraSharp", "YaraSharp\YaraSharp.vcxproj", "{C005E3B9-2474-4FEA-B5F4-7BB897111E8F}" - ProjectSection(ProjectDependencies) = postProject - {E236CE39-D8F3-4DB6-985C-F2794FF17746} = {E236CE39-D8F3-4DB6-985C-F2794FF17746} - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libyara", "yara-master\windows\vs2015\libyara\libyara.vcxproj", "{E236CE39-D8F3-4DB6-985C-F2794FF17746}" EndProject diff --git a/YaraSharp/AssemblyInfo.cpp b/YaraSharp/AssemblyInfo.cpp index 998258e..a61885e 100644 --- a/YaraSharp/AssemblyInfo.cpp +++ b/YaraSharp/AssemblyInfo.cpp @@ -31,7 +31,8 @@ using namespace System::Security::Permissions; // You can specify all the value or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly:AssemblyVersionAttribute("1.0.0")]; +[assembly:AssemblyVersion("1.1.3")]; +[assembly:AssemblyFileVersion("1.1.3")]; [assembly:ComVisible(false)]; diff --git a/YaraSharp/Stdafx.h b/YaraSharp/Stdafx.h index 38490b5..20adb2c 100644 --- a/YaraSharp/Stdafx.h +++ b/YaraSharp/Stdafx.h @@ -8,9 +8,8 @@ #include using namespace System; -using namespace System::IO; -using namespace System::Text; using namespace msclr::interop; +using namespace System::Reflection; using namespace System::Collections::Generic; using namespace System::Runtime::InteropServices; diff --git a/YaraSharp/YaraSharp.cpp b/YaraSharp/YaraSharp.cpp index a1b2f04..cdd2eeb 100644 --- a/YaraSharp/YaraSharp.cpp +++ b/YaraSharp/YaraSharp.cpp @@ -107,4 +107,9 @@ namespace YaraSharp return ScanMemory(BufferPointer, Buffer->Length, Rules, ExternalVariables, Timeout); } } + + Version^ CYaraSharp::GetVersion() + { + return Assembly::GetExecutingAssembly()->GetName()->Version; + } } \ No newline at end of file diff --git a/YaraSharp/YaraSharp.h b/YaraSharp/YaraSharp.h index b74a8ee..727a468 100644 --- a/YaraSharp/YaraSharp.h +++ b/YaraSharp/YaraSharp.h @@ -11,10 +11,12 @@ namespace YaraSharp CRules^ CompileFromFiles(List^ FilePathList, Dictionary^ ExternalVariables, [Out] Dictionary^>^% CompilationErrors); - + List^ ScanFile(String^ Path, CRules^ Rules, Dictionary^ ExternalVariables, int Timeout); List^ ScanProcess(int PID, CRules^ Rules, Dictionary^ ExternalVariables, int Timeout); List^ ScanMemory(array^ Buffer, CRules^ Rules, Dictionary^ ExternalVariables, int Timeout); List^ ScanMemory(uint8_t* Buffer, int Length, CRules^ Rules, Dictionary^ ExternalVariables, int Timeout); + + static Version^ GetVersion(); }; } \ No newline at end of file diff --git a/YaraSharp/YaraSharp.vcxproj b/YaraSharp/YaraSharp.vcxproj index 8294e48..33cd758 100644 --- a/YaraSharp/YaraSharp.vcxproj +++ b/YaraSharp/YaraSharp.vcxproj @@ -23,7 +23,7 @@ v4.0 ManagedCProj YaraNET - 8.1 + 10.0.16299.0 diff --git a/YaraSharp/dll.rc b/YaraSharp/dll.rc index 6252187..ee427ce 100644 Binary files a/YaraSharp/dll.rc and b/YaraSharp/dll.rc differ diff --git a/YaraTest/Program.cs b/YaraTest/Program.cs index 2d35fa9..c0c49b7 100644 --- a/YaraTest/Program.cs +++ b/YaraTest/Program.cs @@ -1,7 +1,9 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; +using System.Reflection; using YaraSharp; namespace YaraTest @@ -23,7 +25,7 @@ namespace YaraTest // Errors occured during rule compilation: ignored_file : List Dictionary> Errors = new Dictionary>(); - + // Context is where yara is initialized // From yr_initialize() to yr_finalize() using (YaraSharp.CContext YSContext = new YaraSharp.CContext()) diff --git a/YaraTest/YaraTest.csproj b/YaraTest/YaraTest.csproj index a30f560..5f0febf 100644 --- a/YaraTest/YaraTest.csproj +++ b/YaraTest/YaraTest.csproj @@ -48,7 +48,7 @@ False - ..\Build\Release\x86\YaraSharp.dll + ..\Build\Debug\x86\YaraSharp.dll diff --git a/yara-master/windows/vs2015/libyara/libyara.vcxproj b/yara-master/windows/vs2015/libyara/libyara.vcxproj index a43e316..cd55063 100644 --- a/yara-master/windows/vs2015/libyara/libyara.vcxproj +++ b/yara-master/windows/vs2015/libyara/libyara.vcxproj @@ -20,7 +20,7 @@ {E236CE39-D8F3-4DB6-985C-F2794FF17746} - 8.1 + 10.0.16299.0