testingtest Posted February 23, 2007 Share Posted February 23, 2007 Hi it's me again. I seen a few threads about autoit being cracked so I decided to make this. I hope it helps or gives you an idea of how to make the files less crackable. I know this isn't going to stop someone who is smart and with me providing this source it makes it even easier for them. I though I would share it anyways. This is the first script to run CODE#include <GUIConstants.au3> #include <String.au3> Opt("GUIOnEventMode", 1) $GUI = GUICreate("Password Creator", 251, 93, 310, 249) $Pass = GUICtrlCreateInput("password", 8, 32, 233, 21) $Ok = GUICtrlCreateButton("&OK", 86, 64, 75, 25, 0) $Cancel = GUICtrlCreateButton("&Cancel", 167, 64, 75, 25, 0) $Label = GUICtrlCreateLabel("Enter password", 8, 12, 77, 17) GUICtrlSetOnEvent($Ok , "_Password") GUICtrlSetOnEvent($Cancel , "_Exit") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUISetState(@SW_SHOW) While 1 Sleep(1000) WEnd Func _Password() If GUICtrlRead($Pass) = "" Then FileWrite("Characters only.txt" , _StringEncrypt(1 , GenUnique(1) , "2351Ai672277171A133221i062007AiVMKBWQYRC" , 1) & @CRLF & "This is for you to put in your script it will be decrypted later") MsgBox(0 , "Random" , "Random Password Generated") Else _Create() EndIf EndFunc Func _Create() $String = _StringEncrypt(1 , GUICtrlRead($Pass) , "2351Ai672277171A133221i062007AiVMKBWQYRC" , 1) FileWrite("Your Custom Password.txt" , $String & @CRLF & "This is for you to put in your script it will be decrypted later") MsgBox(0 , "Done" , "Your password is done") EndFunc Func GenUnique($iType = 1) ;(1) = normal - Characters and numbers ;(2) = integer - Numbers only ;(3) = character - Characters only, a-z, A-Z $set1 = Random(round(sqrt(@SEC)), round(sqrt(@SEC*10)), 1) $set2 = Random(round(sqrt(DriveGetSerial(@HomeDrive))), random(round(sqrt($set1)), $set1*2, 1),1) $set3 = Random(1, 10, 1)*($set1+@MIN+@HOUR) $set4 = Random($set1+$set2+$set3, random(2, 5, 1)*($set1+$set2+$set3+@MDAY), 1) $finaly = round($set1+$set2+$set3+$set4)+@YEAR if $iType = 1 Then $set1 = Chr(random(65, 89, 1)) $set2 = Chr(random(97, 122, 1)) $set3 = $set1&$set2 $finaly = $finaly&$set3&DriveGetSerial(@HomeDrive)&$set1&@MIN&@SEC&@MDAY&$set2&@HOUR&@YEAR&$set3 for $i = 1 to random(1, 10, 1) $finaly = $finaly & Chr(random(65, 89, 1)) Next return $finaly elseif $iType = 2 Then $set1 = random(65, 89, 1) $set2 = random(97, 122, 1) $set3 = $set1&$set2 $finaly = $finaly&$set3&DriveGetSerial(@HomeDrive)&$set1&@MIN&@SEC&@MDAY&$set2&@HOUR&@YEAR&$set3 for $i = 1 to random(1, 10, 1) $finaly = $finaly & random(1, 10, 1) Next return $finaly Else $max = 38 Dim $avChar[52] ;65 - 90;97-122 For $i = 0 to 25 $avChar[$i] = Chr($i+65) Next For $i = 26 to 51 $avChar[$i] = Chr($i+71) Next $set1 = Helper1(@SEC&@MIN&@HOUR&@WDAY&@MDAY&@YEAR&@MON) $set2 = Helper1(random(@SEC, random(@SEC*2, @SEC*5), 1)) $set3 = Helper1(DriveGetSerial(@HomeDrive)*@MIN) $set4 = Helper1(sqrt(DriveGetSerial(@HomeDrive)+@SEC)) return Fixer($set1&$set4&$set2&$set3) EndIf EndFunc Func Helper1($str) $max = 38 Dim $avCur[$max] $string1 = StringSplit($str, "") For $i = 1 to $string1[0] Select Case $string1[$i] = "1" $avCur[$i] = Chr(random(65, random(65, 90, 1), 1)) Case $string1[$i] = "2" $avCur[$i] = Chr(random(97, random(97, 122, 1), 1)) Case $string1[$i] = "3" $avCur[$i] = Chr(random(65, random(65, 90, 1), 1)) Case $string1[$i] = "4" $avCur[$i] = Chr(random(97, random(97, 122, 1), 1)) Case $string1[$i] = "5" $avCur[$i] = Chr(random(65, random(97, 122, 1), 1)) Case $string1[$i] = "6" $avCur[$i] = Chr(random(65, random(65, 90, 1), 1)) Case $string1[$i] = "7" $avCur[$i] = Chr(random(65, random(97, 122, 1), 1)) Case $string1[$i] = "8" $avCur[$i] = Chr(random(65, 90, 1)) Case $string1[$i] = "9" $avCur[$i] = Chr(random(65, random(65, 90, 1), 1)) Case $string1[$i] = "0" $avCur[$i] = Chr(random(97, random(97, 122, 1), 1)) EndSelect Next local $string For $i = 1 to $string1[0] $string &= $avCur[$i] Next Return $string EndFunc Func Fixer($string) $str = StringSplit($string, "") for $i = 1 to $str[0] ;32 - 64 for $a = 32 to 64 if $str[$i] = Chr($a) Then $str[$i] = "" Else EndIf for $b = 91 to 96 if $str[$i] = Chr($ Then $str[$i] = "" EndIf Next Next Next Local $text For $i = 1 to $str[0] $text &= $str[$i] Next Return $text EndFunc Func _Exit() Exit EndFunc this is the second script to run all it does is tell you the decrypted text CODE#include <String.au3> $Input = InputBox("Helper" , "enter the generated passwords here") $String = _StringEncrypt(0 , $Input , "2351Ai672277171A133221i062007AiVMKBWQYRC" , 1) FileWrite("gen decrypted.txt" , $String & @CRLF & "this is for if you have made a random serial") MsgBox(0 , "Done" , "file is done writing") and this is the last script to run CODE#include <GUIConstants.au3> #include <String.au3> Opt("GUIOnEventMode", 1) $Protected = "CA6B7803D7C157F9839161DE18D4D3F9AF696171CBEF250C" ;you would put the encrypted text here $GUI = GUICreate("Please insert serial", 251, 93, 310, 249) GUISetIcon("D:08.ico") $Pass = GUICtrlCreateInput("", 8, 32, 233, 21) $Ok = GUICtrlCreateButton("&OK", 86, 64, 75, 25, 0) $Cancel = GUICtrlCreateButton("&Cancel", 167, 64, 75, 25, 0) $Label = GUICtrlCreateLabel("Enter Serial", 8, 12, 58, 17) GUICtrlSetOnEvent($Ok , "_Password") GUICtrlSetOnEvent($Cancel , "_Exit") GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") GUISetState(@SW_SHOW) While 1 Sleep(1000) WEnd Func _Password() $String = _StringEncrypt(0 , $Protected , "2351Ai672277171A133221i062007AiVMKBWQYRC" , 1) If GUICtrlRead($Pass) = "" Then MsgBox(16 , "Error" , "please enter serial") If GUICtrlRead($Pass) = $String Then MsgBox(0 , "test" , "Yippy you did it") Else MsgBox(16 , "Error" , "an error occurred") EndIf EndFunc Func _Exit() Exit EndFunc I hope this gives people more of an idea to protect there scripts Link to comment Share on other sites More sharing options...
Richard Robertson Posted February 23, 2007 Share Posted February 23, 2007 I'm confused as to what this actually does. It looks like a large string encryption. I also noticed that you hard coded a drive relative direction string. D:08.ico is a weird thing to hard code. That will take the icon 08 from the active directory of the D drive. Link to comment Share on other sites More sharing options...
testingtest Posted February 23, 2007 Author Share Posted February 23, 2007 (edited) I'm confused as to what this actually does. It looks like a large string encryption. I also noticed that you hard coded a drive relative direction string. D:08.ico is a weird thing to hard code. That will take the icon 08 from the active directory of the D drive. well run the scripts in order. First you create your password with the first script, the second script is only to decrypt your encryption if you forgot it. You should then see a few text files it made open this one "Your Custom Password" and copy the first line and then open the last script with your editor and change this "$Protected = Your Custom Password" then run it. sorry for my bad english Ive been getting better with grammer I hope. [easy steps to follow if I confused you] - run the first script make a password - open the new text file it made and copy the first line - paste the line in the third script $Protected = here - run the third script and enter the password you encrypted this method is weak all it is doing is decrypting the encryption inside of the script. I think I can make it more complicated for the person trying to crack the .exe Edited February 23, 2007 by testingtest Link to comment Share on other sites More sharing options...
testingtest Posted February 23, 2007 Author Share Posted February 23, 2007 (edited) Mr Icekirby did you get it working, I forgot to mention this is not to protect .exes from been cracked but stop passwords from being cracked, sorry I was a bit tired oh about the icon koda does that for some odd reason it sets the icon Edited February 23, 2007 by testingtest Link to comment Share on other sites More sharing options...
testingtest Posted February 25, 2007 Author Share Posted February 25, 2007 I think since not really anyone replyed they think this is not useful or maybe you don't know how it works. any suggestions of how to protect a password inside a script would be great. I don't think this would help much seeing as they could easly reverse the code. I think that if you #include <your file.exe> then they can't crack it becuase the include is safed or stored anywere except inside the autoit exe atleast I think thats how its done 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