Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Crunch - Scripts for Password List Generation

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Location
    USA
    Posts
    47

    Default Crunch - Scripts for Password List Generation

    I was working with WPA passwords and ended up writing a couple of shell scripts that use Crunch to generate password lists. I thought the community might find them useful...

    passthrough.sh
    I like passing crunch output to aircrack-ng (it saves disk space and time), but I always forget the commands.
    This script remembers the arguments so I don't have to.

    input:
    • location of cap file,
    • ESSID of access point,
    • minimum length,
    • maximum length,
    • charset (typed)


    output:
    • aircrack-ng's output


    Note: Ctrl+C then Ctrl+Z will stop the script (not sure why.. oh well)

    passthrough.sh is available here (pastebin)

    phone.sh
    Note: This is only for U.S. cities -- for now
    I've found that phone numbers are a common password for access points. I considered creating every possible phone number for an area code ([areacode]####### -- 3 digit areacode, then 7 digit number), but that creates a LOT of numbers that aren't valid (and a lot of numbers in general).

    This script uses an online database to find only valid areacodes and prefixes for whatever city you're searching for.
    For example, If you type in 'chicago' as the city, it will find all areacodes + prefixes within that area -- not just 'guessing' but the actual prefixes used by the city. The script then uses Crunch to generate the last 4 digits.

    The difference between generating all possible numbers and only numbers within valid prefixes can be a HUGE difference! In Albuquerque (one areacode), all possible numbers means 10,000,000 phone numbers; using this script, the valid list was shortened to 2,500,000 phone numbers. This script helped me avoid 7.5 million 'bad phone numbers'!.

    Updated!
    Included a menu system to select phone number format, also fixed an error for cities with spaces in the name.

    Updated Again!
    phone.sh now has the option to passthrough (pipe) to aircrack-ng. When prompted, enter an .CAP file containing the 4-way handshake, and the SSID of the access point, and the script will pipe all output to aircrack-ng in hopes of cracking the WPA key. This saves time and memory.
    Bug fixed: When generating phone numbers without area codes, the script would sometimes generate duplicates. This has been resolved (sort/uniq removes any duplicates before generating).


    input
    • name of the city
    • one of 5 telephone number formats:
      • (555)555-1234
      • 555-555-1234
      • 5555551234
      • 555-1234
      • 5551234
    • Do you want to pipe the results to aircrack-ng? (y/n)
      • (if yes) Enter path to .CAP file and SSID of access point


    output
    • every possible valid phone number for that city is..
    • ...saved to phone.txt if aircrack passthrough is not selected
    • ...piped to aircrack-ng to crack a 4-way handshake instead.


    Note: Ctrl+C works, but you have to wait for aircrack to exhaust the current list. (usually takes about 20 seconds).

    phone.sh (5th revision) is available here (pastebin)


    Feel free to expand/edit/fix these scripts as you see fit.

    Enjoy!
    Last edited by derv82; 02-11-2011 at 05:50 PM. Reason: Updated phone.sh (again!)

  2. #2
    Super Moderator Archangel-Amael's Avatar
    Join Date
    Jan 2010
    Location
    Somewhere
    Posts
    8,012

    Default Re: Crunch - Scripts for Password List Generation

    Moved to a more suitable section.

  3. #3
    Senior Member fnord0's Avatar
    Join Date
    Jul 2008
    Posts
    144

    Default Re: Crunch - Scripts for Password List Generation

    both of these scripts are great, and have saved me lots of time. I _REALLY_ dig the phone.sh script, that is just awsome! =) -props- regarding the passthrough.sh script - I've been messing with passing everything to aircrack-ng-cuda and pyrit(cuda-based). again very cool script. many thanks for your time and effort!
    Last edited by fnord0; 07-26-2010 at 02:25 AM.
    'see the fnords!'

  4. #4
    Junior Member
    Join Date
    Feb 2010
    Location
    USA
    Posts
    47

    Default Re: Crunch - Scripts for Password List Generation

    Announcing a major update to "phone.sh"...

    f0ne.sh



    This script still only works in U.S. cities -- international phone numbers are a huge, huge pain, so I don't see it happening anytime soon; People can edit the script to work for whatever country they live in, but that's beyond what I'm willing to do.

    Updates:

    • Interactive mode has a new user interface - colored text!
      • ./f0ne.sh
      • (no arguments)

    • Command-line arguments - you can now pass arguments to f0ne instead of using the interactive menu system
      • USAGE: ./f0ne.sh [city] [style]
      • EXAMPLE: ./f0ne.sh "cleveland, oh" 3
      • OUTPUT: all of the phone nubmers in cleveland - to stdout, so piping is recommended:
      • PIPING: ./f0ne.sh "cleveland, oh" 3 > cleveland.txt

    • Can run independent of Crunch
      • crunch is VERY fast at generating lists, but not everyone has it.
      • if crunch isn't found on the user's system, a substitute shell script is used instead
      • this substitute script is MUCH MUCH slower than crunch; it's meant as a last-resort.

    • Piping to aircrack is still included, but only in interactive mode
    • Saves phone numbers to [city].txt instead of the generic "phone.txt"
      • So if you asked for "burbank, ca", the program would save the phone numbers in "burbankca.txt"


    I hope that some of you can find this script useful.

    Available on Pastebin.com

  5. #5
    Senior Member fnord0's Avatar
    Join Date
    Jul 2008
    Posts
    144

    Default Re: Crunch - Scripts for Password List Generation

    Quote Originally Posted by derv82 View Post
    Announcing a major update to "phone.sh"...
    looking good
    'see the fnords!'

  6. #6
    Junior Member
    Join Date
    Apr 2010
    Posts
    47

    Default Re: Crunch - Scripts for Password List Generation

    good work
    what about of i make script for 10 numbers like
    0795619120 the first 4 number stay the same and the other number will be random
    i mean if u can make 10 numbers generator and we can chouse wich number is random and wich is not thats make it easy for all the guys in any cuntry

  7. #7
    Just burned his ISO
    Join Date
    Jun 2008
    Posts
    22

    Default Re: Crunch - Scripts for Password List Generation

    Excellent tips for crunch and other articles click here:

    A day with Tape: Creating wordlists with crunch v2.4

    Thanks Tape!
    Last edited by bbford; 08-28-2010 at 01:41 AM.

  8. #8
    Very good friend of the forum TAPE's Avatar
    Join Date
    Jan 2010
    Location
    Europe
    Posts
    599

    Default Re: Crunch - Scripts for Password List Generation

    @bbford
    Thanks
    But all credit to bofh28 of course !

  9. #9
    Junior Member
    Join Date
    Apr 2010
    Posts
    47

    Default Re: Crunch - Scripts for Password List Generation

    thxx alot bbford i download crunch work good

  10. #10
    Just burned his ISO
    Join Date
    Sep 2010
    Posts
    13

    Default

    i've been looking all over for a script like this. It doesnt seem to be capturing the prefix for my city, is there a way i can enter the first 3 digits?

    is there a way to enter the prefix manually and generate a list between 666 [000 0000 - 999 9999] ?
    Last edited by lupin; 09-29-2010 at 06:01 AM. Reason: Merging...

Page 1 of 2 12 LastLast

Similar Threads

  1. Password generator/ crunch
    By lano78 in forum Beginners Forum
    Replies: 6
    Last Post: 04-09-2011, 04:10 PM
  2. Replies: 17
    Last Post: 03-07-2011, 05:54 PM
  3. BT4 WPA Password list?
    By phace in forum Beginners Forum
    Replies: 1
    Last Post: 06-13-2010, 07:09 PM
  4. Crunch password generator simple problem
    By jobyer in forum OLD Pentesting
    Replies: 7
    Last Post: 01-18-2010, 02:06 PM
  5. crunch -- for word list creation
    By OnefITA in forum OLD Newbie Area
    Replies: 2
    Last Post: 10-09-2007, 07:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •