SC0U7 Posted June 24, 2018 Posted June 24, 2018 Hello i have a text file which contain over 600KB of BASE64 strings like : TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... Now what i need is divide this long string as autoit variable each max lenght (4000characters per line) example: Local $var $var &= TVqQAAMAAAAEAAA.. $var &= VbAmejwqqqAACEE.. and then how to i add encrypt function on every line ? how to i can xor it? example final will be : $var &= XorEnc(TVqQAAMAAAAEAAA..) $var &= XorEncVbAmejwqqqAACEE..) Thanks for any help and ideas
AutoBert Posted June 24, 2018 Posted June 24, 2018 57 minutes ago, SC0U7 said: Now what i need is divide this long string as autoit variable each max lenght (4000characters per line) Use https://www.autoitscript.com/autoit3/docs/functions/StringMid.htm in a loop. 1 hour ago, SC0U7 said: and then how to i add encrypt function on every line ? Look at the https://www.autoitscript.com/autoit3/docs/libfunctions/_Crypt_EncryptData.htm in Helpfile.
Dragonfighter Posted June 26, 2018 Posted June 26, 2018 If you want to XOR them that maybe will help you #include <String.au3> $data=_StringToHex("Data") $key=_StringToHex("key") $encrytpted=BitXOR($data, $key) ConsoleWrite("Hex Encrypted data: " & $encrytpted & @CRLF) ConsoleWrite("Hex Text to encrypt: " & $data & @CRLF) ConsoleWrite("Hex Key: " & $key & @CRLF) ConsoleWrite("Hex XOR: " & BitXOR($data, $key) & @CRLF) But if you do that for security it's a weak encryption that is susceptible to cryptanalysis. For better encryption I suggest you to watch that: Thats the most used and secure encryption algorithm. Remember encryption is not only XORing data and key together but protect data and key , to avoid that someone can get them through cryptanalysis, using confusion and diffusion. I think it will help you.
Dragonfighter Posted June 26, 2018 Posted June 26, 2018 Remember to use the code box feature to post scripts, so other can faster help you.
jchd Posted June 26, 2018 Posted June 26, 2018 1 hour ago, Dragon_Fighter said: But if you do that for security it's a weak encryption that is susceptible to cryptanalysis. I whish you good luck cryptanalysing one-time-pads. 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 hereRegExp tutorial: enough to get startedPCRE 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)
jchd Posted June 26, 2018 Posted June 26, 2018 One-time-pad is plaintext XOR full-size-key. How is that different from what you posted (except that sample key is a toy example)? 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 hereRegExp tutorial: enough to get startedPCRE 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)
Dragonfighter Posted June 27, 2018 Posted June 27, 2018 I at least had wrote a script to help SC0U7 and you start discussing without helping him. So stop discussing and try o help him without losing energy and time
Moderators JLogan3o13 Posted June 27, 2018 Moderators Posted June 27, 2018 @Dragon_Fighter calm down. Sometimes a question is just a question, and not a personal affront. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Dragonfighter Posted June 27, 2018 Posted June 27, 2018 You're right JLogan3o13 I only want to make that discussion helful for SC0U7
Earthshine Posted June 27, 2018 Posted June 27, 2018 (edited) well, here we like to lead people to knowledge. well, some of us believe in that. It is not always best to offer up a coded solution as the OP will usually not learn as much. You can't teach people to read by reading for them, for instance. still, the site here is full of people who will gladly run with specs and code it up... lol Edited June 27, 2018 by Earthshine My resources are limited. You must ask the right questions
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now