Apr 15, 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:
# Usage:
# sh [script name] [digits specify] > [output file] &
FINISH=`expr "10^"$digit"" | bc -l`
while [ $COUNT != $FINISH ] ; do
COUNT=`expr $COUNT + 1`
printf "%+"$digit"s\n" $COUNT | sed s^\ ^0^g
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.

Thank you for your unbelievable support on Negative Zero - Permission to read and write blog for nearly 4 years. Don't forget to like Negative Zero on Facebook.
Blogirific.com Blog Directory

Post(s) you might like to read :


  1. 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.

  2. where we can use this script
    in password generation?

  3. 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.

  4. 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.

  5. yeah.. thanks for the reminder incik leman..

  6. 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

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

    done >> $OUTFILE