j81blog / otp4adc Goto Github PK
View Code? Open in Web Editor NEWManage OTP tokens used by the Citrix ADC
License: GNU General Public License v3.0
Manage OTP tokens used by the Citrix ADC
License: GNU General Public License v3.0
Thanks a lot for the great tool.
I have some trouble on Server 2016. On Windows 10 the script works correct ubt on my server 2016 I get no secrets.
I have tried to isolate the error. The problem seems to be with the decoding. The $CipherText is still correct. With Windows 10 a correct UTF8 string comes out at the end ($plainText). Not on Windows Server? Here is the $encryptedBlock incorect. Is there anything I need to be aware of with Server?
Write-Verbose "Starting function : Unprotect-Message"#r
nsessionKey:$sessionKeyr
ninitVector:$initVectorr
nciphertext:$ciphertext"
$aesManaged = New-Object "System.Security.Cryptography.AesManaged";
$aesManaged.Mode = [Security.Cryptography.CipherMode]::ECB;
$blockLength = $aesManaged.BlockSize / 8;
$encryptor = $aesManaged.CreateEncryptor($SessionKey, [Byte[]]::new(16));
$decryptedBytes = [Byte[]]::new(0);
[Byte[]]$ctr = $InitVector + 0, 0, 0, 1;
for ($i = 0; $i -lt $CipherText.Length; $i += $blockLength) {
Invoke-IncrementBytes -bytes $ctr;
$encryptedBlock = $encryptor.TransformFinalBlock($ctr, 0, $ctr.Length);
$decryptedBytes += (Invoke-XorBytes -a $CipherText[$i..($i + $blockLength - 1)] -b $encryptedBlock);
}
#$aesManaged.Dispose()
$plainText = [Text.Encoding]::UTF8.GetString($decryptedBytes);
$plainText
Hi,
I have a special use case where I need to add a hardware token for a user, and the secret is hardcoded in the device.
So it will be very nice if there will be an option to enter manually the "secret" instead of "auto-generate" it when adding one.
Do you see what I mean ? of course, I'll be pleased to help if possible.
Hello
OTP4ADC is not decrypting secrets which got encrypted with a certificate with signature algorithm "RSASSA-PSS".
sha256rsa is working fine.
kind regards
wurzelpanzer
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.