Fix for edge case where System.Core is not loaded
Make sure System.Core is loaded before creating an AES object. https://github.com/PowerShellMafia/PowerSploit/issues/247
This commit is contained in:
parent
0bbf86e021
commit
41cad0ee9f
|
|
@ -118,6 +118,9 @@ http://rewtdance.blogspot.com/2012/06/exploiting-windows-2008-group-policy.html
|
|||
}
|
||||
|
||||
$Base64Decoded = [Convert]::FromBase64String($Cpassword)
|
||||
|
||||
# Make sure System.Core is loaded
|
||||
[System.Reflection.Assembly]::LoadWithPartialName("System.Core") |Out-Null
|
||||
|
||||
#Create a new AES .NET Crypto Object
|
||||
$AesObject = New-Object System.Security.Cryptography.AesCryptoServiceProvider
|
||||
|
|
@ -345,4 +348,4 @@ http://rewtdance.blogspot.com/2012/06/exploiting-windows-2008-group-policy.html
|
|||
}
|
||||
|
||||
catch { Write-Error $Error[0] }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue