Apr 14, 2008

Script to generate Numbers Combination

This is a script to generate combinations of numbers from 0-9 depends on how many digits you specify when running the scripts. It's a simple script that took me 5 minutes to write. Plus I got the idea of writing this script from one of my friend.

This script is useful for those who wants to generate a wordlist for bruteforce. Here is the scripts:

#!/bin/sh
# Usage:
# sh [script name] [digits specify] > [output file] &
digit=$1
FINISH=`expr "10^"$digit"" | bc -l`
COUNT="-1"
while [ $COUNT != $FINISH ] ; do
COUNT=`expr $COUNT + 1`
printf "%+"$digit"s\n" $COUNT | sed s^\ ^0^g
done
Why do I only write scripts for numbers combination? The answer is simple, if I wrote a script that will create a combination of all ascii letters, then it will be too much for a single machine to generate and also will took you a long long time to generate.

If you want to calculate how much time it will take to generate a combination of digits with quantity of letters(ascii) then you can do calculation on this website, Generator Calculator.

Look at the time needed to generate a full ascii password list. It's not worth your time to do that. If you ever need a full ascii generator, than you can download it right here.

* The script will be update soon to be more user friendly.

Bookmark This Article:

Feed Me Digg this Stumble Upon this Send this Reddit this Add to Technorati Favorites Directory of Computers/Tech Blogs Programming Blogs - BlogCatalog Blog Directory

Your Ad Here

7 comments:

Gunblade IV said...

Please leave a comments if you think this script need some touch up in order to work smoothly. I'm new to this scripting things.

Ajay said...

where we can use this script
in password generation?

Gunblade IV said...

actually, this script is based on linux shells. You need to run the script on linux environment, and the script will generate word list in a plain text file.

encik leman said...

good script, but i think you should make it more user friendly since the script will print out error if no argument supplied to the script, and also you forgot to put #!/bin/bash or #!/bin/sh in there.

Gunblade IV said...

yeah.. thanks for the reminder incik leman..

mysurface said...

you can use seq, that day i am trying to tell you in the irc channel, i think u have missed it

let say 3 digit:

seq -f "%03g" 0 1000 > haha.txt

pak leman said...

i think you should put >> $OUTFILE after the "done"

done >> $OUTFILE