Active Members Fi8sVrs Posted July 17, 2013 Active Members Report Posted July 17, 2013 What is it?It’s an automated word list generator.What is a word list?Word list is like a list of possible passwords that you can use to crack hashes with, perform brute force attacks on various protocols & may be used for just about any cracking in general.Why would I need an automated word list generator?Well, actually you don’t need to generate your own as there are already some pretty good word lists floating around on the web. But there are times when you would want a personalized word list to fine tune your attacks; especially if you know the target well. In such cases automated word list generators may come in handy as it allows you to make educated guesses regarding what the password might be rather than just brute forcing with totally random, irrelevant word list.How is it different?Gen2k is still in beta, but works flawlessly as of now. It’s not your typical word list generator, and doesn’t intend to be one. There are already good ones out there like Crunch, etc.Gen2k aims to be a smart word list generator, it takes sample words as input. Sample words can be anything that you know about the target, from area, date of birth to names & special events, etc. Once a list of all those known words have been supplied to Gen2k, it automatically, based on the options set..determines the best possible way to make a word list out of those. As many of you know, people tend to use birth year, specific dates, random numbers, custom words attached to simple words in order to make their passwords more complex. Gen2k aims to exploit those types of weaknesses along with conversion of words to upper & lower cases to make your word list completely personalized & appropriate for the situation.It has most of the features that I thought of implementing when I started working on it and obviously it can be improved further. It’s written completely in Python. It’s fast, light weight & doesn’t have any external dependencies.What are it’s features? Generates password combinations by combining supplied words. Mixes frequently used number patterns with words. Generates password combinations using year/date combo. Mixes custom user defined value(s) combination with words. Option to auto convert words to upper/lowercase & capitalisation. WPA/WPA2 password validation check. No external dependencies.So what does it look like?The list can get very large indeed, so make sure you choose the options wisely.Where can I get it? #!/usr/bin/env python__author__ = 'irenicus09'__email__ = 'irenicus09[at]gmail[dot]com'__license__ = 'BSD'__version__ = 'BETA'__date__ = '18/05/2013'import sys"""############################## GEN2K #################################### Automated Word List Generator> Generates passwords combinations by combining words from wordlist.> Covers frequently used number patterns used along with words.> Generates passwords combinations using year/date combo.> Generates custom user defined value(s) combination with word list.> Option to auto convert words to upper/lowercase & capitalisation.> WPA/WPA2 password validation check.> No external dependencies.--------------------------------------------------------------------------- HINTS: * DO NOT USE A GENERAL PURPOSE WORDLIST * SUPPLIED WORDLIST MUST ONLY CONTAIN KNOWN FACTS ABOUT TARGET E.G NAMES, ADDRESS, FAVORITE ARTIST, PLACE, EVENT, ETC. * TRY TO KEEP WORDLIST AT A MINIMUM, DON'T INCLUDE TOO MUCH DETAILS * THE FINAL GENERATED WORD LIST CAN GET EXTREMELY LARGE!###########################################################################"""def help(): print """ ###### ######## ## ## ####### ## ## ## ## ## ### ## ## ## ## ## ## ## #### ## ## ## ## ## #### ###### ## ## ## ####### ##### ## ## ## ## #### ## ## ## ## ## ## ## ### ## ## ## ###### ######## ## ## ######### ## ## %s ======= Automated Word List Generator ======= Copyright © irenicus09 2013 USAGE: ./gen2k.py -w <wordlist> -o <output> [options] [ -c ] Enable word combination among the words in wordlist. [ -d ] Custom comma separated values to combine with wordlist. [ -e ] Enable wpa/wpa2 fitness check for generated passwords. [ -h ] Prints this help. [ -n ] Enable frequently used number combination with wordlist. [ -o ] Output filename. [ -w ] Path to word list file. Wordlist must contain info related to Target. [ -y ] Enable year combination with wordlist. [ -z ] Enable conversion of words to upper & lower case letters. Note: Conversion to upper/lowercase & capitalisation takes place before other modes are applied to the original list. """ % __version__def main(): if exist('-h'): help() sys.exit(0) if not (exist('-w') or exist('-o')): help() sys.exit(1) master_list = load_words(find('-w')) # List supplied by user data = [] # Final wordlist temp = [] # Temporary wordlist if exist('-z'): master_list = gen_case(master_list) data = master_list if exist('-c'): temp = gen_word_combo(master_list) data = list(set(temp+data)) if exist('-n'): temp = gen_numbers(master_list) data = list(set(temp+data)) if exist('-y'): temp = gen_year(master_list) data = list(set(temp+data)) if exist('-d'): try: custom_values = find('-d').split(',') except (AttributeError): print '[!] Are you kidding me with no values?' sys.exit(1) temp = gen_custom(master_list, custom_values) data = list(set(temp+data)) if exist('-e'): data = wpa_validation_check(data) write_file(find('-o'), data) print '[*] Total words generated: %d' % (len(data)) sys.exit(0)def merge_list(temp_list=[], final_list=[]): """ Merges contents from temp_list (1st param) with final_list (2nd param) """ for word in temp_list: if word not in final_list: final_list.append(word)def load_words(path_to_file): """ Function to fetch all possible words. """ data = [] try: handle = open(path_to_file, 'r') temp_list = handle.readlines() handle.close() except(BaseException): print '[!] Error occured while reading wordlist.' sys.exit(1) for word in temp_list: word = word.strip() if word != '': data.append(word) return datadef write_file(path_to_file, data=[]): """ Writing to specified file. """ try: handle = open(path_to_file, 'wb+') for word in data: handle.write(word+'\n') handle.close() except(BaseException): print '[!] Error occured while writing to file.' sys.exit(1)def gen_case(words=[]): """ Function to change words to Upper & Lower case. """ custom_list = [] for x in words: custom_list.append(x.lower()) custom_list.append(x.capitalize()) custom_list.append(x.upper()) return list(set(custom_list))def gen_numbers(words=[]): """ Function to mix words with commonly used numbers patterns. """ word_list = [] if len(words) <= 0: return word_list num_list = ['0', '01', '012', '0123', '01234', '012345', '0123456', '01234567', '012345678', '0123456789', '1', '12', '123', '1234','12345', '123456','1234567','12345678','123456789', '1234567890', '9876543210', '987654321', '87654321', '7654321', '654321', '54321', '4321', '321', '21'] for word in words: for num in num_list: word_list.append((word+num)) word_list.append((num+word)) return word_listdef gen_year(words=[]): """ Function to mix auto generated year with words from wordlist. Hint: Date of birth & special dates are often combined with certain words to form passwords. """ word_list = [] if len(words) <= 0: return word_list # Double digit dates start = 1 while(start <= 99): for word in words: word_list.append(word + str("%02d") % (start)) word_list.append(str("%02d") % start + word) start += 1 # Four digit dates start = 1900 while (start <= 2020): for word in words: word_list.append(word+str(start)) word_list.append(str(start)+word) start += 1 return word_listdef gen_word_combo(words=[]): """ Function to mix multiple words from given list. """ word_list = [] if len(words) <= 1: return word_list for word in words: for second_word in words: if word != second_word: word_list.append(second_word+word) return word_listdef gen_custom(words=[], data=[]): """ Funtion to combine user defined input with wordlist. > Takes a comma separated list via cmdline as values. """ word_list = [] if (len(words) <= 0 or len(data) <= 0): return word_list for item in data: for word in words: word_list.append(item+word) word_list.append(word+item) return word_listdef wpa_validation_check(words=[]): """ Function to optimise wordlist for wpa cracking > Removes Duplicates. > Removes passwords < 8 or > 63 characters in length. """ custom_list = list(set(words)) custom_list = [x for x in custom_list if not (len(x) < 8 or len(x) > 63)] return custom_list# S3my0n's argument parsers, thx brah def find(flag): try: a = sys.argv[sys.argv.index(flag)+1] except (IndexError, ValueError): return None else: return adef exist(flag): if flag in sys.argv[1:]: return True else: return Falseif __name__ == '__main__': main() or[Python] Gen2k [Automated Word List Generator] - Pastebin.comSource: https://irenicus09.wordpress.com/2013/05/19/gen2k-automated-wordlist-generator/ 1 Quote