View unanswered posts | View active topics It is currently Thu, 2017/12/14 11:04 am



Reply to topic  [ 3 posts ] 
OTFBrutus - process multiple password patterns at once 
Author Message

Joined: Thu, 2015/04/02 6:08 am
Posts: 2
Unread post OTFBrutus - process multiple password patterns at once
Hi, first of all thanks for the awesome piece of software.

I have spent the past few days trying to find the password for a true-crypt volume, it's a rather long password but I have a pretty good idea of the pattern(s) that it should follow. One problem I'm having is that in order to cut down on the total amount of passwords generated per pattern I am having to create quite a few patterns to meet specific options of what it may be without too many irrelevant passwords being generated. At the moment I have 12 different patterns in one notepad file and to create a wordlist I am manually copy pasting each one into the software then saving a wordlist and updating that same wordlist with each next pattern.

This is actually still creating quite a lot of 'junk' passwords which I know it will not be, I could further refine the patterns but this would at least triple the amount of patterns, also if I run the wordlist and don't find the password I am then making small tweaks and have to create the wordlist all over again by doing this copy - paste method.

Basically I want to know if there is a way to either enter more than 1 pattern at a time into the text field, or even better would be a way to load a 'pattern list' and then process them all into one wordlist. It would be great if anyone knows of a way to do this, or even if it could be considered for an update in the future :) Alternatively if anyone knows a different software which can do similar word lists from patterns like this in larger amounts at a time that may be helpful.


Last edited by kalipo on Sun, 2015/04/05 8:58 am, edited 1 time in total.



Thu, 2015/04/02 7:27 am
Profile

Joined: Thu, 2015/04/02 6:08 am
Posts: 2
Unread post Re: OTFBrutus - process multiple password patterns at once
Hi again :)

I ended up creating an autoit script which does the job okay. If anyone else wants to try here it is.

(Tested with OTFBrutusGUI v0.2.0.3 on windows 8.1 64bit, if OTFBrutusGUI is run in administrator mode then it won't work unless you run the script in administrator mode too.)

.au3 file in rar attached to post (you will need to install autoit)

exe file can be downloaded here: https://www.sendspace.com/file/gtd4n9

or here is the code to make the script yourself

Code:
#include <FileConstants.au3>
#include <MsgBoxConstants.au3>
#include <File.au3>

Script()

Func Script()
     MsgBox($MB_OK, "OTFBrutus Script", "Make sure OTFBrutusGUI is open and the password pattern option is selected." & @LF & @LF & "Password patterns must be in a .txt file, one per line. Empty lines are OK." & @LF & @LF & "Word list will be saved in the same directory as the pattern file and named originalfile_wordlist.txt.")

    ; Create a constant variable in Local scope of the message to display in FileOpenDialog.
    Local Const $sMessage = "Select the text document containing password patterns."
    ; Display an open dialog to select text document.
    Local $hFileOpen = FileOpenDialog($sMessage, @WindowsDir & "\", "Text Documents(*.txt)", $FD_FILEMUSTEXIST)
   ; Display error if no file selected.
    If @error Then
        MsgBox($MB_SYSTEMMODAL, "Error", "No file selected. Script will exit.")
      Exit
    Else

   ; Determine directory and filename for the word list from the file selected (same directory and name is filename_wordlist)
   Local $sDir = StringTrimRight ($hFileOpen, (StringLen ($hFileOpen)) - (StringInStr ( $hFileOpen, "\", 0, - 1)))
   Local $sFilename = StringTrimLeft ( $hFileOpen, (StringInStr ( $hFileOpen, "\", 0, - 1)) )
        $sFilename = StringTrimRight ($sFilename, (StringLen ($sFilename)) - (StringInStr ( $sFilename, ".", 0, - 1)) + 1) & "_wordlist"

   ; Check if word list already exists and prompt to overwrite or append
   If FileExists ($sDir & $sFilename & ".txt") Then
     Local $iContinue = MsgBox($MB_YESNOCANCEL, "File Exists - Overwrite?", "File: '" & $sDir & $sFilename & ".txt' already exists." & @LF & @LF & "Overwrite the file? Press Yes" & @LF & "Append to the file? Press No" & @LF & "Exit the script? Press Cancel")
     If $iContinue = 2 Then ; Exit if cancel selected
       Exit
     EndIf
   Else
     Local $iContinue = 7
   EndIf

   ; Loop to create word list for each password pattern in file
     For $i = 1 to _FileCountLines($hFileOpen)
       $line = FileReadLine($hFileOpen, $i)
       If $line = Not Null Then ;Allows for empty lines in pattern file
       WinActivate ( "OTFBrutusGUI" )
       WinWaitActive( "OTFBrutusGUI" )
       ControlSetText ( "OTFBrutusGUI",  "", "[CLASS:Edit; INSTANCE:4]", $line, 1) ;Enter pattern text
       Sleep(100)
       ControlClick( "OTFBrutusGUI", "", "[CLASS:Button; INSTANCE:35]", "left") ;Click Save
       Sleep(100)
       WinWaitActive( "Select a File to save as" )
       Sleep(100)
       ControlSetText ( "Select a File to save as",  "", "[CLASS:Edit; INSTANCE:1]", $sDir & $sFilename, 1) ;Enter filename
       Sleep(100)
       ControlClick( "Select a File to save as", "", "[CLASS:Button; INSTANCE:1]", "left") ;Click Save
       Sleep(1000)
       ;Overwrite or append if file already exists
       If ControlCommand("File Exists - Overwrite?", "", "[CLASS:Button; INSTANCE:2]", "IsEnabled", "") Then ;Check for overwrite dialogue
         If $iContinue = 6 Then ; Check if overwrite option was enabled
                ControlClick( "File Exists - Overwrite?", "", "[CLASS:Button; INSTANCE:1]", "left") ;Select yes (overwrite)
                $iContinue = 7 ; Disable overwrite for remaining patterns
              Else
              ControlClick( "File Exists - Overwrite?", "", "[CLASS:Button; INSTANCE:2]", "left") ;Select no (append)
            EndIf
         EndIf
   ;Check if word list is complete
       While (StringinStr((ControlGetText( "OTFBrutusGUI", "", "[CLASS:Edit; INSTANCE:5]")), "Complete")) = 0
         Sleep(500)
       WEnd
     EndIf
     Sleep(1000)
     Next ;Move to next pattern
    EndIf
   ;Display message when all patterns complete
   msgbox(0,"Job Done.", "Word List '" & $sdir & $sFilename & ".txt' complete.")
EndFunc



Enjoy.

Edit: Changed the script slightly to add some sleep timers and fixed small bug. Worked great today to create a word list from 135 different password patterns! (Created with another script :D - still no luck with the password :\)


Attachments:
OTFBrutus_pattern_script_1.1_AU3.rar [1.45 KiB]
Downloaded 399 times
Sat, 2015/04/04 6:36 am
Profile
Site Admin

Joined: Sun, 2005/04/03 7:02 pm
Posts: 302
Location: Los Angeles, CA USA
Unread post Re: OTFBrutus - process multiple password patterns at once
Yeah, sorry, there is no built in way to do this but thanks for posting your script. For other software options, you might want to try a larger forum, such as Wilders Security. I'm pretty much the only one posting here.


Mon, 2015/04/06 10:24 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software