Decrypting a file using PowerShell (encrypted with Autoit)

My goal is to rewrite Autoit script in PowerShell for future maintainability.

I have a file on the resource that is generated daily pw.jpg

. It is generated automatically (somehow) by the Autoit executable using:

_Crypt_EncryptFile(pw.txt, pw.jpg, "passphrase", algo)

      

While researching the Autoit documentation, I ended up being redirected to MSDN , so it looks like they are using the MS implementation of cryptographic functions.I found the identically named functions here .

The password is currently decrypted with:

_Crypt_DecryptFile(pw.jpg, pw.txt, "passphrase", algo)

      

The algorithm used is $ CALG_AES_256 (mapped to 0x00006610

). My question is, how can I take this encrypted file and decrypt it using PowerShell? Any / all examples I could find in my search assumes you are encrypting and decrypting using the same PowerShell functions and this is significantly different from my knowledge.

+3


source to share





All Articles