Aircrack-ng
Welcome, Guest. Please login or register.
February 10, 2010, 09:11:21 am

Login with username, password and session length
Search:     Advanced search
Read forum rules, "Read this before posting". Post that do not respect them will be trashed.
31125 Posts in 5435 Topics by 14892 Members
Latest Member: Dietaplus
* Home Help Search Login Register
+  Aircrack-ng
|-+  General Discussion
| |-+  Tutorials, tips and tricks and other
| | |-+  Create a wordlist of only numbers
« previous next »
Pages: [1] 2 Reply Print
Author Topic: Create a wordlist of only numbers  (Read 6857 times)
Candle
Guest


Email
Create a wordlist of only numbers
« on: February 24, 2009, 04:03:01 pm »
Reply with quote

Hi,
does anybody know how I can create a wordlist of only numbers?

The FritzBox from AVM has only a numeric wpa password.
Logged
Awesome
Guest


Email
Re: Create a wordlist of only numbers
« Reply #1 on: February 24, 2009, 04:43:19 pm »
Reply with quote

This isn't really even worth dignifying a response, but I'm feeling nice today...

Code:
python -c "for n in xrange(0, 99999999): print '%08d' % n" | aircrack-ng  -w - -b 00:11:22:33:44:55 psk.cap

This will try every 8 digit integer from 0 to 99999999 as key. YMMV, since the keyspace here is 100000000 keys. On a relatively recent Core 2 Duo chip, I get about 1150 keys/sec so it would take just over 24 hours to run.
Logged
Jano
Ubuntu 8.04/9.10 user
Sr. Member
****
Posts: 480



WWW
Re: Create a wordlist of only numbers
« Reply #2 on: February 24, 2009, 06:25:21 pm »
Reply with quote

Hi Candle,

- There are many alternatives: custom scripts, wordlist generators (pwgen, gen.pl, ecc..), and do not forget John The Ripper.
- Search in Google

Bye Jano
« Last Edit: February 24, 2009, 06:29:14 pm by Jano » Logged

Web-Site (in maintenance): http://www.jano.netsons.org
Personal-Server: http://jano.homelinux.net
Notebook: ACER ASPIRE 5601 AWLMi - HDD Maxtor 1TB - Wireless: ALFA AWUS036H, AWUS050NH - Antennas: HyperLink 24-dBi Grid, Panel 14-dBi
Candle
Guest


Email
Re: Create a wordlist of only numbers
« Reply #3 on: February 25, 2009, 08:19:40 pm »
Reply with quote

Hi tried jack the ripper but I couldn't figure out what I should type in to let him generate the wordlist with numbers
Logged
Jano
Ubuntu 8.04/9.10 user
Sr. Member
****
Posts: 480



WWW
Re: Create a wordlist of only numbers
« Reply #4 on: February 25, 2009, 10:41:03 pm »
Reply with quote

Hi Candle,

Hi tried jack the ripper but I couldn't figure out what I should type in to let him generate the wordlist with numbers

- JTR has many useful features to modify and extend the personal dictionaries using his "Rules", and is very fast in the generation of new password.
- This is an example for generate the wordlist with numbers, with "Standard Charset": (password max lenght 8-)
Code:
jano:~/Pentest/john/run$ ./john -i=Digits --stdout | sed '10q'
00000000
10000000
10000001
10000010
10000011
10000100
10000101
10000110
10000111
10001000
jano:~/Pentest/john/run$
- And this is an example, with "Custom Charset": (password max lenght 10)
Code:
jano:~/Pentest/john/run$ ./john -i=Digits-10 --stdout | sed '10q'
0000000000
0001000000
0001000001
0001000010
0001000011
0001000100
0001000101
0001000110
0001000111
0001001000
jano:~/Pentest/john/run$
- Remember, that to generate password higher than 8 characters, you must to recompile JTR  for creating new "Custom Charset".

Bye Jano
« Last Edit: February 25, 2009, 11:40:34 pm by Jano » Logged

Web-Site (in maintenance): http://www.jano.netsons.org
Personal-Server: http://jano.homelinux.net
Notebook: ACER ASPIRE 5601 AWLMi - HDD Maxtor 1TB - Wireless: ALFA AWUS036H, AWUS050NH - Antennas: HyperLink 24-dBi Grid, Panel 14-dBi
Zermelo
Hero Member
*****
Posts: 554



Re: Create a wordlist of only numbers
« Reply #5 on: March 06, 2009, 02:54:14 am »
Reply with quote

Ok don't laugh too hard - I know there are like dozens of scripts and apps which will do this, but I'm throwing some crappy C code that I wrote which will go through standard and arbitrary permutations of strings.  I wanted something simple and straight-forward that could pump permutations through aircrack-ng.  There is zero optimization in it, but here it is for anyone interested.

Usage:

Usage: permutate [options] -o [path]
Options:
   -m : minimum string output length [default is 8]
   -n : maximum string output length
   -l : permutate using Lower Case letters [default]
   -u : permutate using Upper Case letters
   -d : permutate using Digits [0 - 9]
   -p : permutate using special characters [!@#$%^&* ...]
   -s : permutate using space character
   -c [string]: permutate using custom string entry

Using multiple string options will concatenate those strings, e.g. if you type:

Quote
permutate -l -d

It will display the permutation of "abcdefghijklmnopqrstuvwxyz0123456789"

By default it sets the minimum permutation length is set to 8 and the default string set is lower case, hence if you simple type the command "./permutate" it will display permutations of a-z.

If you want to waste time:
Quote
permutate -m 8 -n 64 -l -u -d -p -s -o craziness.txt
would go through every permutation of all above mentioned characters starting with a minimum passphrase length of 8  and ending at a maximum passphrase length opf 65.

Quote
permuate -d -m 8 | aircrack-ng wpa.cap -w - -e [essid]
Would pipe all permutations of 0-9 with a passphrase length of 8 through aircrack-ng

Quote
permutate -c %$@*51fg
Would display all permutations of the characters of %$@*51fg (note it does not check for redundant characters)

etc, etc.

Here's the code:
Code:
// permutator.cpp beta 1.0: Defines the entry point for the console application //

#include <fstream>
#include <iostream>
#include <cmath>
#include <ctime>
#include <string.h>
#include <stdlib.h>

using namespace std;
int long s,l,minimum,maximum,flag;
int D[255];
char chr;
string cycle,passphrase;


int main(int argc, char *argv[])
{
cycle = "";
flag = 0;
minimum = maximum = 8;

ofstream fout;

for(int i=1; i<argc; i++)
{
if (strncmp(argv[i],"-m",2)==0)
{
minimum = atoi(argv[i+1]);
}
if (strncmp(argv[i],"-n",2)==0)
{
maximum = atoi(argv[i+1]);
}
if (strncmp(argv[i],"-l",2)==0)
{
cycle = cycle + "abcdefghijklmnopqrstuvwxyz";
}
if (strncmp(argv[i],"-u",2)==0)
{
cycle = cycle + "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
}
if (strncmp(argv[i],"-d",2)==0)
{
cycle = cycle + "0123456789";
}
if (strncmp(argv[i],"-p",2)==0)
{
cycle = cycle + "_@#$&+-=%*^`~'!?.,:;()<>[]{}/|";
chr=92;
cycle = cycle + chr;
chr=34;
cycle = cycle + chr;
}
if (strncmp(argv[i],"-s",2)==0)
{
cycle = cycle + " ";
}
if (strncmp(argv[i],"-c",2)==0)
{
cycle = cycle + argv[i+1];
}
if (strncmp(argv[i],"-o",2)==0)
{
fout.open(argv[i+1]);
flag = 1;
}
if (strncmp(argv[i],"-h",2)==0)
{
cout << "Bruteforce Permutation Generator Beta v. 1.0 by Zermelo \n";
cout << "Usage: permutate [options] -o [path] \n";
cout << "Options: \n";
cout << "   -m : minimum string output length [default is 8] \n";
cout << "   -n : maximum string output length \n";
cout << "   -l : permutate using Lower Case letters [default] \n";
cout << "   -u : permutate using Upper Case letters \n";
cout << "   -d : permutate using Digits [0 - 9] \n";
cout << "   -p : permutate using Special characters [!@#$%^&* ...] \n";
cout << "   -s : permutate using Space character \n";
cout << "   -c [string]: permutate using custom string entry \n";
cout << "   -h : this screen \n";
exit(0);
}
}

        if (maximum<minimum)
{
maximum = minimum;
}

l = cycle.length();
if (l<1)
{
cycle="abcdefghijklmnopqrstuvwxyz";
l = 26;
}
l=l-1;

for(int i=0;i<=l;i++)
{
D[cycle[i]]=i;
}

minimum = minimum - 1;
maximum = maximum - 1;

for(int size=minimum;size<=maximum;size++)
{
passphrase = "";
for(int i=0;i<=size;i++)
{
passphrase = passphrase + cycle[0];
}

for(int j=1;j<=pow(double(l+1),size+1);j++)
{
for(int i=0;i<=size;i++)
{
if (passphrase[size-i]==(cycle[l+1]))
{
passphrase[size-i]=cycle[0];
passphrase[size-1-i] = cycle[D[passphrase[size-1-i]]+1];
}
}
cout << passphrase << endl;
if (flag==1)
{
fout << passphrase << endl;
}
passphrase[size] = cycle[D[passphrase[size]]+1];
}
}

if (flag==1)
{
fout.close();
}

return 0;
}

I'm no coder, I just felt the urge to throw this together, so I'm sure it could be done much, much better.
« Last Edit: March 06, 2009, 03:04:46 am by Zermelo » Logged
t_virus
Newbie
*
Posts: 21


Re: Create a wordlist of only numbers
« Reply #6 on: April 26, 2009, 01:43:03 am »
Reply with quote

Ok don't laugh too hard - I know there are like dozens of scripts and apps which will do this, but I'm throwing some crappy C code that I wrote which will go through standard and arbitrary permutations of strings.  I wanted something simple and straight-forward that could pump permutations through aircrack-ng.  There is zero optimization in it, but here it is for anyone interested.

Usage:

Usage: permutate [options] -o [path]
Options:
   -m : minimum string output length [default is 8]
   -n : maximum string output length
   -l : permutate using Lower Case letters [default]
   -u : permutate using Upper Case letters
   -d : permutate using Digits [0 - 9]
   -p : permutate using special characters [!@#$%^&* ...]
   -s : permutate using space character
   -c [string]: permutate using custom string entry

Using multiple string options will concatenate those strings, e.g. if you type:

Quote
permutate -l -d

It will display the permutation of "abcdefghijklmnopqrstuvwxyz0123456789"

By default it sets the minimum permutation length is set to 8 and the default string set is lower case, hence if you simple type the command "./permutate" it will display permutations of a-z.

If you want to waste time:
Quote
permutate -m 8 -n 64 -l -u -d -p -s -o craziness.txt
would go through every permutation of all above mentioned characters starting with a minimum passphrase length of 8  and ending at a maximum passphrase length opf 65.

Quote
permuate -d -m 8 | aircrack-ng wpa.cap -w - -e [essid]
Would pipe all permutations of 0-9 with a passphrase length of 8 through aircrack-ng

Quote
permutate -c %$@*51fg
Would display all permutations of the characters of %$@*51fg (note it does not check for redundant characters)

etc, etc.

Here's the code:
Code:
// permutator.cpp beta 1.0: Defines the entry point for the console application //

#include <fstream>
#include <iostream>
#include <cmath>
#include <ctime>
#include <string.h>
#include <stdlib.h>

using namespace std;
int long s,l,minimum,maximum,flag;
int D[255];
char chr;
string cycle,passphrase;


int main(int argc, char *argv[])
{
cycle = "";
flag = 0;
minimum = maximum = 8;

ofstream fout;

for(int i=1; i<argc; i++)
{
if (strncmp(argv[i],"-m",2)==0)
{
minimum = atoi(argv[i+1]);
}
if (strncmp(argv[i],"-n",2)==0)
{
maximum = atoi(argv[i+1]);
}
if (strncmp(argv[i],"-l",2)==0)
{
cycle = cycle + "abcdefghijklmnopqrstuvwxyz";
}
if (strncmp(argv[i],"-u",2)==0)
{
cycle = cycle + "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
}
if (strncmp(argv[i],"-d",2)==0)
{
cycle = cycle + "0123456789";
}
if (strncmp(argv[i],"-p",2)==0)
{
cycle = cycle + "_@#$&+-=%*^`~'!?.,:;()<>[]{}/|";
chr=92;
cycle = cycle + chr;
chr=34;
cycle = cycle + chr;
}
if (strncmp(argv[i],"-s",2)==0)
{
cycle = cycle + " ";
}
if (strncmp(argv[i],"-c",2)==0)
{
cycle = cycle + argv[i+1];
}
if (strncmp(argv[i],"-o",2)==0)
{
fout.open(argv[i+1]);
flag = 1;
}
if (strncmp(argv[i],"-h",2)==0)
{
cout << "Bruteforce Permutation Generator Beta v. 1.0 by Zermelo \n";
cout << "Usage: permutate [options] -o [path] \n";
cout << "Options: \n";
cout << "   -m : minimum string output length [default is 8] \n";
cout << "   -n : maximum string output length \n";
cout << "   -l : permutate using Lower Case letters [default] \n";
cout << "   -u : permutate using Upper Case letters \n";
cout << "   -d : permutate using Digits [0 - 9] \n";
cout << "   -p : permutate using Special characters [!@#$%^&* ...] \n";
cout << "   -s : permutate using Space character \n";
cout << "   -c [string]: permutate using custom string entry \n";
cout << "   -h : this screen \n";
exit(0);
}
}

        if (maximum<minimum)
{
maximum = minimum;
}

l = cycle.length();
if (l<1)
{
cycle="abcdefghijklmnopqrstuvwxyz";
l = 26;
}
l=l-1;

for(int i=0;i<=l;i++)
{
D[cycle[i]]=i;
}

minimum = minimum - 1;
maximum = maximum - 1;

for(int size=minimum;size<=maximum;size++)
{
passphrase = "";
for(int i=0;i<=size;i++)
{
passphrase = passphrase + cycle[0];
}

for(int j=1;j<=pow(double(l+1),size+1);j++)
{
for(int i=0;i<=size;i++)
{
if (passphrase[size-i]==(cycle[l+1]))
{
passphrase[size-i]=cycle[0];
passphrase[size-1-i] = cycle[D[passphrase[size-1-i]]+1];
}
}
cout << passphrase << endl;
if (flag==1)
{
fout << passphrase << endl;
}
passphrase[size] = cycle[D[passphrase[size]]+1];
}
}

if (flag==1)
{
fout.close();
}

return 0;
}

I'm no coder, I just felt the urge to throw this together, so I'm sure it could be done much, much better.


hello zermelo, nice code. i just cant get it working.... i saved the code has "permutate" and "permutate.cpp" but command line dont found, even aircrack-ng dont.
can someone help me about this?

about the code could u zermelo or someone upgrade it so resume after a quit?
thankx guys
Logged
Jano
Ubuntu 8.04/9.10 user
Sr. Member
****
Posts: 480



WWW
Re: Create a wordlist of only numbers
« Reply #7 on: April 26, 2009, 02:15:08 am »
Reply with quote

hello zermelo, nice code. i just cant get it working.... i saved the code has "permutate" and "permutate.cpp" but command line dont found, even aircrack-ng dont.
can someone help me about this?
about the code could u zermelo or someone upgrade it so resume after a quit?
thankx guys

- Hi t_virus,
- Before using it, you have to compile the script.  Wink
Code:
sudo apt-get install g++ gcc
Code:
g++ permutator.cpp -o permutate

Bye Jano

« Last Edit: April 26, 2009, 02:17:18 am by Jano » Logged

Web-Site (in maintenance): http://www.jano.netsons.org
Personal-Server: http://jano.homelinux.net
Notebook: ACER ASPIRE 5601 AWLMi - HDD Maxtor 1TB - Wireless: ALFA AWUS036H, AWUS050NH - Antennas: HyperLink 24-dBi Grid, Panel 14-dBi
t_virus
Newbie
*
Posts: 21


Re: Create a wordlist of only numbers
« Reply #8 on: April 26, 2009, 03:05:01 am »
Reply with quote

hi jano thanks for the replay!
i have g++ and gcc installed and i run this code:

Code:
g++ permutator.cpp -o permutate -m 8 -n 16 -l -d -o craziness.txt

and this is what i got:

Code:
mauro@tvirus-laptop:~$ g++ permutator.cpp -o permutate -m 8 -n 16 -l -d -o craziness.txt
g++: 16: File ou directory inexistente
cc1plus: error: unrecognized command line option "-m"
mauro@tvirus-laptop:~$

any help about this?
thankx
Logged
t_virus
Newbie
*
Posts: 21


Re: Create a wordlist of only numbers
« Reply #9 on: April 26, 2009, 03:15:38 am »
Reply with quote

jeasus!!!

Code:
sudo ./permutate ...

stupid LOL
Logged
Jano
Ubuntu 8.04/9.10 user
Sr. Member
****
Posts: 480



WWW
Re: Create a wordlist of only numbers
« Reply #10 on: April 26, 2009, 03:21:54 am »
Reply with quote

jeasus!!!
Code:
sudo ./permutate ...
stupid LOL

Ciao t_virus,
You do not need "root" permission:
Code:
./permutate -m 8 -n 16 -l -d -o craziness.txt

Bye Jano
Logged

Web-Site (in maintenance): http://www.jano.netsons.org
Personal-Server: http://jano.homelinux.net
Notebook: ACER ASPIRE 5601 AWLMi - HDD Maxtor 1TB - Wireless: ALFA AWUS036H, AWUS050NH - Antennas: HyperLink 24-dBi Grid, Panel 14-dBi
t_virus
Newbie
*
Posts: 21


Re: Create a wordlist of only numbers
« Reply #11 on: April 26, 2009, 04:02:04 am »
Reply with quote

thank you Jano, parla italino hã??

is it to much work to put a resume key in the code or a start from"3456789" instead of starting allways from the begining?
Logged
Zermelo
Hero Member
*****
Posts: 554



Re: Create a wordlist of only numbers
« Reply #12 on: April 27, 2009, 02:19:24 pm »
Reply with quote

t_virus,

This is incorrect:

Quote
g++ permutator.cpp -o permutate -m 8 -n 16 -l -d -o craziness.txt

to compile the code, your mixing up the compilation parameters with the parameters for using the code.  First compile the code:

Simply:

Quote
g++ permutator.cpp -o permutator

If it compiles successfully, there should be a separate file now called "permutator".  You can now execute the compiled binary with the command:

Quote
permutate -m 8 -n 16 -l -d -o craziness.txt

Good luck.

Logged
t_virus
Newbie
*
Posts: 21


Re: Create a wordlist of only numbers
« Reply #13 on: May 02, 2009, 10:57:27 pm »
Reply with quote

sorry for the slow replay Zermelo
i have it rocking now!! Grin´
this is a cool script and i'm trying to add an option of resuming or ´start from´
let me know if you can help me Wink

keep it goin
Logged
Zermelo
Hero Member
*****
Posts: 554



Re: Create a wordlist of only numbers
« Reply #14 on: May 03, 2009, 02:30:20 pm »
Reply with quote

sorry for the slow replay Zermelo
i have it rocking now!! Grin´
this is a cool script and i'm trying to add an option of resuming or ´start from´
let me know if you can help me Wink

keep it goin

The only way I could think of to have it resume after a break is to create a text file keeping a unique log of each run of its current place in the cycle, then adding to the parameters a continue option.  There might be an easier way of doing it, but as I said I'm no coder, so at the moment it's all I can think of.

If I can find an quick way to do it, I'll see if I can throw it in there, but as I said, there are many other scripts that do what mine does, perhaps they have a resume option, so you may be better off using those.
Logged
Pages: [1] 2 Reply Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Aircrack-ng | Powered by SMF 1.0.10.
© 2005, Simple Machines LLC. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!