LerN

Encrypt data

8 posts in this topic

#1 ·  Posted

Hi, i wish if everybody is having a good day
i have a txt file like this 

[firstsection]
code = 123456
[secondsection]
code = 654321
[thirdsection]
code = 645123

and i want to encrypt this file but in the same way i want to read it normal but i need a good encryption function so no one can decrypt this file ... thanks anyway and i will be greatful is someone can help me

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

@LerN look at the _Crypt_* functions in the help file to get an idea of what is available in AutoIt. Be sure to try out the examples, so you understand how it works. As for "so no one can decrypt this file" - that is simply not going to happen, and has been discussed far too many times on this forum. In short, a determined person will be able to undo AutoIt obfuscation or encryption in very short order - period.

As we are not going to go through the discussion again in this thread, please do a forum search for "Protect My Script" to read for yourself why it is not possible.

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted

I know these functions but any one can easily decrypt the file in 1 second ! so what is the point of using these functions then .

Share this post


Link to post
Share on other sites

#4 ·  Posted

Please see my edit above. As mentioned, this has been discussed ad nauseam. You will not be able to protect an AutoIt script 100%


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#5 ·  Posted

2 hours ago, LerN said:

but any one can easily decrypt the file in 1 second

Untrue!

Crypt* functions are decently immune to breakage from both sister kid and most malvolents IFF (if and only if) your computer isn't physically tampered with, is free from spyware of all kinds and you request the user to type a hard passphrase before every access without storing it on permanent storage (nor PostIt stuck on the monitor frame).

Storing the passphrase in the script itself makes encrypting anything essentially pointless.


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

#6 ·  Posted

Share this post


Link to post
Share on other sites

#7 ·  Posted

Guys i am having some problems !
i have encrypted an ini file looks like this :
[first]
firstkey = 0x123
[second]
secondkey = 0x321
[third]
thirdkey = 0x213

now the ini file looks like this :
0xweird numbers after encryption
0xweird numbers after encryption
0xweird numbers after encryption
0xweird numbers after encryption
0xweird numbers after encryption
0xweird numbers after encryption

 

now for ex: what i have to do to read the secondkey ? specially to read 0x321 ?? 

Share this post


Link to post
Share on other sites

#8 ·  Posted

Of course encrypted data is undistinguishable from random binary, and hopefully!  You need to decrypt the whole thing to get it back to plaintext. Isn't that the whole purpose of encryption in the first place, seriously?

BTW you seem to have encrypted every string separately, else you should only see "0xlonger series of weird numbers after encryption" once. I suggest you encrypt/decrypt the full text as a whole. Also converting the cyphertext to string is a useless step. Leave it as binary.


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now