Berend Jan Posted April 27, 2005 Posted April 27, 2005 hi guys, I'm making a script in which i need to do 1 action for about 60 times. and for every single time i need the corresponding username and password. I want to put this into a ini file so that the script can IniRead it. But how do i put the info into the ini file? this is what i have: global $NumberOfUsers = IniRead ( '.\bankusers.ini', 'Header', 'NumberOfUsers', 1 ) global $MobUser = IniRead ( '.\bankusers.ini', 'User' & $UserNumber, 'MobUser', "Unknown User" ) global $MobPass = IniRead ( '.\bankusers.ini', 'User' & $UserNumber, 'MobPass', "" ) Func GetNextUser ( ) $UserNumber = $UserNumber + 1 if $UserNumber > $NumberOfUsers then $UserNumber = 1 EndFunc ; GetNextUser How do I insert the info into the ini file so that it's readable . hope you guys can help me. Berend Jan
Wb-FreeKill Posted April 27, 2005 Posted April 27, 2005 (edited) So the ini file would look something like this:?Name of ini file: bankusers.ini[Header] NumberOfUsers = 21 [User1] MobUser=??? MobPass=mypass [User2] MobUser=??? MobPass=mypass [User3] MobUse =??? MobPass=mypassEDIT: Created like this, it would be easy to read and get the users info under the different sectionsIf it's importans and personal password, you could easyly encrypt them, before writing it in the ini file.. Edited April 27, 2005 by Wb-FreeKill
Berend Jan Posted April 27, 2005 Author Posted April 27, 2005 So the ini file would look something like this:?Name of ini file: bankusers.ini[Header] NumberOfUsers = 21 [User1] MobUser=??? MobPass=mypass [User2] MobUser=??? MobPass=mypass [User3] MobUse =??? MobPass=mypassEDIT: Created like this, it would be easy to read and get the users info under the different sectionsIf it's importans and personal password, you could easyly encrypt them, before writing it in the ini file..<{POST_SNAPBACK}>Great. that was what i was looking for:) thx
Xavier Posted April 27, 2005 Posted April 27, 2005 If it's importans and personal password, you could easyly encrypt them, before writing it in the ini file..<{POST_SNAPBACK}>Which encryption are you reffering to?In my case , i use a file crypted with EFS in wich i generate dummies ascii caracters before and after the password but i feel like it is not secure enough.Xavier
SvenP Posted April 27, 2005 Posted April 27, 2005 Which encryption are you reffering to?In my case , i use a file crypted with EFS in wich i generate dummies ascii caracters before and after the password but i feel like it is not secure enough.Xavier<{POST_SNAPBACK}>You could try MD5 hashing. ( http://www.autoitscript.com/forum/index.php?showtopic=10590) -Sven
MSLx Fanboy Posted April 28, 2005 Posted April 28, 2005 Again, MD5 does not allow for "decryption". It gives you a value of it. For Example, say you showed me a bottle of water, I tell you that it is worth $1.29. You go and ask someone for $1.29, they will not be able to figure out what the $1.29 is for, unless you show them the bottle of water that you just showed me. It's a one way thing, its practically impossible with today's computing resources to "decrypt" (or in other words find the original string by hashing each potential one and comparing) an MD5 string. The _StringEncrypt() will work for the most part, unless its very private, in which you might want to look for another algorithm, or a series of algorithms. If a username is specific to a computer or user, you may want to look into using the @ComputerName or @UserName macro. I use that a lot for basic licensing programs... Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
Ejoc Posted April 28, 2005 Posted April 28, 2005 Off topic, but man do I get scared when I see "bank" and store usernames and passwords in an ini file. Makes me think it would be safer and more successful to walk into a bank with a laptop then a gun... Corse I tend to be paranoid when it comes to passwords and encryption. Don't mind me just bableing Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs
Xavier Posted April 28, 2005 Posted April 28, 2005 Off topic, but man do I get scared when I see "bank" and store usernames and passwords in an ini file. Makes me think it would be safer and more successful to walk into a bank with a laptop then a gun... Corse I tend to be paranoid when it comes to passwords and encryption. Don't mind me just bableing <{POST_SNAPBACK}>hi,Have you got a secure way to do it?a+XavierPS: inow use _StringEncrypt (works fine)
Ejoc Posted April 28, 2005 Posted April 28, 2005 (edited) hi,Have you got a secure way to do it?a+XavierPS: inow use _StringEncrypt (works fine)<{POST_SNAPBACK}>The 100% most secure way is, dont store passwords. I worked at a company as part of its Network Intrusion team, and I basiclly was paid to try to break into it's own systems to find out how to secure them better so real hackers couldn't get it. If someone finds a way into your system, even if its READ_ONLY, they could gain 60 user accounts and passwords, and chances are those accounts could have more access. Then you are in a world of hurt. Any method you use that would Automate sending a "plain-text" password could be compromised and the passwords retrieved.If you encrypt the password and have the script supply a key to decrypt it back into plain text, the key used can be seen, and then you can decrypt the password.That's why I don't store passwords, I bite the bullet and manually enter them. Edited April 28, 2005 by Ejoc Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs
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