ACalcutt Posted April 15, 2006 Share Posted April 15, 2006 hey guys....i am trying to convert this vbs script to au3DECLARE SUB PASS.FOUND (GUESS$)MAX.LENGTH = 8 GUESS$ = " " LENGTH = 1 CLS PRINT "Please enter your test password (up to 8 characters)... "; LINE INPUT PW$ CLS WHILE LENGTH <= MAX.LENGTH FOR I = 32 TO 126 MID$(GUESS$, 1, 1) = CHR$(I) PRINT GUESS$ IF GUESS$ = PW$ THEN PASS.FOUND (GUESS$) END IF NEXT I IF MID$(GUESS$, LENGTH, 1) = CHR$(126) THEN MID$(GUESS$, LENGTH, 1) = CHR$(32) LENGTH = LENGTH + 1 GUESS$ = GUESS$ + CHR$(32) END IF FOR J = 1 TO LENGTH - 1 IF MID$(GUESS$, J, 1) = CHR$(126) THEN MID$(GUESS$, J, 1) = CHR$(32) MID$(GUESS$, J + 1, 1) = CHR$(ASC(MID$(GUESS$, J + 1, 1)) + 1) END IF NEXT J WEND PRINT "The password was not found!" SUB PASS.FOUND (GUESS$) PRINT "The password is " + GUESS$ + "."; END END SUBthe closest i could get was this (since i dont know vb at all)$MAX = 8$GUESS = " "$LENGTH1 = 1$PW = InputBox("Please enter your test password (up to 8 characters)... ", "")WHILE $LENGTH1 <= $MAX FOR $I = 32 TO 126 StringMid($GUESS, 1, 1) = CHR($I) MsgBox(0, "", $GUESS) IF $GUESS = $PW THEN _FOUND($GUESS) EndIf NEXT IF StringMid ($GUESS, 1, 1) = CHR(126) THEN StringMid ($GUESS, $LENGTH1, 1) = CHR(32) $LENGTH1 =+ 1 $GUESS = $GUESS & CHR(32) ENDIF FOR $J = 1 TO $LENGTH1 - 1 IF StringMid ($GUESS, $J, 1) = CHR(126) THEN StringMid ($GUESS, $J, 1) = CHR(32) StringMid ($GUESS, $J + 1, 1) = CHR(ASC(StringMid ($GUESS, $J + 1, 1)) + 1) EndIf NEXTWENDMsgBox(0, "", "The password was not found!")Func _FOUND($GUESS) MsgBox(0, "", "The password is " & $GUESS & ".")EndFunci know my problems are the lines like this "MID$(GUESS$, 1, 1) = CHR$(I) "...i was not sure how to convert those to autoit properly Andrew Calcutt Http://www.Vistumbler.net Http://www.TechIdiots.net Its not an error, its a undocumented feature Link to comment Share on other sites More sharing options...
exodius Posted April 15, 2006 Share Posted April 15, 2006 How about a description of what you want this script to do? Link to comment Share on other sites More sharing options...
MHz Posted April 15, 2006 Share Posted April 15, 2006 hey guys....i am trying to convert this vbs script to au3the closest i could get was this (since i dont know vb at all)i know my problems are the lines like this "MID$(GUESS$, 1, 1) = CHR$(I) "...i was not sure how to convert those to autoit properlyVBS uses Mid(), not MID$(). Print, amother method that does not look VBS.This script looks partly like VBS, but not. Link to comment Share on other sites More sharing options...
randallc Posted April 15, 2006 Share Posted April 15, 2006 Hi,Did you try vaconvert.au3 first?VBScript to AutoIt ConverterBest, Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
ACalcutt Posted April 15, 2006 Author Share Posted April 15, 2006 (edited) Hi,Did you try vaconvert.au3 first?VBScript to AutoIt ConverterBest, Randallyes...i did try that...it didn't really help muchVBS uses Mid(), not MID$(). Print, amother method that does not look VBS.This script looks partly like VBS, but not.hmmm...i didn't even notice that it didn't have a $ in the reference to that functionhttp://www.w3schools.com/vbscript/func_mid.aspmaybe its classic basic?How about a description of what you want this script to do?basically its a brute force password program... i know that kind of stuff is looked down on here... basically me and a friend got into a conversation and i thought it would be something easy to make...(he is also trying to do it in php).. just for education... not planning to use it for anything other than to see if i can get something working. after trying to figure out how to do it myself and not really getting anywhere ( i have an idea of how to do it...just had trouble making it) i looked online the script above looked like something i could get an idea fromthat code came from here http://www.hackinthebox.org/modules.php?op...order=0&thold=0 Edited April 15, 2006 by ACalcutt Andrew Calcutt Http://www.Vistumbler.net Http://www.TechIdiots.net Its not an error, its a undocumented feature Link to comment Share on other sites More sharing options...
ACalcutt Posted April 15, 2006 Author Share Posted April 15, 2006 i never actually tried that code in vb... i guess its not vb?i tried to run that code...but it failedC:\Documents and Settings\Administrator>cscript c:\code.vbsMicrosoft ® Windows Script Host Version 5.6Copyright © Microsoft Corporation 1996-2001. All rights reserved.c:\code.vbs(1, 9) Microsoft VBScript compilation error: Syntax error Andrew Calcutt Http://www.Vistumbler.net Http://www.TechIdiots.net Its not an error, its a undocumented feature Link to comment Share on other sites More sharing options...
Simucal Posted April 15, 2006 Share Posted April 15, 2006 Personally... It would take less time to just write the thing fresh in AutoIt then try and port over some VBS stuff. AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
ACalcutt Posted April 15, 2006 Author Share Posted April 15, 2006 i took a look at my old dos PowerBasic help file.... mid$ is a BASIC function...not vb... MID$ function Function: Returns a portion of a string. Syntax: s$ = MID$(string expression, start [, length]) MID$ returns a substring of string expression that is length characters long and begins at position start. If length is omitted, or there are fewer than length characters to the right of the character at start, all remaining characters of string expression, including the character at start, are returned. If start is greater than the length of string expression, MID$ returns a null string. See also: MID$ statement Andrew Calcutt Http://www.Vistumbler.net Http://www.TechIdiots.net Its not an error, its a undocumented feature Link to comment Share on other sites More sharing options...
Simucal Posted April 15, 2006 Share Posted April 15, 2006 i took a look at my old dos PowerBasic help file.... mid$ is a BASIC function...not vb...Yes, which is just like StringMid() in AutoIt.. but like I said, It would probably be best to write some basic autoit scripts, take the AutoIt 1-2-3 tutorial, read the help file a lot.. and write this again, fresh. AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
ACalcutt Posted April 15, 2006 Author Share Posted April 15, 2006 (edited) Personally... It would take less time to just write the thing fresh in AutoIt then try and port over some VBS stuff. well...my origional idea that i was having trouble would work something like this starts at 1 character goes from CHR(32) - CHR(127) if no match is found the first character will go back to the start(CHR(32) and then it will add a second character now the second character will go from CHR(32) - CHR(127) when the second row reaches chr(127) it will incremet the first row one...and then second character will go from CHR(32) - CHR(127) again that will continue untill the first row is CHR(127) and the second row CHR(127) then it will add a 3rd row etc.. etc.. now to get that into a script -edit- @Simucal - trust me...the autoit help file is my best friend :-)....the thing i am having the most trouble with is making it so i dont need to know the amount of characters i origionaly had something like this, i got stuck when i needed to go to the next character $start = 32 $end = 127 $current = $start $startwith = "" $matchword = test Func _Match($startwith, $matchword) While $current =< $end If $matchword = $startwith & Chr($current) Then Exit $current += 1 WEnd $current = $start EndFunc and yes i know that function isn't called...i never got that far Edited April 15, 2006 by ACalcutt Andrew Calcutt Http://www.Vistumbler.net Http://www.TechIdiots.net Its not an error, its a undocumented feature Link to comment Share on other sites More sharing options...
RazerM Posted April 15, 2006 Share Posted April 15, 2006 this isn't in a function but it finds the first letter$start = 32 $end = 127 $current = $start $startwith = "" $matchword = "t" While $current <= $end If $matchword == $startwith & Chr($current) Then MsgBox(0,0,Chr($current)) Exit EndIf $current += 1 WEnd $current = $start My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop. Link to comment Share on other sites More sharing options...
ACalcutt Posted April 17, 2006 Author Share Posted April 17, 2006 (edited) incase anyone is is curios...this is how the program has ended up so far my friend figured out the basic idea in php expandcollapse popup<?php //C2006 Code Phil Ferland (Longbow) //C2006 Shell Andrew Calcutt (TheMHC) // defind variables $A = 33; $B = 33; $C = 33; $D = 33; $E = 33; $F = 33; //start alg with loop while($F < 127 ) { // do A digit $A++; print "$F $E $D $C $B $A<BR>"; //test for 126 in A if($A <= 126) { continue; } //test for 126 in B elseif($B <= 126) //intrement $B if not 127 { $A=33; $B++; print "$F $E $D $C $B $A<BR>"; continue; } //test for 126 in C elseif($C <= 126) //incriment C { $B=33; $C++; print "$F $E $D $C $B $A<BR>"; continue; } //test for 126 in D elseif($D<=126) //incriment D { $C=33; $D++; print "$F $E $D $C $B $A<BR>"; continue; } //test for 126 in E elseif($E<=126) //Increment E { $D=33; $E++; print "$F $E $D $C $B $A<BR>"; continue; } //test for 126 in F elseif($F<=126) //incriment F { $E=33; $F++; print "$F $E $D $C $B $A<BR>"; continue; }; } ?> and i convered his php into my on autoit scrip expandcollapse popup;------------------------------------------------------------ ;C2006 PHP Code Phil Ferland (Longbow) ;C2006 Converted to AutoIt by Andrew Calcutt (TheMHC) ;------------------------------------------------------------ #include <GuiConstants.au3> #include <File.au3> #include <Array.au3> ; defind variables Dim $POS[1] Dim $loop = 1, $line = 0 Dim $file = "log.txt" _FileCreate($file) ;------------------------------------------------------------ $loopsize1 = InputBox("Question", "What is the maximum number of characters") For $l = 1 to $loopsize1 _ArrayAdd($POS, 32) Next For $loopsize = 1 to $loopsize1 While $POS[$loopsize] <= 127 $ContinueLoop = _Increment($POS[$loop], $POS[$loop - 1]) If $ContinueLoop = 1 Then $loop = 1 ContinueLoop EndIf $loop += 1 WEnd Next Exit Func _Increment(ByRef $increment, ByRef $reset) If $increment <= 127 Then ;test for 127 in $increment var $line += 1;increment $line number $write = "";clear write var For $w = 1 to $loopsize $write = Chr($POS[$w]) & $write Next FileWrite($file, $line & ": " & $write & @CRLF) $reset = 32; set $reset var to 32 $increment += 1; incriment $increment var Return 1 Else Return 0 EndIf EndFunc ;==>_Increment Edited April 17, 2006 by ACalcutt Andrew Calcutt Http://www.Vistumbler.net Http://www.TechIdiots.net Its not an error, its a undocumented feature 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