diff options
author | mattifestation <mattgraeber@gmail.com> | 2014-01-25 11:48:53 -0500 |
---|---|---|
committer | mattifestation <mattgraeber@gmail.com> | 2014-01-25 11:48:53 -0500 |
commit | 7c51e9331b084d6fe6d05b9711b5ab66fb396040 (patch) | |
tree | f1ff3bd89c6e682e95a59be9704e5e19aca6a3c2 /Capstone/Capstone.psm1 | |
parent | 22cbc476422cd14ff73ce8c37a1b30cb3a7f41db (diff) | |
download | PowerSploit-7c51e9331b084d6fe6d05b9711b5ab66fb396040.tar.gz PowerSploit-7c51e9331b084d6fe6d05b9711b5ab66fb396040.zip |
Generate a non-terminating error if there's a binding/framework version mismatch
The user should at least be made aware if they're using an unsupported
framework library version.
Diffstat (limited to 'Capstone/Capstone.psm1')
-rw-r--r-- | Capstone/Capstone.psm1 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Capstone/Capstone.psm1 b/Capstone/Capstone.psm1 index b9829e7..6f55c1e 100644 --- a/Capstone/Capstone.psm1 +++ b/Capstone/Capstone.psm1 @@ -148,6 +148,11 @@ function Get-CSDisassembly $Disassembly = New-Object Capstone.Capstone($Architecture, $Mode) + if ($Disassembly.Version -ne [Capstone.Capstone]::BindingVersion) + { + Write-Error "capstone.dll version ($([Capstone.Capstone]::BindingVersion.ToString())) should be the same as libcapstone.dll version. Otherwise, undefined behavior is likely." + } + if ($Syntax) { switch ($Syntax) |