Generating a crunch wordlist
#1
Guys I'm trying to create a wordlist to brute force wifi with crunch using this: 
Code:
crunch 8 8 ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 -o wifi.lst
As you may know, that generates a massive file of multiple TB. I want to shrink it as much as possible and remove all the passwords that contain only letters or only numbers since wifi passwords always contain both. Any idea on how to do this.
Reply
#2
No worries buddy. I made a little something for you that should do the trick nicely.

Code:
#!/usr/bin/env python2.7
#____   ____             __                
#\   \ /   /____   _____/  |_  ___________
# \   Y   // __ \_/ ___\   __\/  _ \_  __ \
#  \     /\  ___/\  \___|  | (  <_> )  | \/
#   \___/  \___  >\___  >__|  \____/|__|  
#              \/     \/                  
############################################

import subprocess
import re

def cmdline(command):
    process = subprocess.Popen(
        args=command,
        stdout=subprocess.PIPE,
        shell=True)
    
    return process.communicate()[0]


print """\nWe're making a list, we're checking it twice.
We're gonna find strings who are naughty or nice!

By the way, if you want to add a limit to the amount of strings generated
just type the amount in the upcoming prompt. If you want no limit, provide
a value of '0' without the quotation marks.
\n"""

amount = raw_input("Input limit: ")
if amount == '0':
    limit = ''
else:
    limit = ' -c ' + amount

template = "crunch 8 8 ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + limit

print "\nCrunching the numbers, please stand by...\n"
operation = cmdline(template)

result = re.sub(r'\b[0-9]+\b\W*', '', operation)

print "\nWriting results to 'wifi.lst.'\n"    
with open("wifi.lst", "ab") as outfile:
    for line in result:
        outfile.write(line)
    
print "Done! Find your list in the current working directory."

Save it as a python file and you're good to go. This particular script will remove the results that exist only as a string of numbers.

I think you can fiddle with the setting of `crunch` if you want to try to make sure numbers and letters are always combined in the results.

I would suggest checking out the `man` page for `crunch`. Simply open a terminal and type:

Code:
man crunch
Reply
#3
(05-16-2018, 06:45 PM)Vector Wrote: No worries buddy. I made a little something for you that should do the trick nicely.

Code:
#!/usr/bin/env python2.7
#____   ____             __                
#\   \ /   /____   _____/  |_  ___________
# \   Y   // __ \_/ ___\   __\/  _ \_  __ \
#  \     /\  ___/\  \___|  | (  <_> )  | \/
#   \___/  \___  >\___  >__|  \____/|__|  
#              \/     \/                  
############################################

import subprocess
import re

def cmdline(command):
   process = subprocess.Popen(
       args=command,
       stdout=subprocess.PIPE,
       shell=True)
   
   return process.communicate()[0]


print """\nWe're making a list, we're checking it twice.
We're gonna find strings who are naughty or nice!

By the way, if you want to add a limit to the amount of strings generated
just type the amount in the upcoming prompt. If you want no limit, provide
a value of '0' without the quotation marks.
\n"""

amount = raw_input("Input limit: ")
if amount == '0':
limit = ''
else:
limit = ' -c ' + amount

template = "crunch 8 8 ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + limit

print "\nCrunching the numbers, please stand by...\n"
operation = cmdline(template)

result = re.sub(r'\b[0-9]+\b\W*', '', operation)

print "\nWriting results to 'wifi.lst.'\n"
with open("wifi.lst", "ab") as outfile:
for line in result:
outfile.write(line)

print "Done! Find your list in the current working directory."

Save it as a python file and you're good to go. This particular script will remove the results that exist only as a string of numbers.

I think you can fiddle with the setting of `crunch` if you want to try to make sure numbers and letters are always combined in the results.

I would suggest checking out the `man` page for `crunch`. Simply open a terminal and type:

Code:
man crunch


Thanks man, you da best
Reply
#4
(05-17-2018, 03:23 AM)Knife Boss Wrote:
(05-16-2018, 06:45 PM)Vector Wrote: No worries buddy. I made a little something for you that should do the trick nicely.

Code:
#!/usr/bin/env python2.7
#____   ____             __                
#\   \ /   /____   _____/  |_  ___________
# \   Y   // __ \_/ ___\   __\/  _ \_  __ \
#  \     /\  ___/\  \___|  | (  <_> )  | \/
#   \___/  \___  >\___  >__|  \____/|__|  
#              \/     \/                  
############################################

import subprocess
import re

def cmdline(command):
   process = subprocess.Popen(
       args=command,
       stdout=subprocess.PIPE,
       shell=True)
   
   return process.communicate()[0]


print """\nWe're making a list, we're checking it twice.
We're gonna find strings who are naughty or nice!

By the way, if you want to add a limit to the amount of strings generated
just type the amount in the upcoming prompt. If you want no limit, provide
a value of '0' without the quotation marks.
\n"""

amount = raw_input("Input limit: ")
if amount == '0':
limit = ''
else:
limit = ' -c ' + amount

template = "crunch 8 8 ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + limit

print "\nCrunching the numbers, please stand by...\n"
operation = cmdline(template)

result = re.sub(r'\b[0-9]+\b\W*', '', operation)

print "\nWriting results to 'wifi.lst.'\n"
with open("wifi.lst", "ab") as outfile:
for line in result:
outfile.write(line)

print "Done! Find your list in the current working directory."

Save it as a python file and you're good to go. This particular script will remove the results that exist only as a string of numbers.

I think you can fiddle with the setting of `crunch` if you want to try to make sure numbers and letters are always combined in the results.

I would suggest checking out the `man` page for `crunch`. Simply open a terminal and type:

Code:
man crunch


Thanks man, you da best

I know fam. Beware though, the `operation` var cannot store more data than your memory allows. So 1TB is a bit much, it will error out with those kinds of numbers.
Reply