Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Crunch - Scripts for Password List Generation

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

    Default Re: Crunch - Scripts for Password List Generation

    @j0eh4x:

    # navigate to the crunch folder:
    cd /pentest/passwords/crunch/

    # execute crunch, generate a list with each password length of 10, using only numbers, first three are always '666'
    ./crunch 10 10 0123456789 -t 666@@@@@@@

    I'm not on a linux box; so I can't test now. You should read the crunch help guide for more info:
    ./crunch --help

  2. #12
    Good friend of the forums
    Join Date
    Jan 2010
    Location
    outside chicago, il
    Posts
    442

    Default Re: Crunch - Scripts for Password List Generation

    Quote Originally Posted by derv82 View Post
    @j0eh4x:

    # navigate to the crunch folder:
    cd /pentest/passwords/crunch/

    # execute crunch, generate a list with each password length of 10, using only numbers, first three are always '666'
    ./crunch 10 10 0123456789 -t 666@@@@@@@

    I'm not on a linux box; so I can't test now. You should read the crunch help guide for more info:
    ./crunch --help
    ./crunch 10 10 -t 666%%%%%%%
    is better as % is preloaded with 0123456789
    I like the bleeding edge, but I don't like blood loss

  3. #13
    Just burned his ISO
    Join Date
    Oct 2010
    Location
    New Hampshire USA
    Posts
    2

    Default Re: Crunch - Scripts for Password List Generation

    new user to linux, backtrack, scipts, everything haha. i do have some programing experience with half a dozen windows and web lauguages so hopefully i'll understand the fix when explained...

    i get this error trying to run the script.

    root@bt:~# sh fone.sh
    : command not found
    'one.sh: line 132: syntax error near unexpected token `{
    'one.sh: line 132: `ITSATRAP() {


    so what do i change it to? and will i need to change line 180 as well since it's the same code?

  4. #14
    Junior Member
    Join Date
    Jun 2010
    Location
    Carmel, IN USA
    Posts
    36

    Default Re: Crunch - Scripts for Password List Generation

    Quote Originally Posted by derv82 View Post
    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 (4th revision) is available here (pastebin)


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

    Enjoy!
    I updated your passthrough script to add the ability to select a charset

    PasteBin Link

  5. #15
    Member
    Join Date
    Feb 2010
    Location
    MTI3LjAuMC4x
    Posts
    90

    Default Re: Crunch - Scripts for Password List Generation

    Quote Originally Posted by fooser View Post
    new user to linux, backtrack, scipts, everything haha. i do have some programing experience with half a dozen windows and web lauguages so hopefully i'll understand the fix when explained...

    i get this error trying to run the script.

    root@bt:~# sh fone.sh
    : command not found
    'one.sh: line 132: syntax error near unexpected token `{
    'one.sh: line 132: `ITSATRAP() {


    so what do i change it to? and will i need to change line 180 as well since it's the same code?
    same issue here, before I go in and hack it up wondering if there was a bad paste or if something else was up.. will tinker later if I get time

  6. #16
    Just burned his ISO
    Join Date
    Oct 2010
    Location
    New Hampshire USA
    Posts
    2

    Default Re: Crunch - Scripts for Password List Generation

    i solved my problem by going back to the download site (pastebin) and changing to RAW. this gives you clean text to copy from. downloading the file or copying from the defalt page inserts windows characters after every line that messes with the code.

  7. #17
    Junior Member
    Join Date
    Jun 2010
    Location
    Carmel, IN USA
    Posts
    36

    Default Re: Crunch - Scripts for Password List Generation

    Code:
    i get this error trying to run the script.
    
    root@bt:~# sh fone.sh
    : command not found
    'one.sh: line 132: syntax error near unexpected token `{
    'one.sh: line 132: `ITSATRAP() {
    Getting this error as well. Tried raw, downloaded ext no luck

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

    Default Re: Crunch - Scripts for Password List Generation

    Quote Originally Posted by ondrovic View Post
    Code:
    i get this error trying to run the script.
    
    root@bt:~# sh fone.sh
    : command not found
    'one.sh: line 132: syntax error near unexpected token `{
    'one.sh: line 132: `ITSATRAP() {
    Getting this error as well. Tried raw, downloaded ext no luck

    I think these errors are happening because the script doesn't start with

    Code:
    #!/bin/sh
    I've updated the script to this pastebin: http://pastebin.com/v2jJHYZ2

    Also, if you get an error such as:
    Code:
    bash: ./f0ne.sh: /bin/sh^M: bad interpreter: No such file or directory
    then execute;
    Code:
    dos2unix f0ne.sh
    and it should work fine after that.

    I'll update my original post as well. Sorry for the headaches, everyone.
    Last edited by derv82; 02-11-2011 at 05:51 PM.

  9. #19
    Just burned his ISO
    Join Date
    Nov 2009
    Posts
    1

    Default Re: Crunch - Scripts for Password List Generation

    Quote Originally Posted by j0eh4x View Post
    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] ?
    hello Ithink this is what you are looking for ./crunch 5 5 -t 123%% This will generate numbers - with the prefix 123 - starting at 12301 and ending at 12399 Hope it helps

Page 2 of 2 FirstFirst 12

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
  •