ecstatic Posted May 10, 2009 Share Posted May 10, 2009 (edited) Hey guys im trying to generate a password and username based off A-Z. Im trying to get it to then save the generated password to a permeate variable. Heres my code sofar. expandcollapse popup$UsernameLength = Random(10, 15) $PassLength = Random(10, 15) \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ For $x2 = 0 To $UsernameLength $UsernameSaved = Chr(Random(Asc("A"), Asc("Z"), 1)) Send($UsernameSaved) Iniwrite("Config.ini", "Account", "Username", $UsernameSaved) Next Sleep(500) Send("{TAB}") Sleep(500) For $x3 = 0 To $PassLength $SavedPassword = Chr(Random(Asc("A"), Asc("Z"), 1)) Send($SavedPassword) $SavedPassword = $Password Iniwrite("Config.ini", "Account", "Password", $Password) Next Send("{TAB}") Sleep(500) Send($Password) Sleep(500) Mouseclick("Left", 703, 580) Sleep(500) Mouseclick("Left", 597, 524) Send($SavedPassword & "@" & "gmail.com") Sleep(500) Send($SavedPassword & "@" & "gmail.com") Sleep(500) Mouseclick("Left", 205, 536) Sleep(500) Mouseclick("Left", 390, 301) Send($SavedPassword) Sleep(500) Send("{Enter}") Sleep(500) As you can see, it is generating an account. Non Malicous dont worry. The account layout is like so. Account: ***Generated by my script*** then saved to variable $UsernameSaved Pass: ****Generated by my script *** Then saved to variable $SavedPassword Pass Confirmation: $SavedPassword It uses tab to navigate, however it is incorrectly saving my generated username and password to a variable. Whats wrong with the script? Edited May 10, 2009 by ecstatic Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 10, 2009 Share Posted May 10, 2009 (edited) i don't see where you are GETTING the password\username EDIT alright i see it now its at the VERY top above the other code... im thinking an error in the Send parts.. or the Chr part Edited May 10, 2009 by CodyBarrett [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
ecstatic Posted May 10, 2009 Author Share Posted May 10, 2009 0.o' How do i fixi? Link to comment Share on other sites More sharing options...
stampy Posted May 10, 2009 Share Posted May 10, 2009 Your sending the characters and saving before generating the entire string. Try something like this instead: (not tested code) expandcollapse popup$UsernameLength = Random(10, 15) $PassLength = Random(10, 15) ;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $UsernameSaved = CreateRandom($UsernameLength) Iniwrite("Config.ini", "Account", "Username", $UsernameSaved) $SavedPassword = CreateRandom($PassLength) Iniwrite("Config.ini", "Account", "Password", $SavedPassword) Send($UsernameSaved) Sleep(500) Send("{TAB}") Sleep(500) Send($SavedPassword) Iniwrite("Config.ini", "Account", "Password", $SavedPassword) Send("{TAB}") Sleep(500) Send($Password) Sleep(500) Mouseclick("Left", 703, 580) Sleep(500) Mouseclick("Left", 597, 524) Send($SavedPassword & "@" & "gmail.com") Sleep(500) Send($SavedPassword & "@" & "gmail.com") Sleep(500) Mouseclick("Left", 205, 536) Sleep(500) Mouseclick("Left", 390, 301) Send($SavedPassword) Sleep(500) Send("{Enter}") Sleep(500) Func CreateRandom($length) For $i = 0 to $length $chr = Chr(Random(Asc("A"), Asc("Z"), 1)) $returned &= $chr Next Return $returned EndFunc Link to comment Share on other sites More sharing options...
ecstatic Posted May 11, 2009 Author Share Posted May 11, 2009 Worked! THanks! 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