aboutsummaryrefslogtreecommitdiff
path: root/Exfiltration
diff options
context:
space:
mode:
authorb33f <ru.boonen@gmail.com>2017-08-09 21:15:34 +0100
committerGitHub <noreply@github.com>2017-08-09 21:15:34 +0100
commit1950a169e3a979108fe3fe8df2306ce78bae6a75 (patch)
treec86fdb5468fbeddbf95a6a940ad534a556042106 /Exfiltration
parentb038f09ceba0ccbdff946a802e4529427cfaee5e (diff)
downloadPowerSploit-1950a169e3a979108fe3fe8df2306ce78bae6a75.tar.gz
PowerSploit-1950a169e3a979108fe3fe8df2306ce78bae6a75.zip
+Version check fix
Changed version check to be of type "System.Version". This fixes: https://github.com/PowerShellMafia/PowerSploit/issues/163
Diffstat (limited to 'Exfiltration')
-rw-r--r--Exfiltration/Get-VaultCredential.ps18
1 files changed, 3 insertions, 5 deletions
diff --git a/Exfiltration/Get-VaultCredential.ps1 b/Exfiltration/Get-VaultCredential.ps1
index 57570e8..e37f3fc 100644
--- a/Exfiltration/Get-VaultCredential.ps1
+++ b/Exfiltration/Get-VaultCredential.ps1
@@ -28,8 +28,6 @@ Only web credentials can be displayed in cleartext.
[CmdletBinding()] Param()
$OSVersion = [Environment]::OSVersion.Version
- $OSMajor = $OSVersion.Major
- $OSMinor = $OSVersion.Minor
#region P/Invoke declarations for vaultcli.dll
$DynAssembly = New-Object System.Reflection.AssemblyName('VaultUtil')
@@ -79,7 +77,7 @@ Only web credentials can be displayed in cleartext.
$null = $TypeBuilder.DefineField('pResourceElement', [IntPtr], 'Public')
$null = $TypeBuilder.DefineField('pIdentityElement', [IntPtr], 'Public')
$null = $TypeBuilder.DefineField('pAuthenticatorElement', [IntPtr], 'Public')
- if ($OSMajor -ge 6 -and $OSMinor -ge 2)
+ if ($OSVersion -ge '6.2')
{
$null = $TypeBuilder.DefineField('pPackageSid', [IntPtr], 'Public')
}
@@ -149,7 +147,7 @@ Only web credentials can be displayed in cleartext.
[Runtime.InteropServices.CallingConvention]::Winapi,
[Runtime.InteropServices.CharSet]::Auto)
- if ($OSMajor -ge 6 -and $OSMinor -ge 2)
+ if ($OSVersion -ge '6.2')
{
$PInvokeMethod = $TypeBuilder.DefinePInvokeMethod('VaultGetItem',
'vaultcli.dll',
@@ -317,7 +315,7 @@ Only web credentials can be displayed in cleartext.
$PasswordVaultItem = [IntPtr]::Zero
- if ($OSMajor -ge 6 -and $OSMinor -ge 2)
+ if ($OSVersion -ge '6.2')
{
$Result = $Vaultcli::VaultGetItem($VaultHandle,
[Ref] $CurrentItem.SchemaId,