j.gilbert Posted May 18, 2004 Share Posted May 18, 2004 Hi. I'm working on a script that will allow for users to input their username and password, for output to a .ini file to be used in a seperate autoIt script later. I have most of it all figured out except, this is my first experience with encryption. I've searched the forum and haven't found much on the topic, but I'm hoping somebody will help. This is what I have for the basics: $password=InputBox("Password Encryption", "Please enter the Password", "", "*", 125, 145, 485, 395) $parsed=Asc($password) IniWrite("C:\test\password.ini", "userdata", "pword", $parsed) What I'd like to do since using plain text string is not secure enough in the .ini file is to encrypt the input, print the encryption into the ini file, then decrypt it when called upon from the other script that I already have worked out. When I use the Asc function, it only parses the first Ascii letter (as stated in the help file). I'd like to parse all of them. The purpose of the script is to eliminate having to manually put username and password into a program the users will run on their local desktops. Any help (to even get me in the right direction) is greatly appreciated. BTW, I love the App. Awesome work and I'm sure many many hours have gone into the developement! Thanks, Jonathan Link to comment Share on other sites More sharing options...
scriptkitty Posted May 18, 2004 Share Posted May 18, 2004 Not great encription, so you could multiply the number, and say add in the @computername or such as well. Anyway hope this helps you move itn the right direction. $password=InputBox("Password Encryption", "Please enter the Password", "", "*", 125, 145, 485, 395) $parsed=Asc($password) $parsed="" $Ax=Stringsplit($password,"") for $i=1 to $Ax[0] $parsed=$parsed&ASC($Ax[$i]) next msgbox(1,"numbers",$parsed) ;IniWrite("C:\test\password.ini", "userdata", "pword", $parsed) AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
trids Posted May 18, 2004 Share Posted May 18, 2004 There's also a UDF for ROT13 encryption Link to comment Share on other sites More sharing options...
ezzetabi Posted May 18, 2004 Share Posted May 18, 2004 (edited) Or a quite poweful 448 bytes encryption program:http://www.cypherspace.org/adam/rsa/idea.htmlE.g. how to use it, after you FILEINSTALL() it of course ...$pass = "what you want";Max 128 chars $filename = "c:\this is an example\e.txt";The file to encrypt $mode = "+";or "-" usually + is used for encrypt, - for decrypt but it can be vice versa. Run(@comspec & " /c echo " & $pass & "|idea.com " & $mode & " " & FileGetShortName($filename)) Edited May 19, 2004 by ezzetabi Link to comment Share on other sites More sharing options...
Somerset Posted May 18, 2004 Share Posted May 18, 2004 (abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ) with these characters you can generate an encryption key all your own and make a new kinda encryption key every time you make a new script. in other words if someone some how cracks the code of the old one. each new script would have a new encryption key... stupid example letter (A) could have a possibility of having these as replacements (A) --------| zxvx | bxcwa |-- you can autoit generate them from the characters above, and also czczag | generate the length at random or set length. --------| etc... how many ever more you want.. you can do this for all letters and numbers and so on. since if everything is random autoit would generate a new key that you could incorperate into autoit... always remmber to compile autoit script that you want secure with some sorta password. so it would not be so easy to decompile... Link to comment Share on other sites More sharing options...
trids Posted May 18, 2004 Share Posted May 18, 2004 Nice link, ezzetabi ... ... PLEASE publish it in Script And Scraps as well. Link to comment Share on other sites More sharing options...
j.gilbert Posted May 18, 2004 Author Share Posted May 18, 2004 scriptkitty, that was EXACTLY what I was looking for. I can take this and run with it now. I forgot to specify earlier, but I also knew I'd be adding my own twist on further encrypting it. This is perfect. Thanks. I want to get this working right away and then I plan on looking at the other examples shown. Thanks to all. Jonathan Link to comment Share on other sites More sharing options...
scriptkitty Posted May 18, 2004 Share Posted May 18, 2004 Remember, I don't think this is good encryption, but it should be of help to learn AutoIt. Makes you learn Arrays, Concatination, and Loops. Besides what you already had in the script. With Passwords, I like to put in a delay, and a check to make sure only one instance of the program is running. AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
bcording Posted May 18, 2004 Share Posted May 18, 2004 There is of course this other encryption method http://www.autoitscript.com/forum/index.ph...0&hl=encryption Link to comment Share on other sites More sharing options...
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