diff options
author | Dave Hull <dave.hull@tanium.com> | 2017-09-08 16:33:11 -0500 |
---|---|---|
committer | Dave Hull <dave.hull@tanium.com> | 2017-09-08 16:33:11 -0500 |
commit | 6eb3c6f281f0812a103283d1da80be14bb04f944 (patch) | |
tree | cfe2e46596ef251274e954c267c5634d62991da2 /Exfiltration/Get-VaultCredential.ps1 | |
parent | bf652bcd261c2c74445c2aa1b4e283c4bf167109 (diff) | |
parent | 3d0d32d9ee6af70f0dfd5ecfe809a49a65d6822d (diff) | |
download | PowerSploit-6eb3c6f281f0812a103283d1da80be14bb04f944.tar.gz PowerSploit-6eb3c6f281f0812a103283d1da80be14bb04f944.zip |
Merge branch 'dev' of github.com:PowerShellMafia/PowerSploit into dev
Diffstat (limited to 'Exfiltration/Get-VaultCredential.ps1')
-rw-r--r-- | Exfiltration/Get-VaultCredential.ps1 | 8 |
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, |