Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Decrypt an Encrypted File Without Generating a New File

$
0
0

Hello,
 
I'm trying to write a program that will decrypt an encrypted file (_Crypt_EncryptFile was used to encrypt) without generating a new file.
 
I tried to use FileRead(FileOpen($sSourceRead,0),-1) which in theory should read the whole file into a variable then I can use _Crypt_DecryptData to decrypt the variable. But FileRead won't read the whole file. It will stop somewhere in the middle of the first line for some reason.
 
I've tried FileRead, FileReadLine, and FileReadToArray. None of them can read the encrypted file properly.

 

I've attached the encrypted text. Nothing special. Algorithm: AES256, Password: password

 

If you try to read this file using the command below, it will stop somewhere in the middle of the first line:

ConsoleWrite(FileRead(FileOpen(@ScriptDir&'\testRead.txt',0),-1)&@CRLF)

Anybody knows what I'm doing wrong? It's a simple FileRead!

Attached Files


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>