Forgotten two digits of an encrypted disk image's passphrase!

Discussion in 'Mac Basics and Help' started by J@ffa, Oct 21, 2007.

  1. J@ffa macrumors 6502a

    J@ffa

    Joined:
    Jul 21, 2002
    Location:
    Behind you!
    #1
    Stupidly, I set up an encrypted sparse disk image and used OS X's password assistant thingy to think up a password for it. I'd forgotten it, but I found the piece of paper where I scribbled a reminder. It basically goes like this;

    longbunchofwordsgoeshere####anotherfewlongwordshere

    I've forgotten the second two numbers of the ## in the middle. Is there anything I can use to, I guess, bruteforce just those two numbers without having to sit there typing all the possible combinations? Thanks!
     
  2. VoodooDaddy macrumors 65816

    Joined:
    May 14, 2003
    #2
    Isnt there just 100 possible combinations, 00-99? How long would that take to do?
     
  3. notsofatjames macrumors 6502a

    notsofatjames

    Joined:
    Jan 11, 2007
    Location:
    Wales, UK
    #3
    cant automater do it ? I've never found a use for it yet, but this sounds like the sort of thing its for... cracking passwords.
     
  4. CRAZYBUBBA macrumors 65816

    CRAZYBUBBA

    Joined:
    Mar 28, 2007
    Location:
    Toronto/Houston
    #4
    lol, it sounds easy enough but automator actually can only do things that its been trained to do.. useless for me but I love the cute icon.
     
  5. jellomizer macrumors 6502

    jellomizer

    Joined:
    Sep 12, 2006
    Location:
    Upstate NY
    #5
    Well there is no easy way. But here is one way you can at lest get it.

    Copy and past the code below. Tabbing is very important.
    replace longbuchofwordsgoeshere and anotherfewlongwordshere with the two parts of your phrase.

    Code:
    #!/usr/bin/python
    
    FirstPart="longbunchofwordsgoeshere"
    SecondPart="anotherfewlongwordshere"
    ValidRange = ["(", ")", "*", "+", ",", "-", ".", "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", ";", "<", "=", ">", "?", "@", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "[", "\\", "]", "^", "_", "`", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "{", "|", "}", "~"]
    File = open("FindPossiblecCmbination.txt","a")
    cnt = 0
    for i in ValidRange:
    	for j in ValidRange:
    		File.write(FirstPart+i+j+SecondPart+"\n")
    	cnt=cnt+1
    	print "%s%%"%(float(cnt)/float(len(ValidRange))*100.0) 
    
    File.close()
    
    save the file in raw text mode as in your home directory as FindKey.py
    go into the terminal app Applications->Utilities->Terminal

    Type
    Code:
    chmod 755 FindKey.py
    ./FindKey.py
    
    Use text edit and open up the file called FindPossiblecCmbination.txt located in your home directory Open that up and Cut and Past each combination.
     
  6. 119576 Guest

    119576

    Joined:
    Aug 6, 2007
    #6
    00-99 is a whole lot more than 100 combinations haha!

    you have to consider 01, 02, 03, 56, 58, 72, and other numbers where both digits are different.
     
  7. mac-convert macrumors 6502a

    mac-convert

    Joined:
    Nov 2, 2006
    Location:
    Are we there yet?
    #7
    And, uh, how many combo's would you think there would be between zero and 99? :eek:
     

Share This Page