cupp-0.0+20160624.git07f9b8/0000755000000000000000000000000012733341235013343 5ustar rootrootcupp-0.0+20160624.git07f9b8/cupp.py0000755000000000000000000015505112733341235014676 0ustar rootroot#!/usr/bin/python # # [Program] # # CUPP 3.1.0-alpha # Common User Passwords Profiler # # # # [Author] # # Muris Kurgas aka j0rgan # j0rgan [at] remote-exploit [dot] org # http://www.remote-exploit.org # http://www.azuzi.me # # # # [License] # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See 'docs/LICENSE' for more information. import sys import os import ftplib import ConfigParser import urllib import gzip import csv # Reading configuration file... config = ConfigParser.ConfigParser() config.read('cupp.cfg') years = config.get('years', 'years').split(',') chars = config.get('specialchars', 'chars').split(',') numfrom = config.getint('nums','from') numto = config.getint('nums','to') wcfrom = config.getint('nums','wcfrom') wcto = config.getint('nums','wcto') threshold = config.getint('nums','threshold') # 1337 mode configs, well you can add more lines if you add it to config file too. # You will need to add more lines in two places in cupp.py code as well... a = config.get('leet','a') i = config.get('leet','i') e = config.get('leet','e') t = config.get('leet','t') o = config.get('leet','o') s = config.get('leet','s') g = config.get('leet','g') z = config.get('leet','z') # for concatenations... def concats(seq, start, stop): for mystr in seq: for num in xrange(start, stop): yield mystr + str(num) # for sorting and making combinations... def komb(seq, start, special = ""): for mystr in seq: for mystr1 in start: yield mystr + special + mystr1 # print list to file counting words def print_to_file(filename, unique_list_finished): f = open ( filename, 'w' ) unique_list_finished.sort() f.write (os.linesep.join(unique_list_finished)) f = open ( filename, 'r' ) lines = 0 for line in f: lines += 1 f.close() print "[+] Saving dictionary to \033[1;31m"+filename+"\033[1;m, counting \033[1;31m"+str(lines)+" words.\033[1;m" print "[+] Now load your pistolero with \033[1;31m"+filename+"\033[1;m and shoot! Good luck!" if len(sys.argv) < 2 or sys.argv[1] == '-h': print " ___________ " print " \033[07m cupp.py! \033[27m # Common" print " \ # User" print " \ \033[1;31m,__,\033[1;m # Passwords" print " \ \033[1;31m(\033[1;moo\033[1;31m)____\033[1;m # Profiler" print " \033[1;31m(__) )\ \033[1;m " print " \033[1;31m ||--|| \033[1;m\033[05m*\033[25m\033[1;m [ Muris Kurgas | j0rgan@remote-exploit.org ]\r\n\r\n" print " [ Options ]\r\n" print " -h You are looking at it baby! :)" print " For more help take a look in docs/README" print " Global configuration file is cupp.cfg\n" print " -i Interactive questions for user password profiling\r\n" print " -w Use this option to improve existing dictionary," print " or WyD.pl output to make some pwnsauce\r\n" print " -l Download huge wordlists from repository\r\n" print " -a Parse default usernames and passwords directly from Alecto DB." print " Project Alecto uses purified databases of Phenoelit and CIRT" print " which where merged and enhanced.\r\n" print " -v Version of the program\r\n" exit() elif sys.argv[1] == '-v': print "\r\n \033[1;31m[ cupp.py ] v3.1.0-alpha\033[1;m\r\n" print " * Hacked up by j0rgan - j0rgan@remote-exploit.org" print " * http://www.remote-exploit.org\r\n" print " Take a look ./README.md file for more info about the program\r\n" exit() elif sys.argv[1] == '-w': if len(sys.argv) < 3: print "\r\n[Usage]: "+sys.argv[0]+" -w [FILENAME]\r\n" exit() fajl = open(sys.argv[2], "r") listic = fajl.readlines() linije = 0 for line in listic: linije += 1 listica = [] for x in listic: listica += x.split() print "\r\n *************************************************" print " * \033[1;31mWARNING!!!\033[1;m *" print " * Using large wordlists in some *" print " * options bellow is NOT recommended! *" print " *************************************************\r\n" conts = raw_input("> Do you want to concatenate all words from wordlist? Y/[N]: ").lower() if conts == "y" and linije > threshold: print "\r\n[-] Maximum number of words for concatenation is "+str(threshold) print "[-] Check configuration file for increasing this number.\r\n" conts = raw_input("> Do you want to concatenate all words from wordlist? Y/[N]: ").lower() conts = conts cont = [''] if conts == "y": for cont1 in listica: for cont2 in listica: if listica.index(cont1) != listica.index(cont2): cont.append(cont1+cont2) spechars = [''] spechars1 = raw_input("> Do you want to add special chars at the end of words? Y/[N]: ").lower() if spechars1 == "y": for spec1 in chars: spechars.append(spec1) for spec2 in chars: spechars.append(spec1+spec2) for spec3 in chars: spechars.append(spec1+spec2+spec3) randnum = raw_input("> Do you want to add some random numbers at the end of words? Y/[N]:").lower() leetmode = raw_input("> Leet mode? (i.e. leet = 1337) Y/[N]: ").lower() kombinacija1 = list(komb(listica, years)) kombinacija2 = [''] if conts == "y": kombinacija2 = list(komb(cont, years)) kombinacija3 = [''] kombinacija4 = [''] if spechars1 == "y": kombinacija3 = list(komb(listica, spechars)) if conts == "y": kombinacija4 = list(komb(cont, spechars)) kombinacija5 = [''] kombinacija6 = [''] if randnum == "y": kombinacija5 = list(concats(listica, numfrom, numto)) if conts == "y": kombinacija6 = list(concats(cont, numfrom, numto)) print "\r\n[+] Now making a dictionary..." print "[+] Sorting list and removing duplicates..." komb_unique1 = dict.fromkeys(kombinacija1).keys() komb_unique2 = dict.fromkeys(kombinacija2).keys() komb_unique3 = dict.fromkeys(kombinacija3).keys() komb_unique4 = dict.fromkeys(kombinacija4).keys() komb_unique5 = dict.fromkeys(kombinacija5).keys() komb_unique6 = dict.fromkeys(kombinacija6).keys() komb_unique7 = dict.fromkeys(listica).keys() komb_unique8 = dict.fromkeys(cont).keys() uniqlist = komb_unique1+komb_unique2+komb_unique3+komb_unique4+komb_unique5+komb_unique6+komb_unique7+komb_unique8 unique_lista = dict.fromkeys(uniqlist).keys() unique_leet = [] if leetmode == "y": for x in unique_lista: # if you want to add more leet chars, you will need to add more lines in cupp.cfg too... x = x.replace('a',a) x = x.replace('i',i) x = x.replace('e',e) x = x.replace('t',t) x = x.replace('o',o) x = x.replace('s',s) x = x.replace('g',g) x = x.replace('z',z) unique_leet.append(x) unique_list = unique_lista + unique_leet unique_list_finished = [] unique_list_finished = [x for x in unique_list if len(x) > wcfrom and len(x) < wcto] print_to_file(sys.argv[2]+'.cupp.txt', unique_list_finished) fajl.close() exit() elif sys.argv[1] == '-i': print "\r\n[+] Insert the informations about the victim to make a dictionary" print "[+] If you don't know all the info, just hit enter when asked! ;)\r\n" # We need some informations first! name = raw_input("> First Name: ").lower() while len(name) == 0 or name == " " or name == " " or name == " ": print "\r\n[-] You must enter a name at least!" name = raw_input("> Name: ").lower() name = str(name) surname = raw_input("> Surname: ").lower() nick = raw_input("> Nickname: ").lower() birthdate = raw_input("> Birthdate (DDMMYYYY): ") while len(birthdate) != 0 and len(birthdate) != 8: print "\r\n[-] You must enter 8 digits for birthday!" birthdate = raw_input("> Birthdate (DDMMYYYY): ") birthdate = str(birthdate) print "\r\n" wife = raw_input("> Partners) name: ").lower() wifen = raw_input("> Partners) nickname: ").lower() wifeb = raw_input("> Partners) birthdate (DDMMYYYY): ") while len(wifeb) != 0 and len(wifeb) != 8: print "\r\n[-] You must enter 8 digits for birthday!" wifeb = raw_input("> Partners birthdate (DDMMYYYY): ") wifeb = str(wifeb) print "\r\n" kid = raw_input("> Child's name: ").lower() kidn = raw_input("> Child's nickname: ").lower() kidb = raw_input("> Child's birthdate (DDMMYYYY): ") while len(kidb) != 0 and len(kidb) != 8: print "\r\n[-] You must enter 8 digits for birthday!" kidb = raw_input("> Child's birthdate (DDMMYYYY): ") kidb = str(kidb) print "\r\n" pet = raw_input("> Pet's name: ").lower() company = raw_input("> Company name: ").lower() print "\r\n" words = [''] words1 = raw_input("> Do you want to add some key words about the victim? Y/[N]: ").lower() words2 = "" if words1 == "y": words2 = raw_input("> Please enter the words, separated by comma. [i.e. hacker,juice,black], spaces will be removed: ").replace(" ","") words = words2.split(",") spechars = [''] spechars1 = raw_input("> Do you want to add special chars at the end of words? Y/[N]: ").lower() if spechars1 == "y": for spec1 in chars: spechars.append(spec1) for spec2 in chars: spechars.append(spec1+spec2) for spec3 in chars: spechars.append(spec1+spec2+spec3) randnum = raw_input("> Do you want to add some random numbers at the end of words? Y/[N]:").lower() leetmode = raw_input("> Leet mode? (i.e. leet = 1337) Y/[N]: ").lower() print "\r\n[+] Now making a dictionary..." # Now me must do some string modifications... # Birthdays first birthdate_yy = birthdate[-2:] birthdate_yyy = birthdate[-3:] birthdate_yyyy = birthdate[-4:] birthdate_xd = birthdate[1:2] birthdate_xm = birthdate[3:4] birthdate_dd = birthdate[:2] birthdate_mm = birthdate[2:4] wifeb_yy = wifeb[-2:] wifeb_yyy = wifeb[-3:] wifeb_yyyy = wifeb[-4:] wifeb_xd = wifeb[1:2] wifeb_xm = wifeb[3:4] wifeb_dd = wifeb[:2] wifeb_mm = wifeb[2:4] kidb_yy = kidb[-2:] kidb_yyy = kidb[-3:] kidb_yyyy = kidb[-4:] kidb_xd = kidb[1:2] kidb_xm = kidb[3:4] kidb_dd = kidb[:2] kidb_mm = kidb[2:4] # Convert first letters to uppercase... nameup = name.title() surnameup = surname.title() nickup = nick.title() wifeup = wife.title() wifenup = wifen.title() kidup = kid.title() kidnup = kidn.title() petup = pet.title() companyup = company.title() wordsup = [] wordsup = map(str.title, words) word = words+wordsup # reverse a name rev_name = name[::-1] rev_nameup = nameup[::-1] rev_nick = nick[::-1] rev_nickup = nickup[::-1] rev_wife = wife[::-1] rev_wifeup = wifeup[::-1] rev_kid = kid[::-1] rev_kidup = kidup[::-1] reverse = [rev_name, rev_nameup, rev_nick, rev_nickup, rev_wife, rev_wifeup, rev_kid, rev_kidup] rev_n = [rev_name, rev_nameup, rev_nick, rev_nickup] rev_w = [rev_wife, rev_wifeup] rev_k = [rev_kid, rev_kidup] # Let's do some serious work! This will be a mess of code, but... who cares? :) # Birthdays combinations bds = [birthdate_yy, birthdate_yyy, birthdate_yyyy, birthdate_xd, birthdate_xm, birthdate_dd, birthdate_mm] bdss = [] for bds1 in bds: bdss.append(bds1) for bds2 in bds: if bds.index(bds1) != bds.index(bds2): bdss.append(bds1+bds2) for bds3 in bds: if bds.index(bds1) != bds.index(bds2) and bds.index(bds2) != bds.index(bds3) and bds.index(bds1) != bds.index(bds3): bdss.append(bds1+bds2+bds3) # For a woman... wbds = [wifeb_yy, wifeb_yyy, wifeb_yyyy, wifeb_xd, wifeb_xm, wifeb_dd, wifeb_mm] wbdss = [] for wbds1 in wbds: wbdss.append(wbds1) for wbds2 in wbds: if wbds.index(wbds1) != wbds.index(wbds2): wbdss.append(wbds1+wbds2) for wbds3 in wbds: if wbds.index(wbds1) != wbds.index(wbds2) and wbds.index(wbds2) != wbds.index(wbds3) and wbds.index(wbds1) != wbds.index(wbds3): wbdss.append(wbds1+wbds2+wbds3) # and a child... kbds = [kidb_yy, kidb_yyy, kidb_yyyy, kidb_xd, kidb_xm, kidb_dd, kidb_mm] kbdss = [] for kbds1 in kbds: kbdss.append(kbds1) for kbds2 in kbds: if kbds.index(kbds1) != kbds.index(kbds2): kbdss.append(kbds1+kbds2) for kbds3 in kbds: if kbds.index(kbds1) != kbds.index(kbds2) and kbds.index(kbds2) != kbds.index(kbds3) and kbds.index(kbds1) != kbds.index(kbds3): kbdss.append(kbds1+kbds2+kbds3) # string combinations.... kombinaac = [pet, petup, company, companyup] kombina = [name, surname, nick, nameup, surnameup, nickup] kombinaw = [wife, wifen, wifeup, wifenup, surname, surnameup] kombinak = [kid, kidn, kidup, kidnup, surname, surnameup] kombinaa = [] for kombina1 in kombina: kombinaa.append(kombina1) for kombina2 in kombina: if kombina.index(kombina1) != kombina.index(kombina2) and kombina.index(kombina1.title()) != kombina.index(kombina2.title()): kombinaa.append(kombina1+kombina2) kombinaaw = [] for kombina1 in kombinaw: kombinaaw.append(kombina1) for kombina2 in kombinaw: if kombinaw.index(kombina1) != kombinaw.index(kombina2) and kombinaw.index(kombina1.title()) != kombinaw.index(kombina2.title()): kombinaaw.append(kombina1+kombina2) kombinaak = [] for kombina1 in kombinak: kombinaak.append(kombina1) for kombina2 in kombinak: if kombinak.index(kombina1) != kombinak.index(kombina2) and kombinak.index(kombina1.title()) != kombinak.index(kombina2.title()): kombinaak.append(kombina1+kombina2) komb1 = list(komb(kombinaa, bdss)) komb1 += list(komb(kombinaa, bdss, "_")) komb2 = list(komb(kombinaaw, wbdss)) komb2 += list(komb(kombinaaw, wbdss, "_")) komb3 = list(komb(kombinaak, kbdss)) komb3 += list(komb(kombinaak, kbdss, "_")) komb4 = list(komb(kombinaa, years)) komb4 += list(komb(kombinaa, years, "_")) komb5 = list(komb(kombinaac, years)) komb5 += list(komb(kombinaac, years, "_")) komb6 = list(komb(kombinaaw, years)) komb6 += list(komb(kombinaaw, years, "_")) komb7 = list(komb(kombinaak, years)) komb7 += list(komb(kombinaak, years, "_")) komb8 = list(komb(word, bdss)) komb8 += list(komb(word, bdss, "_")) komb9 = list(komb(word, wbdss)) komb9 += list(komb(word, wbdss, "_")) komb10 = list(komb(word, kbdss)) komb10 += list(komb(word, kbdss, "_")) komb11 = list(komb(word, years)) komb11 += list(komb(word, years, "_")) komb12 = [''] komb13 = [''] komb14 = [''] komb15 = [''] komb16 = [''] komb21 = [''] if randnum == "y": komb12 = list(concats(word, numfrom, numto)) komb13 = list(concats(kombinaa, numfrom, numto)) komb14 = list(concats(kombinaac, numfrom, numto)) komb15 = list(concats(kombinaaw, numfrom, numto)) komb16 = list(concats(kombinaak, numfrom, numto)) komb21 = list(concats(reverse, numfrom, numto)) komb17 = list(komb(reverse, years)) komb17 += list(komb(reverse, years, "_")) komb18 = list(komb(rev_w, wbdss)) komb18 += list(komb(rev_w, wbdss, "_")) komb19 = list(komb(rev_k, kbdss)) komb19 += list(komb(rev_k, kbdss, "_")) komb20 = list(komb(rev_n, bdss)) komb20 += list(komb(rev_n, bdss, "_")) komb001 = [''] komb002 = [''] komb003 = [''] komb004 = [''] komb005 = [''] komb006 = [''] if spechars1 == "y": komb001 = list(komb(kombinaa, spechars)) komb002 = list(komb(kombinaac, spechars)) komb003 = list(komb(kombinaaw , spechars)) komb004 = list(komb(kombinaak , spechars)) komb005 = list(komb(word, spechars)) komb006 = list(komb(reverse, spechars)) print "[+] Sorting list and removing duplicates..." komb_unique1 = dict.fromkeys(komb1).keys() komb_unique2 = dict.fromkeys(komb2).keys() komb_unique3 = dict.fromkeys(komb3).keys() komb_unique4 = dict.fromkeys(komb4).keys() komb_unique5 = dict.fromkeys(komb5).keys() komb_unique6 = dict.fromkeys(komb6).keys() komb_unique7 = dict.fromkeys(komb7).keys() komb_unique8 = dict.fromkeys(komb8).keys() komb_unique9 = dict.fromkeys(komb9).keys() komb_unique10 = dict.fromkeys(komb10).keys() komb_unique11 = dict.fromkeys(komb11).keys() komb_unique12 = dict.fromkeys(komb12).keys() komb_unique13 = dict.fromkeys(komb13).keys() komb_unique14 = dict.fromkeys(komb14).keys() komb_unique15 = dict.fromkeys(komb15).keys() komb_unique16 = dict.fromkeys(komb16).keys() komb_unique17 = dict.fromkeys(komb17).keys() komb_unique18 = dict.fromkeys(komb18).keys() komb_unique19 = dict.fromkeys(komb19).keys() komb_unique20 = dict.fromkeys(komb20).keys() komb_unique21 = dict.fromkeys(komb21).keys() komb_unique01 = dict.fromkeys(kombinaa).keys() komb_unique02 = dict.fromkeys(kombinaac).keys() komb_unique03 = dict.fromkeys(kombinaaw).keys() komb_unique04 = dict.fromkeys(kombinaak).keys() komb_unique05 = dict.fromkeys(word).keys() komb_unique07 = dict.fromkeys(komb001).keys() komb_unique08 = dict.fromkeys(komb002).keys() komb_unique09 = dict.fromkeys(komb003).keys() komb_unique010 = dict.fromkeys(komb004).keys() komb_unique011 = dict.fromkeys(komb005).keys() komb_unique012 = dict.fromkeys(komb006).keys() uniqlist = bdss+wbdss+kbdss+reverse+komb_unique01+komb_unique02+komb_unique03+komb_unique04+komb_unique05+komb_unique1+komb_unique2+komb_unique3+komb_unique4+komb_unique5+komb_unique6+komb_unique7+komb_unique8+komb_unique9+komb_unique10+komb_unique11+komb_unique12+komb_unique13+komb_unique14+komb_unique15+komb_unique16+komb_unique17+komb_unique18+komb_unique19+komb_unique20+komb_unique21+komb_unique07+komb_unique08+komb_unique09+komb_unique010+komb_unique011+komb_unique012 unique_lista = dict.fromkeys(uniqlist).keys() unique_leet = [] if leetmode == "y": for x in unique_lista: # if you want to add more leet chars, you will need to add more lines in cupp.cfg too... x = x.replace('a',a) x = x.replace('i',i) x = x.replace('e',e) x = x.replace('t',t) x = x.replace('o',o) x = x.replace('s',s) x = x.replace('g',g) x = x.replace('z',z) unique_leet.append(x) unique_list = unique_lista + unique_leet unique_list_finished = [] unique_list_finished = [x for x in unique_list if len(x) < wcto and len(x) > wcfrom] print_to_file(name+'.txt', unique_list_finished) exit() elif sys.argv[1] == '-a': url = config.get('alecto','alectourl') print "\r\n[+] Checking if alectodb is not present..." if os.path.isfile('alectodb.csv.gz') == 0: print "[+] Downloading alectodb.csv.gz..." webFile = urllib.urlopen(url) localFile = open(url.split('/')[-1], 'w') localFile.write(webFile.read()) webFile.close() localFile.close() f = gzip.open('alectodb.csv.gz', 'rb') data = csv.reader(f) usernames = [] passwords = [] for row in data: usernames.append(row[5]) passwords.append(row[6]) gus = list(set(usernames)) gpa = list(set(passwords)) gus.sort() gpa.sort() print "\r\n[+] Exporting to alectodb-usernames.txt and alectodb-passwords.txt\r\n[+] Done." f = open ( 'alectodb-usernames.txt', 'w' ) f.write (os.linesep.join(gus)) f.close() f = open ( 'alectodb-passwords.txt', 'w' ) f.write (os.linesep.join(gpa)) f.close() f.close() sys.exit() elif sys.argv[1] == '-l': ftpname = config.get('downloader','ftpname') ftpurl = config.get('downloader','ftpurl') ftppath = config.get('downloader','ftppath') ftpuser = config.get('downloader','ftpuser') ftppass = config.get('downloader','ftppass') if os.path.isdir('dictionaries') == 0: os.mkdir('dictionaries') print " \r\n Choose the section you want to download:\r\n" print " 1 Moby 14 french 27 places" print " 2 afrikaans 15 german 28 polish" print " 3 american 16 hindi 39 random" print " 4 aussie 17 hungarian 30 religion" print " 5 chinese 18 italian 31 russian" print " 6 computer 19 japanese 32 science" print " 7 croatian 20 latin 33 spanish" print " 8 czech 21 literature 34 swahili" print " 9 danish 22 movieTV 35 swedish" print " 10 databases 23 music 36 turkish" print " 11 dictionaries 24 names 37 yiddish" print " 12 dutch 25 net 38 exit program" print " 13 finnish 26 norwegian \r\n" print " \r\n Files will be downloaded from "+ftpname+" repository" print " \r\n Tip: After downloading wordlist, you can improve it with -w option\r\n" filedown = raw_input("> Enter number: ") filedown.isdigit() while filedown.isdigit() == 0: print "\r\n[-] Wrong choice. " filedown = raw_input("> Enter number: ") filedown = str(filedown) while int(filedown) > 38: print "\r\n[-] Wrong choice. " filedown = raw_input("> Enter number: ") filedown = str(filedown) def handleDownload(block): file.write(block) print ".", def downloader(): ftp.login(ftpuser, ftppass) ftp.cwd(ftppath) def filequitter(): file.close() print ' done.' if filedown == "1": print "\r\n[+] connecting...\r\n" ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('Moby') if os.path.isdir('dictionaries/Moby/') == 0: os.mkdir('dictionaries/Moby/') dire = 'dictionaries/Moby/' file = open(dire+'mhyph.tar.gz', 'wb') print "\r\n[+] downloading mhyph.tar.gz..." ftp.retrbinary('RETR ' + 'mhyph.tar.gz', handleDownload) filequitter() file = open(dire+'mlang.tar.gz', 'wb') print "\r\n[+] downloading mlang.tar.gz..." ftp.retrbinary('RETR ' + 'mlang.tar.gz', handleDownload) filequitter() file = open(dire+'moby.tar.gz', 'wb') print "\r\n[+] downloading moby.tar.gz..." ftp.retrbinary('RETR ' + 'moby.tar.gz', handleDownload) filequitter() file = open(dire+'mpos.tar.gz', 'wb') print "\r\n[+] downloading mpos.tar.gz..." ftp.retrbinary('RETR ' + 'mpos.tar.gz', handleDownload) filequitter() file = open(dire+'mpron.tar.gz', 'wb') print "\r\n[+] downloading mpron.tar.gz..." ftp.retrbinary('RETR ' + 'mpron.tar.gz', handleDownload) filequitter() file = open(dire+'mthes.tar.gz', 'wb') print "\r\n[+] downloading mthes.tar.gz..." ftp.retrbinary('RETR ' + 'mthes.tar.gz', handleDownload) filequitter() file = open(dire+'mwords.tar.gz', 'wb') print "\r\n[+] downloading mwords.tar.gz..." ftp.retrbinary('RETR ' + 'mwords.tar.gz', handleDownload) filequitter() print '[+] files saved to '+ dire ftp.quit() exit() if filedown == "2": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('afrikaans') if os.path.isdir('dictionaries/afrikaans/') == 0: os.mkdir('dictionaries/afrikaans/') dire = 'dictionaries/afrikaans/' file = open(dire+'afr_dbf.zip', 'wb') print "\r\n[+] downloading afr_dbf.zip..." ftp.retrbinary('RETR ' + 'afr_dbf.zip', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "3": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('american') if os.path.isdir('dictionaries/american/') == 0: os.mkdir('dictionaries/american/') dire = 'dictionaries/american/' file = open(dire+'dic-0294.tar.gz', 'wb') print "\r\n[+] downloading dic-0294.tar.gz..." ftp.retrbinary('RETR ' + 'dic-0294.tar.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "4": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('aussie') if os.path.isdir('dictionaries/aussie/') == 0: os.mkdir('dictionaries/aussie/') dire = 'dictionaries/aussie/' file = open(dire+'oz.gz', 'wb') print "\r\n[+] downloading oz.gz..." ftp.retrbinary('RETR ' + 'oz.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "5": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('chinese') if os.path.isdir('dictionaries/chinese/') == 0: os.mkdir('dictionaries/chinese/') dire = 'dictionaries/chinese/' file = open(dire+'chinese.gz', 'wb') print "\r\n[+] downloading chinese.gz..." ftp.retrbinary('RETR ' + 'chinese.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "6": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('computer') if os.path.isdir('dictionaries/computer/') == 0: os.mkdir('dictionaries/computer/') dire = 'dictionaries/computer/' file = open(dire+'Domains.gz', 'wb') print "\r\n[+] downloading Domains.gz..." ftp.retrbinary('RETR ' + 'Domains.gz', handleDownload) filequitter() file = open(dire+'Dosref.gz', 'wb') print "\r\n[+] downloading Dosref.gz..." ftp.retrbinary('RETR ' + 'Dosref.gz', handleDownload) filequitter() file = open(dire+'Ftpsites.gz', 'wb') print "\r\n[+] downloading Ftpsites.gz..." ftp.retrbinary('RETR ' + 'Ftpsites.gz', handleDownload) filequitter() file = open(dire+'Jargon.gz', 'wb') print "\r\n[+] downloading Jargon.gz..." ftp.retrbinary('RETR ' + 'Jargon.gz', handleDownload) filequitter() file = open(dire+'common-passwords.txt.gz', 'wb') print "\r\n[+] downloading common-passwords.txt.gz..." ftp.retrbinary('RETR ' + 'common-passwords.txt.gz', handleDownload) filequitter() file = open(dire+'etc-hosts.gz', 'wb') print "\r\n[+] downloading etc-hosts.gz..." ftp.retrbinary('RETR ' + 'etc-hosts.gz', handleDownload) filequitter() file = open(dire+'foldoc.gz', 'wb') print "\r\n[+] downloading foldoc.gz..." ftp.retrbinary('RETR ' + 'foldoc.gz', handleDownload) filequitter() file = open(dire+'language-list.gz', 'wb') print "\r\n[+] downloading language-list.gz..." ftp.retrbinary('RETR ' + 'language-list.gz', handleDownload) filequitter() file = open(dire+'unix.gz', 'wb') print "\r\n[+] downloading unix.gz..." ftp.retrbinary('RETR ' + 'unix.gz', handleDownload) filequitter() print '[+] files saved to '+ dire ftp.quit() exit() if filedown == "7": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('croatian') if os.path.isdir('dictionaries/croatian/') == 0: os.mkdir('dictionaries/croatian/') dire = 'dictionaries/croatian/' file = open(dire+'croatian.gz', 'wb') print "\r\n[+] downloading croatian.gz..." ftp.retrbinary('RETR ' + 'croatian.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "8": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('czech') if os.path.isdir('dictionaries/czech/') == 0: os.mkdir('dictionaries/czech/') dire = 'dictionaries/czech/' file = open(dire+'czech-wordlist-ascii-cstug-novak.gz', 'wb') print "\r\n[+] downloading czech-wordlist-ascii-cstug-novak.gz..." ftp.retrbinary('RETR ' + 'czech-wordlist-ascii-cstug-novak.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "9": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('danish') if os.path.isdir('dictionaries/danish/') == 0: os.mkdir('dictionaries/danish/') dire = 'dictionaries/danish/' file = open(dire+'danish.words.gz', 'wb') print "\r\n[+] downloading danish.words.gz..." ftp.retrbinary('RETR ' + 'danish.words.gz', handleDownload) filequitter() file = open(dire+'dansk.zip', 'wb') print "\r\n[+] downloading dansk.zip..." ftp.retrbinary('RETR ' + 'dansk.zip', handleDownload) filequitter() print '[+] files saved to '+ dire ftp.quit() exit() if filedown == "10": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('databases') if os.path.isdir('dictionaries/databases/') == 0: os.mkdir('dictionaries/databases/') dire = 'dictionaries/databases/' file = open(dire+'acronyms.gz', 'wb') print "\r\n[+] downloading acronyms.gz..." ftp.retrbinary('RETR ' + 'acronyms.gz', handleDownload) filequitter() file = open(dire+'att800.gz', 'wb') print "\r\n[+] downloading att800.gz..." ftp.retrbinary('RETR ' + 'att800.gz', handleDownload) filequitter() file = open(dire+'computer-companies.gz', 'wb') print "\r\n[+] downloading computer-companies.gz..." ftp.retrbinary('RETR ' + 'computer-companies.gz', handleDownload) filequitter() file = open(dire+'world_heritage.gz', 'wb') print "\r\n[+] downloading world_heritage.gz..." ftp.retrbinary('RETR ' + 'world_heritage.gz', handleDownload) filequitter() print '[+] files saved to '+ dire ftp.quit() exit() if filedown == "11": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('dictionaries') if os.path.isdir('dictionaries/dictionaries/') == 0: os.mkdir('dictionaries/dictionaries/') dire = 'dictionaries/dictionaries/' file = open(dire+'Antworth.gz', 'wb') print "\r\n[+] downloading Antworth.gz..." ftp.retrbinary('RETR ' + 'Antworth.gz', handleDownload) filequitter() file = open(dire+'CRL.words.gz', 'wb') print "\r\n[+] downloading CRL.words.gz..." ftp.retrbinary('RETR ' + 'CRL.words.gz', handleDownload) filequitter() file = open(dire+'Roget.words.gz', 'wb') print "\r\n[+] downloading Roget.words.gz..." ftp.retrbinary('RETR ' + 'Roget.words.gz', handleDownload) filequitter() file = open(dire+'Unabr.dict.gz', 'wb') print "\r\n[+] downloading Unabr.dict.gz..." ftp.retrbinary('RETR ' + 'Unabr.dict.gz', handleDownload) filequitter() file = open(dire+'Unix.dict.gz', 'wb') print "\r\n[+] downloading Unix.dict.gz..." ftp.retrbinary('RETR ' + 'Unix.dict.gz', handleDownload) filequitter() file = open(dire+'englex-dict.gz', 'wb') print "\r\n[+] downloading englex-dict.gz..." ftp.retrbinary('RETR ' + 'englex-dict.gz', handleDownload) filequitter() file = open(dire+'knuth_britsh.gz', 'wb') print "\r\n[+] downloading knuth_britsh.gz..." ftp.retrbinary('RETR ' + 'knuth_britsh.gz', handleDownload) filequitter() file = open(dire+'knuth_words.gz', 'wb') print "\r\n[+] downloading knuth_words.gz..." ftp.retrbinary('RETR ' + 'knuth_words.gz', handleDownload) filequitter() file = open(dire+'pocket-dic.gz', 'wb') print "\r\n[+] downloading pocket-dic.gz..." ftp.retrbinary('RETR ' + 'pocket-dic.gz', handleDownload) filequitter() file = open(dire+'shakesp-glossary.gz', 'wb') print "\r\n[+] downloading shakesp-glossary.gz..." ftp.retrbinary('RETR ' + 'shakesp-glossary.gz', handleDownload) filequitter() file = open(dire+'special.eng.gz', 'wb') print "\r\n[+] downloading special.eng.gz..." ftp.retrbinary('RETR ' + 'special.eng.gz', handleDownload) filequitter() file = open(dire+'words-english.gz', 'wb') print "\r\n[+] downloading words-english.gz..." ftp.retrbinary('RETR ' + 'words-english.gz', handleDownload) filequitter() print '[+] files saved to '+ dire ftp.quit() exit() if filedown == "12": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('dutch') if os.path.isdir('dictionaries/dutch/') == 0: os.mkdir('dictionaries/dutch/') dire = 'dictionaries/dutch/' file = open(dire+'words.dutch.gz', 'wb') print "\r\n[+] downloading words.dutch.gz..." ftp.retrbinary('RETR ' + 'words.dutch.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "13": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('finnish') if os.path.isdir('dictionaries/finnish/') == 0: os.mkdir('dictionaries/finnish/') dire = 'dictionaries/finnish/' file = open(dire+'finnish.gz', 'wb') print "\r\n[+] downloading finnish.gz..." ftp.retrbinary('RETR ' + 'finnish.gz', handleDownload) filequitter() file = open(dire+'firstnames.finnish.gz', 'wb') print "\r\n[+] downloading firstnames.finnish.gz..." ftp.retrbinary('RETR ' + 'firstnames.finnish.gz', handleDownload) filequitter() file = open(dire+'words.finnish.FAQ.gz', 'wb') print "\r\n[+] downloading words.finnish.FAQ.gz..." ftp.retrbinary('RETR ' + 'words.finnish.FAQ.gz', handleDownload) filequitter() print '[+] files saved to '+ dire ftp.quit() exit() if filedown == "14": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('french') if os.path.isdir('dictionaries/french/') == 0: os.mkdir('dictionaries/french/') dire = 'dictionaries/french/' file = open(dire+'dico.gz', 'wb') print "\r\n[+] downloading dico.gz..." ftp.retrbinary('RETR ' + 'dico.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "15": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('german') if os.path.isdir('dictionaries/german/') == 0: os.mkdir('dictionaries/german/') dire = 'dictionaries/german/' file = open(dire+'deutsch.dic.gz', 'wb') print "\r\n[+] downloading deutsch.dic.gz..." ftp.retrbinary('RETR ' + 'deutsch.dic.gz', handleDownload) filequitter() file = open(dire+'germanl.gz', 'wb') print "\r\n[+] downloading germanl.gz..." ftp.retrbinary('RETR ' + 'germanl.gz', handleDownload) filequitter() file = open(dire+'words.german.gz', 'wb') print "\r\n[+] downloading words.german.gz..." ftp.retrbinary('RETR ' + 'words.german.gz', handleDownload) filequitter() print '[+] files saved to '+ dire ftp.quit() exit() if filedown == "16": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('hindi') if os.path.isdir('dictionaries/hindi/') == 0: os.mkdir('dictionaries/hindi/') dire = 'dictionaries/hindi/' file = open(dire+'hindu-names.gz', 'wb') print "\r\n[+] downloading hindu-names.gz..." ftp.retrbinary('RETR ' + 'hindu-names.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "17": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('hungarian') if os.path.isdir('dictionaries/hungarian/') == 0: os.mkdir('dictionaries/hungarian/') dire = 'dictionaries/hungarian/' file = open(dire+'hungarian.gz', 'wb') print "\r\n[+] downloading hungarian.gz..." ftp.retrbinary('RETR ' + 'hungarian.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "18": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('italian') if os.path.isdir('dictionaries/italian/') == 0: os.mkdir('dictionaries/italian/') dire = 'dictionaries/italian/' file = open(dire+'words.italian.gz', 'wb') print "\r\n[+] downloading words.italian.gz..." ftp.retrbinary('RETR ' + 'words.italian.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "19": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('japanese') if os.path.isdir('dictionaries/japanese/') == 0: os.mkdir('dictionaries/japanese/') dire = 'dictionaries/japanese/' file = open(dire+'words.japanese.gz', 'wb') print "\r\n[+] downloading words.japanese.gz..." ftp.retrbinary('RETR ' + 'words.japanese.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "20": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('latin') if os.path.isdir('dictionaries/latin/') == 0: os.mkdir('dictionaries/latin/') dire = 'dictionaries/latin/' file = open(dire+'wordlist.aug.gz', 'wb') print "\r\n[+] downloading wordlist.aug.gz..." ftp.retrbinary('RETR ' + 'wordlist.aug.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "21": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('literature') if os.path.isdir('dictionaries/literature/') == 0: os.mkdir('dictionaries/literature/') dire = 'dictionaries/literature/' file = open(dire+'LCarrol.gz', 'wb') print "\r\n[+] downloading LCarrol.gz..." ftp.retrbinary('RETR ' + 'LCarrol.gz', handleDownload) filequitter() file = open(dire+'Paradise.Lost.gz', 'wb') print "\r\n[+] downloading Paradise.Lost.gz..." ftp.retrbinary('RETR ' + 'Paradise.Lost.gz', handleDownload) filequitter() file = open(dire+'aeneid.gz', 'wb') print "\r\n[+] downloading aeneid.gz..." ftp.retrbinary('RETR ' + 'aeneid.gz', handleDownload) filequitter() file = open(dire+'arthur.gz', 'wb') print "\r\n[+] downloading arthur.gz..." ftp.retrbinary('RETR ' + 'arthur.gz', handleDownload) filequitter() file = open(dire+'cartoon.gz', 'wb') print "\r\n[+] downloading cartoon.gz..." ftp.retrbinary('RETR ' + 'cartoon.gz', handleDownload) filequitter() file = open(dire+'cartoons-olivier.gz', 'wb') print "\r\n[+] downloading cartoons-olivier.gz..." ftp.retrbinary('RETR ' + 'cartoons-olivier.gz', handleDownload) filequitter() file = open(dire+'charlemagne.gz', 'wb') print "\r\n[+] downloading charlemagne.gz..." ftp.retrbinary('RETR ' + 'charlemagne.gz', handleDownload) filequitter() file = open(dire+'fable.gz', 'wb') print "\r\n[+] downloading fable.gz..." ftp.retrbinary('RETR ' + 'fable.gz', handleDownload) filequitter() file = open(dire+'iliad.gz', 'wb') print "\r\n[+] downloading iliad.gz..." ftp.retrbinary('RETR ' + 'iliad.gz', handleDownload) filequitter() file = open(dire+'myths-legends.gz', 'wb') print "\r\n[+] downloading myths-legends.gz..." ftp.retrbinary('RETR ' + 'myths-legends.gz', handleDownload) filequitter() file = open(dire+'odyssey.gz', 'wb') print "\r\n[+] downloading odyssey.gz..." ftp.retrbinary('RETR ' + 'odyssey.gz', handleDownload) filequitter() file = open(dire+'sf.gz', 'wb') print "\r\n[+] downloading sf.gz..." ftp.retrbinary('RETR ' + 'sf.gz', handleDownload) filequitter() file = open(dire+'shakespeare.gz', 'wb') print "\r\n[+] downloading shakespeare.gz..." ftp.retrbinary('RETR ' + 'shakespeare.gz', handleDownload) filequitter() file = open(dire+'tolkien.words.gz', 'wb') print "\r\n[+] downloading tolkien.words.gz..." ftp.retrbinary('RETR ' + 'tolkien.words.gz', handleDownload) filequitter() print '[+] files saved to '+ dire ftp.quit() exit() if filedown == "22": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('movieTV') if os.path.isdir('dictionaries/movieTV/') == 0: os.mkdir('dictionaries/movieTV/') dire = 'dictionaries/movieTV/' file = open(dire+'Movies.gz', 'wb') print "\r\n[+] downloading Movies.gz..." ftp.retrbinary('RETR ' + 'Movies.gz', handleDownload) filequitter() file = open(dire+'Python.gz', 'wb') print "\r\n[+] downloading Python.gz..." ftp.retrbinary('RETR ' + 'Python.gz', handleDownload) filequitter() file = open(dire+'Trek.gz', 'wb') print "\r\n[+] downloading Trek.gz..." ftp.retrbinary('RETR ' + 'Trek.gz', handleDownload) filequitter() print '[+] files saved to '+ dire ftp.quit() exit() if filedown == "23": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('music') if os.path.isdir('dictionaries/music/') == 0: os.mkdir('dictionaries/music/') dire = 'dictionaries/music/' file = open(dire+'music-classical.gz', 'wb') print "\r\n[+] downloading music-classical.gz..." ftp.retrbinary('RETR ' + 'music-classical.gz', handleDownload) filequitter() file = open(dire+'music-country.gz', 'wb') print "\r\n[+] downloading music-country.gz..." ftp.retrbinary('RETR ' + 'music-country.gz', handleDownload) filequitter() file = open(dire+'music-jazz.gz', 'wb') print "\r\n[+] downloading music-jazz.gz..." ftp.retrbinary('RETR ' + 'music-jazz.gz', handleDownload) filequitter() file = open(dire+'music-other.gz', 'wb') print "\r\n[+] downloading music-other.gz..." ftp.retrbinary('RETR ' + 'music-other.gz', handleDownload) filequitter() file = open(dire+'music-rock.gz', 'wb') print "\r\n[+] downloading music-rock.gz..." ftp.retrbinary('RETR ' + 'music-rock.gz', handleDownload) filequitter() file = open(dire+'music-shows.gz', 'wb') print "\r\n[+] downloading music-shows.gz..." ftp.retrbinary('RETR ' + 'music-shows.gz', handleDownload) filequitter() file = open(dire+'rock-groups.gz', 'wb') print "\r\n[+] downloading rock-groups.gz..." ftp.retrbinary('RETR ' + 'rock-groups.gz', handleDownload) filequitter() print '[+] files saved to '+ dire ftp.quit() exit() if filedown == "24": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('names') if os.path.isdir('dictionaries/names/') == 0: os.mkdir('dictionaries/names/') dire = 'dictionaries/names/' file = open(dire+'ASSurnames.gz', 'wb') print "\r\n[+] downloading ASSurnames.gz..." ftp.retrbinary('RETR ' + 'ASSurnames.gz', handleDownload) filequitter() file = open(dire+'Congress.gz', 'wb') print "\r\n[+] downloading Congress.gz..." ftp.retrbinary('RETR ' + 'Congress.gz', handleDownload) filequitter() file = open(dire+'Family-Names.gz', 'wb') print "\r\n[+] downloading Family-Names.gz..." ftp.retrbinary('RETR ' + 'Family-Names.gz', handleDownload) filequitter() file = open(dire+'Given-Names.gz', 'wb') print "\r\n[+] downloading Given-Names.gz..." ftp.retrbinary('RETR ' + 'Given-Names.gz', handleDownload) filequitter() file = open(dire+'actor-givenname.gz', 'wb') print "\r\n[+] downloading actor-givenname.gz..." ftp.retrbinary('RETR ' + 'actor-givenname.gz', handleDownload) filequitter() file = open(dire+'actor-surname.gz', 'wb') print "\r\n[+] downloading actor-surname.gz..." ftp.retrbinary('RETR ' + 'actor-surname.gz', handleDownload) filequitter() file = open(dire+'cis-givenname.gz', 'wb') print "\r\n[+] downloading cis-givenname.gz..." ftp.retrbinary('RETR ' + 'cis-givenname.gz', handleDownload) filequitter() file = open(dire+'cis-surname.gz', 'wb') print "\r\n[+] downloading cis-surname.gz..." ftp.retrbinary('RETR ' + 'cis-surname.gz', handleDownload) filequitter() file = open(dire+'crl-names.gz', 'wb') print "\r\n[+] downloading crl-names.gz..." ftp.retrbinary('RETR ' + 'crl-names.gz', handleDownload) filequitter() file = open(dire+'famous.gz', 'wb') print "\r\n[+] downloading famous.gz..." ftp.retrbinary('RETR ' + 'famous.gz', handleDownload) filequitter() file = open(dire+'fast-names.gz', 'wb') print "\r\n[+] downloading fast-names.gz..." ftp.retrbinary('RETR ' + 'fast-names.gz', handleDownload) filequitter() file = open(dire+'female-names-kantr.gz', 'wb') print "\r\n[+] downloading female-names-kantr.gz..." ftp.retrbinary('RETR ' + 'female-names-kantr.gz', handleDownload) filequitter() file = open(dire+'female-names.gz', 'wb') print "\r\n[+] downloading female-names.gz..." ftp.retrbinary('RETR ' + 'female-names.gz', handleDownload) filequitter() file = open(dire+'givennames-ol.gz', 'wb') print "\r\n[+] downloading givennames-ol.gz..." ftp.retrbinary('RETR ' + 'givennames-ol.gz', handleDownload) filequitter() file = open(dire+'male-names-kantr.gz', 'wb') print "\r\n[+] downloading male-names-kantr.gz..." ftp.retrbinary('RETR ' + 'male-names-kantr.gz', handleDownload) filequitter() file = open(dire+'male-names.gz', 'wb') print "\r\n[+] downloading male-names.gz..." ftp.retrbinary('RETR ' + 'male-names.gz', handleDownload) filequitter() file = open(dire+'movie-characters.gz', 'wb') print "\r\n[+] downloading movie-characters.gz..." ftp.retrbinary('RETR ' + 'movie-characters.gz', handleDownload) filequitter() file = open(dire+'names.french.gz', 'wb') print "\r\n[+] downloading names.french.gz..." ftp.retrbinary('RETR ' + 'names.french.gz', handleDownload) filequitter() file = open(dire+'names.hp.gz', 'wb') print "\r\n[+] downloading names.hp.gz..." ftp.retrbinary('RETR ' + 'names.hp.gz', handleDownload) filequitter() file = open(dire+'other-names.gz', 'wb') print "\r\n[+] downloading other-names.gz..." ftp.retrbinary('RETR ' + 'other-names.gz', handleDownload) filequitter() file = open(dire+'shakesp-names.gz', 'wb') print "\r\n[+] downloading shakesp-names.gz..." ftp.retrbinary('RETR ' + 'shakesp-names.gz', handleDownload) filequitter() file = open(dire+'surnames-ol.gz', 'wb') print "\r\n[+] downloading surnames-ol.gz..." ftp.retrbinary('RETR ' + 'surnames-ol.gz', handleDownload) filequitter() file = open(dire+'surnames.finnish.gz', 'wb') print "\r\n[+] downloading surnames.finnish.gz..." ftp.retrbinary('RETR ' + 'surnames.finnish.gz', handleDownload) filequitter() file = open(dire+'usenet-names.gz', 'wb') print "\r\n[+] downloading usenet-names.gz..." ftp.retrbinary('RETR ' + 'usenet-names.gz', handleDownload) filequitter() print '[+] files saved to '+ dire ftp.quit() exit() if filedown == "25": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('net') if os.path.isdir('dictionaries/net/') == 0: os.mkdir('dictionaries/net/') dire = 'dictionaries/net/' file = open(dire+'hosts-txt.gz', 'wb') print "\r\n[+] downloading hosts-txt.gz..." ftp.retrbinary('RETR ' + 'hosts-txt.gz', handleDownload) filequitter() file = open(dire+'inet-machines.gz', 'wb') print "\r\n[+] downloading inet-machines.gz..." ftp.retrbinary('RETR ' + 'inet-machines.gz', handleDownload) filequitter() file = open(dire+'usenet-loginids.gz', 'wb') print "\r\n[+] downloading usenet-loginids.gz..." ftp.retrbinary('RETR ' + 'usenet-loginids.gz', handleDownload) filequitter() file = open(dire+'usenet-machines.gz', 'wb') print "\r\n[+] downloading usenet-machines.gz..." ftp.retrbinary('RETR ' + 'usenet-machines.gz', handleDownload) filequitter() file = open(dire+'uunet-sites.gz', 'wb') print "\r\n[+] downloading uunet-sites.gz..." ftp.retrbinary('RETR ' + 'uunet-sites.gz', handleDownload) filequitter() print '[+] files saved to '+ dire ftp.quit() exit() if filedown == "26": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('norwegian') if os.path.isdir('dictionaries/norwegian/') == 0: os.mkdir('dictionaries/norwegian/') dire = 'dictionaries/norwegian/' file = open(dire+'words.norwegian.gz', 'wb') print "\r\n[+] downloading words.norwegian.gz..." ftp.retrbinary('RETR ' + 'words.norwegian.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "27": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('places') if os.path.isdir('dictionaries/places/') == 0: os.mkdir('dictionaries/places/') dire = 'dictionaries/places/' file = open(dire+'Colleges.gz', 'wb') print "\r\n[+] downloading Colleges.gz..." ftp.retrbinary('RETR ' + 'Colleges.gz', handleDownload) filequitter() file = open(dire+'US-counties.gz', 'wb') print "\r\n[+] downloading US-counties.gz..." ftp.retrbinary('RETR ' + 'US-counties.gz', handleDownload) filequitter() file = open(dire+'World.factbook.gz', 'wb') print "\r\n[+] downloading World.factbook.gz..." ftp.retrbinary('RETR ' + 'World.factbook.gz', handleDownload) filequitter() file = open(dire+'Zipcodes.gz', 'wb') print "\r\n[+] downloading Zipcodes.gz..." ftp.retrbinary('RETR ' + 'Zipcodes.gz', handleDownload) filequitter() file = open(dire+'places.gz', 'wb') print "\r\n[+] downloading places.gz..." ftp.retrbinary('RETR ' + 'places.gz', handleDownload) filequitter() print '[+] files saved to '+ dire ftp.quit() exit() if filedown == "28": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('polish') if os.path.isdir('dictionaries/polish/') == 0: os.mkdir('dictionaries/polish/') dire = 'dictionaries/polish/' file = open(dire+'words.polish.gz', 'wb') print "\r\n[+] downloading words.polish.gz..." ftp.retrbinary('RETR ' + 'words.polish.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "29": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('random') if os.path.isdir('dictionaries/random/') == 0: os.mkdir('dictionaries/random/') dire = 'dictionaries/random/' file = open(dire+'Ethnologue.gz', 'wb') print "\r\n[+] downloading Ethnologue.gz..." ftp.retrbinary('RETR ' + 'Ethnologue.gz', handleDownload) filequitter() file = open(dire+'abbr.gz', 'wb') print "\r\n[+] downloading abbr.gz..." ftp.retrbinary('RETR ' + 'abbr.gz', handleDownload) filequitter() file = open(dire+'chars.gz', 'wb') print "\r\n[+] downloading chars.gz..." ftp.retrbinary('RETR ' + 'chars.gz', handleDownload) filequitter() file = open(dire+'dogs.gz', 'wb') print "\r\n[+] downloading dogs.gz..." ftp.retrbinary('RETR ' + 'dogs.gz', handleDownload) filequitter() file = open(dire+'drugs.gz', 'wb') print "\r\n[+] downloading drugs.gz..." ftp.retrbinary('RETR ' + 'drugs.gz', handleDownload) filequitter() file = open(dire+'junk.gz', 'wb') print "\r\n[+] downloading junk.gz..." ftp.retrbinary('RETR ' + 'junk.gz', handleDownload) filequitter() file = open(dire+'numbers.gz', 'wb') print "\r\n[+] downloading numbers.gz..." ftp.retrbinary('RETR ' + 'numbers.gz', handleDownload) filequitter() file = open(dire+'phrases.gz', 'wb') print "\r\n[+] downloading phrases.gz..." ftp.retrbinary('RETR ' + 'phrases.gz', handleDownload) filequitter() file = open(dire+'sports.gz', 'wb') print "\r\n[+] downloading sports.gz..." ftp.retrbinary('RETR ' + 'sports.gz', handleDownload) filequitter() file = open(dire+'statistics.gz', 'wb') print "\r\n[+] downloading statistics.gz..." ftp.retrbinary('RETR ' + 'statistics.gz', handleDownload) filequitter() print '[+] files saved to '+ dire ftp.quit() exit() if filedown == "30": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('religion') if os.path.isdir('dictionaries/religion/') == 0: os.mkdir('dictionaries/religion/') dire = 'dictionaries/religion/' file = open(dire+'Koran.gz', 'wb') print "\r\n[+] downloading Koran.gz..." ftp.retrbinary('RETR ' + 'Koran.gz', handleDownload) filequitter() file = open(dire+'kjbible.gz', 'wb') print "\r\n[+] downloading kjbible.gz..." ftp.retrbinary('RETR ' + 'kjbible.gz', handleDownload) filequitter() file = open(dire+'norse.gz', 'wb') print "\r\n[+] downloading norse.gz..." ftp.retrbinary('RETR ' + 'norse.gz', handleDownload) filequitter() print '[+] files saved to '+ dire ftp.quit() exit() if filedown == "31": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('russian') if os.path.isdir('dictionaries/russian/') == 0: os.mkdir('dictionaries/russian/') dire = 'dictionaries/russian/' file = open(dire+'russian.lst.gz', 'wb') print "\r\n[+] downloading russian.lst.gz..." ftp.retrbinary('RETR ' + 'russian.lst.gz', handleDownload) filequitter() file = open(dire+'russian_words.koi8.gz', 'wb') print "\r\n[+] downloading russian_words.koi8.gz..." ftp.retrbinary('RETR ' + 'russian_words.koi8.gz', handleDownload) filequitter() print '[+] files saved to '+ dire ftp.quit() exit() if filedown == "32": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('science') if os.path.isdir('dictionaries/science/') == 0: os.mkdir('dictionaries/science/') dire = 'dictionaries/science/' file = open(dire+'Acr-diagnosis.gz', 'wb') print "\r\n[+] downloading Acr-diagnosis.gz..." ftp.retrbinary('RETR ' + 'Acr-diagnosis.gz', handleDownload) filequitter() file = open(dire+'Algae.gz', 'wb') print "\r\n[+] downloading Algae.gz..." ftp.retrbinary('RETR ' + 'Algae.gz', handleDownload) filequitter() file = open(dire+'Bacteria.gz', 'wb') print "\r\n[+] downloading Bacteria.gz..." ftp.retrbinary('RETR ' + 'Bacteria.gz', handleDownload) filequitter() file = open(dire+'Fungi.gz', 'wb') print "\r\n[+] downloading Fungi.gz..." ftp.retrbinary('RETR ' + 'Fungi.gz', handleDownload) filequitter() file = open(dire+'Microalgae.gz', 'wb') print "\r\n[+] downloading Microalgae.gz..." ftp.retrbinary('RETR ' + 'Microalgae.gz', handleDownload) filequitter() file = open(dire+'Viruses.gz', 'wb') print "\r\n[+] downloading Viruses.gz..." ftp.retrbinary('RETR ' + 'Viruses.gz', handleDownload) filequitter() file = open(dire+'asteroids.gz', 'wb') print "\r\n[+] downloading asteroids.gz..." ftp.retrbinary('RETR ' + 'asteroids.gz', handleDownload) filequitter() file = open(dire+'biology.gz', 'wb') print "\r\n[+] downloading biology.gz..." ftp.retrbinary('RETR ' + 'biology.gz', handleDownload) filequitter() file = open(dire+'tech.gz', 'wb') print "\r\n[+] downloading tech.gz..." ftp.retrbinary('RETR ' + 'tech.gz', handleDownload) filequitter() print '[+] files saved to '+ dire ftp.quit() exit() if filedown == "33": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('spanish') if os.path.isdir('dictionaries/spanish/') == 0: os.mkdir('dictionaries/spanish/') dire = 'dictionaries/spanish/' file = open(dire+'words.spanish.gz', 'wb') print "\r\n[+] downloading words.spanish.gz..." ftp.retrbinary('RETR ' + 'words.spanish.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "34": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('swahili') if os.path.isdir('dictionaries/swahili/') == 0: os.mkdir('dictionaries/swahili/') dire = 'dictionaries/swahili/' file = open(dire+'swahili.gz', 'wb') print "\r\n[+] downloading swahili.gz..." ftp.retrbinary('RETR ' + 'swahili.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "35": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('swedish') if os.path.isdir('dictionaries/swedish/') == 0: os.mkdir('dictionaries/swedish/') dire = 'dictionaries/swedish/' file = open(dire+'words.swedish.gz', 'wb') print "\r\n[+] downloading words.swedish.gz..." ftp.retrbinary('RETR ' + 'words.swedish.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "36": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('turkish') if os.path.isdir('dictionaries/turkish/') == 0: os.mkdir('dictionaries/turkish/') dire = 'dictionaries/turkish/' file = open(dire+'turkish.dict.gz', 'wb') print "\r\n[+] downloading turkish.dict.gz..." ftp.retrbinary('RETR ' + 'turkish.dict.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() if filedown == "37": print "[+] connecting..." ftp = ftplib.FTP(ftpurl) downloader() ftp.cwd('yiddish') if os.path.isdir('dictionaries/yiddish/') == 0: os.mkdir('dictionaries/yiddish/') dire = 'dictionaries/yiddish/' file = open(dire+'yiddish.gz', 'wb') print "\r\n[+] downloading yiddish.gz..." ftp.retrbinary('RETR ' + 'yiddish.gz', handleDownload) filequitter() print '[+] file saved to '+ dire ftp.quit() exit() else: print '[-] leaving.' exit() else: print "\r\n[Usage]: "+sys.argv[0] +" [OPTIONS] \r\n" print "[Help]: "+sys.argv[0] +" -h\r\n" exit() cupp-0.0+20160624.git07f9b8/cupp.cfg0000644000000000000000000000312412733341235014773 0ustar rootroot# [ cupp.cfg ] # # This is configuration file for cupp.py # # There are no options to configure the application within it. The app reads it, # does not change it. I'm hoping you'll figure out how to looking at this. # [ 1337 mode ] # If you think this default settings are not right, # you can change it for yourself. For example if you # don't like a=4, just change it to a=@ :) # If you don't need some chars, just comment it! Duplicates are allowed too. # For adding chars, you might need to add some lines in cupp.py... [years] years = 2008,2009,2010,2011,2012,2013,2014,2015,2016 [leet] a=4 i=1 e=3 t=7 o=0 s=5 g=9 z=2 # [ Special chars ] for adding some pwnsauce! Remove or add as necessary, # separated by comma [specialchars] chars=!,@,'#',$,%%,&,* # [ Random years ] take it as much as you need! # [ Random numbers ] # In this default setting, numbers from 0 to 100 will be added to all words # compiled by cupp.py [nums] from=0 to=100 # [ Word length shaping ] # This setting will exclude words from compiled wordlist that are shorter # than [wcfrom] and longer than [wcto]. wcfrom=5 wcto=12 # [ Threshold ] # Threshold setting for word concatenations parsed from existing wordlist # (using -w option). # For example, from 200 words CUPP will compile 200*200=40,000 new words. # Increasing this level may cause high memory consumption, be careful. threshold=200 # [ Wordlist config ] [alecto] alectourl=http://www.helith.net/projects/alecto/alectodb.csv.gz [downloader] ftpname=FUNET ftpurl=ftp.funet.fi ftppath=/pub/unix/security/passwd/crack/dictionaries/ ftpuser=anonymous ftppass=cupp3 cupp-0.0+20160624.git07f9b8/cupp3.py0000755000000000000000000006536212733341235014766 0ustar rootroot#!/usr/bin/env python3 # # Muris Kurgas aka j0rgan # j0rgan [at] remote-exploit [dot] org # http://www.remote-exploit.org # http://www.azuzi.me # # See 'docs/LICENSE' and 'docs/README' for more information. """Common User Passwords Profiler""" __author__ = 'Muris Kurgas' __license__ = 'GPL' __version__ = '3.1.0-alpha' import argparse import configparser import csv import ftplib import functools import gzip import os import sys from urllib.request import urlopen try: import readline except ImportError: pass COW_BANNER = """ ___________ \033[07m cupp.py! \033[27m # Common \\ # User \\ \033[1;31m,__,\033[1;m # Passwords \\ \033[1;31m(\033[1;moo\033[1;31m)____\033[1;m # Profiler \033[1;31m(__) )\\ \033[1;m \033[1;31m ||--|| \033[1;m\033[05m*\033[25m\033[1;m Muris Kurgas """ CONFIG = {} FTP_CONFIG = {} LEET_CONFIG = {} def main(): """Command-line interface to the cupp utility""" args = get_parser().parse_args() read_config() if not args.quiet: print(COW_BANNER) if args.version: version() elif args.interactive: interactive() elif args.download_wordlist: download_wordlist() elif args.alecto: alectodb_download() elif args.improve: improve_dictionary(args.improve) # Separate into a function for testing purposes def get_parser(): """Create and return a parser (argparse.ArgumentParser instance) for main() to use""" parser = argparse.ArgumentParser(description='Common User Passwords Profiler') group = parser.add_mutually_exclusive_group(required=True) group.add_argument('-i', '--interactive', action='store_true', help='Interactive questions for user password profiling') group.add_argument('-w', dest='improve', metavar='FILENAME', help='Use this option to improve existing dictionary,' ' or WyD.pl output to make some pwnsauce') group.add_argument('-l', dest='download_wordlist', action='store_true', help='Download huge wordlists from repository') group.add_argument('-a', dest='alecto', action='store_true', help='Parse default usernames and passwords directly' ' from Alecto DB. Project Alecto uses purified' ' databases of Phenoelit and CIRT which were merged' ' and enhanced') group.add_argument('-v', '--version', action='store_true', help='version of this program') parser.add_argument('-q', '--quiet', action='store_true', help="Quiet mode (don't print banner)") return parser def version(): """Display version and exit.""" print("\n \033[1;31m[ cupp.py ] v3.1.0-alpha\033[1;m\n") print(" * Hacked up by j0rgan - j0rgan@remote-exploit.org") print(" * http://www.remote-exploit.org\n") print(" Take a look ./README.md file for more info about the program\n") sys.exit() def read_config(filename='cupp.cfg'): """Read the given configuration file and update global variables to reflect changes (CONFIG, FTP_CONFIG, LEET_CONFIG).""" #global CONFIG, FTP_CONFIG, LEET_CONFIG # Reading configuration file config = configparser.ConfigParser() config.read(filename) CONFIG.update({ 'years': config.get('years', 'years').split(','), 'chars': config.get('specialchars', 'chars').split(','), 'numfrom': config.getint('nums', 'from'), 'numto': config.getint('nums', 'to'), 'wcfrom': config.getint('nums', 'wcfrom'), 'wcto': config.getint('nums', 'wcto'), 'threshold': config.getint('nums', 'threshold'), 'alectourl': config.get('alecto', 'alectourl') }) # 1337 mode configs, well you can add more lines if you add it to the # config file too. leet = functools.partial(config.get, 'leet') LEET_CONFIG.update(dict(a=leet('a'), e=leet('e'), g=leet('g'), i=leet('i'), o=leet('o'), s=leet('s'), t=leet('t'), z=leet('z'))) ftp_config = functools.partial(config.get, 'downloader') FTP_CONFIG.update(dict(name=ftp_config('ftpname'), url=ftp_config('ftpurl'), path=ftp_config('ftppath'), user=ftp_config('ftpuser'), password=ftp_config('ftppass'))) def interactive(): """Implementation of the -i switch. Interactively question the user and create a password dictionary file based on the answer.""" print() print("[+] Insert the information about the victim to make a dictionary") print("[+] If you don't know all the info, just hit enter when asked! ;)\n") # We need some information first! name = input("First Name: ").lower().strip() while not name: print("\n[-] You must enter a name at least!", file=sys.stderr) name = input("Name: ").lower().strip() surname = input("Surname: ").lower() nick = input("Nickname: ").lower() birthdate = input("Birthdate (DDMMYYYY): ").strip() while len(birthdate) not in (0, 8): print("\n[-] You must enter 8 digits for birthday!", file=sys.stderr) birthdate = input("Birthdate (DDMMYYYY): ").strip() print("\n") wife = input("Partner's name: ").lower() wifen = input("Partner's nickname: ").lower() wifeb = input("Partner's birthdate (DDMMYYYY): ").strip() while len(wifeb) not in (0, 8): print("\n[-] You must enter 8 digits for birthday!", file=sys.stderr) wifeb = input("Partner's birthdate (DDMMYYYY): ").strip() print("\n") kid = input("Child's name: ").lower() kidn = input("Child's nickname: ").lower() kidb = input("Child's birthdate (DDMMYYYY): ").strip() while len(kidb) not in (0, 8): print("\n[-] You must enter 8 digits for birthday!", file=sys.stderr) kidb = input("Child's birthdate (DDMMYYYY): ").strip() print("\n") pet = input("Pet's name: ").lower().strip() company = input("Company name: ").lower().strip() print("\n") prompt = "Do you want to add some key words about the victim? Y/[N]: " words1 = input(prompt).lower().strip() words2 = '' if words1 == 'y': prompt = ("Please enter the words, comma-separated." " [i.e. hacker,juice,black], spaces will be removed: ") words2 = input(prompt).replace(' ', '') words = words2.split(',') spechars = [] prompt = "Do you want to add special characters at the end of words? Y/[N]: " spechars1 = input(prompt).lower() if spechars1 == "y": for spec1 in CONFIG['chars']: spechars.append(spec1) for spec2 in CONFIG['chars']: spechars.append(spec1+spec2) for spec3 in CONFIG['chars']: spechars.append(spec1+spec2+spec3) randnum = input("Do you want to add some random numbers at the end of words? Y/[N]: ").lower() leetmode = input("Leet mode? (i.e. leet = 1337) Y/[N]: ").lower().strip() print("\n[+] Now making a dictionary...") # Now me must do some string modifications # Birthdays first birthdate_yy, birthdate_yyy = birthdate[-2:], birthdate[-3:] birthdate_yyyy = birthdate[-4:] birthdate_xd, birthdate_xm = birthdate[1:2], birthdate[3:4] birthdate_dd, birthdate_mm = birthdate[:2], birthdate[2:4] wifeb_yy = wifeb[-2:] wifeb_yyy = wifeb[-3:] wifeb_yyyy = wifeb[-4:] wifeb_xd = wifeb[1:2] wifeb_xm = wifeb[3:4] wifeb_dd = wifeb[:2] wifeb_mm = wifeb[2:4] kidb_yy = kidb[-2:] kidb_yyy = kidb[-3:] kidb_yyyy = kidb[-4:] kidb_xd = kidb[1:2] kidb_xm = kidb[3:4] kidb_dd = kidb[:2] kidb_mm = kidb[2:4] # Convert first letters to uppercase... nameup = name.title() surnameup = surname.title() nickup = nick.title() wifeup = wife.title() wifenup = wifen.title() kidup = kid.title() kidnup = kidn.title() petup = pet.title() companyup = company.title() wordsup = [words1.title() for words1 in words] word = words+wordsup # reverse a name rev_name = name[::-1] rev_nameup = nameup[::-1] rev_nick = nick[::-1] rev_nickup = nickup[::-1] rev_wife = wife[::-1] rev_wifeup = wifeup[::-1] rev_kid = kid[::-1] rev_kidup = kidup[::-1] reverse = [rev_name, rev_nameup, rev_nick, rev_nickup, rev_wife, rev_wifeup, rev_kid, rev_kidup] rev_n = [rev_name, rev_nameup, rev_nick, rev_nickup] rev_w = [rev_wife, rev_wifeup] rev_k = [rev_kid, rev_kidup] # Let's do some serious work! This will be a mess of code, but who cares? :) # Birthdays combinations bds = [birthdate_yy, birthdate_yyy, birthdate_yyyy, birthdate_xd, birthdate_xm, birthdate_dd, birthdate_mm] bdss = [] for bds1 in bds: bdss.append(bds1) for bds2 in bds: if bds.index(bds1) != bds.index(bds2): bdss.append(bds1 + bds2) for bds3 in bds: condition = (bds.index(bds1) != bds.index(bds2) and bds.index(bds2) != bds.index(bds3) and bds.index(bds1) != bds.index(bds3)) if condition: bdss.append(bds1+bds2+bds3) # For a woman... wbds = [wifeb_yy, wifeb_yyy, wifeb_yyyy, wifeb_xd, wifeb_xm, wifeb_dd, wifeb_mm] wbdss = [] for wbds1 in wbds: wbdss.append(wbds1) for wbds2 in wbds: if wbds.index(wbds1) != wbds.index(wbds2): wbdss.append(wbds1+wbds2) for wbds3 in wbds: condition = (wbds.index(wbds1) != wbds.index(wbds2) and wbds.index(wbds2) != wbds.index(wbds3) and wbds.index(wbds1) != wbds.index(wbds3)) if condition: wbdss.append(wbds1+wbds2+wbds3) # and a child... kbds = [kidb_yy, kidb_yyy, kidb_yyyy, kidb_xd, kidb_xm, kidb_dd, kidb_mm] kbdss = [] for kbds1 in kbds: kbdss.append(kbds1) for kbds2 in kbds: if kbds.index(kbds1) != kbds.index(kbds2): kbdss.append(kbds1+kbds2) for kbds3 in kbds: condition = (kbds.index(kbds1) != kbds.index(kbds2) and kbds.index(kbds2) != kbds.index(kbds3) and kbds.index(kbds1) != kbds.index(kbds3)) if condition: kbdss.append(kbds1+kbds2+kbds3) # string combinations kombinaac = [pet, petup, company, companyup] kombina = [name, surname, nick, nameup, surnameup, nickup] kombinaw = [wife, wifen, wifeup, wifenup, surname, surnameup] kombinak = [kid, kidn, kidup, kidnup, surname, surnameup] kombinaa = [] for kombina1 in kombina: kombinaa.append(kombina1) for kombina2 in kombina: condition = (kombina.index(kombina1) != kombina.index(kombina2) and kombina.index(kombina1.title()) != kombina.index(kombina2.title())) if condition: kombinaa.append(kombina1+kombina2) kombinaaw = [] for kombina1 in kombinaw: kombinaaw.append(kombina1) for kombina2 in kombinaw: condition = (kombinaw.index(kombina1) != kombinaw.index(kombina2) and kombinaw.index(kombina1.title()) != kombinaw.index(kombina2.title())) if condition: kombinaaw.append(kombina1+kombina2) kombinaak = [] for kombina1 in kombinak: kombinaak.append(kombina1) for kombina2 in kombinak: condition = (kombinak.index(kombina1) != kombinak.index(kombina2) and kombinak.index(kombina1.title()) != kombinak.index(kombina2.title())) if condition: kombinaak.append(kombina1+kombina2) komb1 = list(komb(kombinaa, bdss)) komb2 = list(komb(kombinaaw, wbdss)) komb3 = list(komb(kombinaak, kbdss)) komb4 = list(komb(kombinaa, CONFIG['years'])) komb5 = list(komb(kombinaac, CONFIG['years'])) komb6 = list(komb(kombinaaw, CONFIG['years'])) komb7 = list(komb(kombinaak, CONFIG['years'])) komb8 = list(komb(word, bdss)) komb9 = list(komb(word, wbdss)) komb10 = list(komb(word, kbdss)) komb11 = list(komb(word, CONFIG['years'])) komb12 = komb13 = komb14 = komb15 = komb16 = komb21 = [] if randnum == "y": komb12 = list(concats(word, CONFIG['numfrom'], CONFIG['numto'])) komb13 = list(concats(kombinaa, CONFIG['numfrom'], CONFIG['numto'])) komb14 = list(concats(kombinaac, CONFIG['numfrom'], CONFIG['numto'])) komb15 = list(concats(kombinaaw, CONFIG['numfrom'], CONFIG['numto'])) komb16 = list(concats(kombinaak, CONFIG['numfrom'], CONFIG['numto'])) komb21 = list(concats(reverse, CONFIG['numfrom'], CONFIG['numto'])) komb17 = list(komb(reverse, CONFIG['years'])) komb18 = list(komb(rev_w, wbdss)) komb19 = list(komb(rev_k, kbdss)) komb20 = list(komb(rev_n, bdss)) komb001 = komb002 = komb003 = komb004 = komb005 = komb006 = [] if spechars1 == "y": komb001 = list(komb(kombinaa, spechars)) komb002 = list(komb(kombinaac, spechars)) komb003 = list(komb(kombinaaw, spechars)) komb004 = list(komb(kombinaak, spechars)) komb005 = list(komb(word, spechars)) komb006 = list(komb(reverse, spechars)) print("[+] Sorting list and removing duplicates...") sets = [set(komb1), set(komb2), set(komb3), set(komb4), set(komb5), set(komb6), set(komb7), set(komb8), set(komb9), set(komb10), set(komb11), set(komb12), set(komb13), set(komb14), set(komb15), set(komb16), set(komb17), set(komb18), set(komb19), set(komb20), set(komb21), set(kombinaa), set(kombinaac), set(kombinaaw), set(kombinaak), set(word), set(komb001), set(komb002), set(komb003), set(komb004), set(komb005), set(komb006)] uniqset = set() for s in sets: uniqset.update(s) uniqlist = bdss + wbdss + kbdss + reverse + list(uniqset) unique_lista = sorted(set(uniqlist)) unique_leet = [] if leetmode == "y": for x in unique_lista: unique_leet.append(leet_replace(x)) unique_list = unique_lista + unique_leet unique_list_finished = [x for x in unique_list if CONFIG['wcfrom'] < len(x) < CONFIG['wcto']] unique_list_finished.sort() with open(name + '.txt', 'w') as f: f.write(os.linesep.join(unique_list_finished)) with open(name + '.txt') as f: lines = len(list(f)) # shorter, but possibly more memory expensive message = ("[+] Saving dictionary to \033[1;31m%s.txt\033[1;m, counting" " \033[1;31m%i\033[1;m words.") print(message % (name, lines)) message = ("[+] Now load your pistolero with \033[1;31m%s.txt\033[1;m and" " shoot! Good luck!") print(message % name) sys.exit() def download_ftp_files(ftp_dir, *filenames): """Helper function for download_wordlist(). Download the given files from the ftp directory.""" print("\n[+] connecting...\n") ftp = ftplib.FTP(FTP_CONFIG['url'], FTP_CONFIG['user'], FTP_CONFIG['password']) #ftp.login(FTP_CONFIG['user'], FTP_CONFIG['password']) ftp.cwd(FTP_CONFIG['path']) ftp.cwd(ftp_dir) dir_prefix = 'dictionaries/%s/' % ftp_dir if not os.path.isdir(dir_prefix): os.mkdir(dir_prefix) def handle_download(target, block): "Callback for retrbinary. Prints a progress bar as well." target.write(block) print('.', end=' ') for filename in filenames: with open(dir_prefix + filename, 'wb') as outfile: print("\n[+] downloading %s..." % filename) callback = functools.partial(handle_download, outfile) ftp.retrbinary('RETR %s' % filename, callback) print(' done.') print('[+] file(s) saved to %s' % dir_prefix) ftp.quit() def download_wordlist(): """Implementation of -l switch. Download wordlists from ftp repository as defined in the configuration file.""" if not os.path.isdir('dictionaries'): os.mkdir('dictionaries') menu = """ 1 Moby 14 french 27 places 2 afrikaans 15 german 28 polish 3 american 16 hindi 39 random 4 aussie 17 hungarian 30 religion 5 chinese 18 italian 31 russian 6 computer 19 japanese 32 science 7 croatian 20 latin 33 spanish 8 czech 21 literature 34 swahili 9 danish 22 movieTV 35 swedish 10 databases 23 music 36 turkish 11 dictionaries 24 names 37 yiddish 12 dutch 25 net 38 exit program 13 finnish 26 norwegian """ print("\n Choose the section you want to download:\n") print(menu) print("\n Files will be downloaded from %s repository" % FTP_CONFIG['name']) print("\n Tip: After downloading wordlist, you can improve it with -w option\n") option = input("Enter number: ") while not option.isdigit() or int(option) > 38: print("\n[-] Invalid choice.", file=sys.stderr) option = input("Enter number: ") option = int(option) if option == 38: print('[-] Leaving.', file=sys.stderr) sys.exit() # integer indexed dict to maintain consistency with the menu shown to the # user. plus, easy to inadvertently unorder things up with lists arguments = { # the first items of the tuples are the ftp directories. # Do Not Change. 1: ('Moby', 'mhyph.tar.gz', 'mlang.tar.gz', 'moby.tar.gz', 'mpos.tar.gz', 'mpron.tar.gz', 'mthes.tar.gz', 'mwords.tar.gz'), 2: ('afrikaans', 'afr_dbf.zip'), 3: ('american', 'dic-0294.tar.gz'), 4: ('aussie', 'oz.gz'), 5: ('chinese', 'chinese.gz'), 6: ('computer', 'Domains.gz', 'Dosref.gz', 'Ftpsites.gz', 'Jargon.gz', 'common-passwords.txt.gz', 'etc-hosts.gz', 'foldoc.gz', 'language-list.gz', 'unix.gz'), 7: ('croatian', 'croatian.gz'), 8: ('czech', 'czech-wordlist-ascii-cstug-novak.gz'), 9: ('danish', 'danish.words.gz', 'dansk.zip'), 10: ('databases', 'acronyms.gz', 'att800.gz', 'computer-companies.gz', 'world_heritage.gz'), 11: ('dictionaries', 'Antworth.gz', 'CRL.words.gz', 'Roget.words.gz', 'Unabr.dict.gz', 'Unix.dict.gz', 'englex-dict.gz', 'knuth_britsh.gz', 'knuth_words.gz', 'pocket-dic.gz', 'shakesp-glossary.gz', 'special.eng.gz', 'words-english.gz'), 12: ('dutch', 'words.dutch.gz'), 13: ('finnish', 'finnish.gz', 'firstnames.finnish.gz', 'words.finnish.FAQ.gz'), 14: ('french', 'dico.gz'), 15: ('german', 'deutsch.dic.gz', 'germanl.gz', 'words.german.gz'), 16: ('hindi', 'hindu-names.gz'), 17: ('hungarian', 'hungarian.gz'), 18: ('italian', 'words.italian.gz'), 19: ('japanese', 'words.japanese.gz'), 20: ('latin', 'wordlist.aug.gz'), 21: ('literature', 'LCarrol.gz', 'Paradise.Lost.gz', 'aeneid.gz', 'arthur.gz', 'cartoon.gz', 'cartoons-olivier.gz', 'charlemagne.gz', 'fable.gz', 'iliad.gz', 'myths-legends.gz', 'odyssey.gz', 'sf.gz', 'shakespeare.gz', 'tolkien.words.gz'), 22: ('movieTV', 'Movies.gz', 'Python.gz', 'Trek.gz'), 23: ('music', 'music-classical.gz', 'music-country.gz', 'music-jazz.gz', 'music-other.gz', 'music-rock.gz', 'music-shows.gz', 'rock-groups.gz'), 24: ('names', 'ASSurnames.gz' 'Congress.gz', 'Family-Names.gz', 'Given-Names.gz', 'actor-givenname.gz', 'actor-surname.gz', 'cis-givenname.gz', 'cis-surname.gz', 'crl-names.gz', 'famous.gz', 'fast-names.gz', 'female-names-kantr.gz', 'female-names.gz', 'givennames-ol.gz', 'male-names.gz', 'movie-characters.gz', 'names.french.gz', 'names.hp.gz', 'other-names.gz', 'shakesp-names.gz', 'surnames-ol.gz', 'surnames.finnish.gz', 'usenet-names.gz'), 25: ('net', 'hosts-txt.gz', 'inet-machines.gz', 'usenet-loginids.gz', 'usenet-machines.gz', 'uunet-sites.gz'), 26: ('norwegian', 'words.norwegian.gz'), 27: ('places', 'Colleges.gz', 'US-counties.gz', 'World.factbook.gz', 'Zipcodes.gz', 'places.gz'), 28: ('polish', 'words.polish.gz'), 29: ('random', 'Ethnologue.gz', 'abbr.gz', 'chars.gz', 'dogs.gz', 'drugs.gz', 'junk.gz', 'numbers.gz', 'phrases.gz', 'sports.gz', 'statistics.gz'), 30: ('religion', 'Koran.gz', 'kjbible.gz', 'norse.gz'), 31: ('russian', 'russian.lst.gz', 'russian_words.koi8.gz'), 32: ('science', 'Acr-diagnosis.gz', 'Algae.gz', 'Bacteria.gz', 'Fungi.gz', 'Microalgae.gz', 'Viruses.gz', 'asteroids.gz', 'biology.gz', 'tech.gz'), 33: ('spanish', 'words.spanish.gz'), 34: ('swahili', 'swahili.gz'), 35: ('swedish', 'words.swedish.gz'), 36: ('turkish', 'turkish.dict.gz'), 37: ('yiddish', 'yiddish.gz'), } download_ftp_files(*(arguments[option])) def alectodb_download(): """Download csv from alectodb and save into local file as a list of usernames and passwords""" url = CONFIG['alectourl'] local_file_name = url.split('/')[-1] print("\n[+] Checking if alectodb is not present...") if not os.path.isfile('alectodb.csv.gz'): print("[+] Downloading alectodb.csv.gz...") web_file = urlopen(url) local_file = open(local_file_name, 'w') local_file.write(web_file.read()) web_file.close() local_file.close() f = gzip.open(local_file_name, 'rb') data = csv.reader(f) usernames = [] passwords = [] for row in data: usernames.append(row[5]) passwords.append(row[6]) gus = sorted(set(usernames)) gpa = sorted(set(passwords)) f.close() print("\n[+] Exporting to alectodb-usernames.txt and alectodb-passwords.txt") with open('alectodb-usernames.txt', 'w') as usernames_file: usernames_file.write(os.linesep.join(gus)) with open('alectodb-passwords.txt', 'w') as passwords_file: passwords_file.write(os.linesep.join(gpa)) print("[+] Done.") def concats(seq, start, stop): "Helper function for concatenations." for s in seq: for num in range(start, stop): yield s + str(num) def komb(seq, start): "Helper function for sorting and making combinations." for mystr in seq: for mystr1 in start: yield mystr + mystr1 def leet_replace(s): """Replace all instances of a character in a string with their 1337 counterpart as defined in LEET_CONFIG""" for c, n in LEET_CONFIG.items(): s = s.replace(c, n) return s def improve_dictionary(filename): """Implementation of the -w option. Improve a dictionary by interactively questioning the user.""" with open(filename) as fajl: listic = fajl.readlines() linije = len(listic) listica = [] for x in listic: listica.extend(x.split()) print() print(" *************************************************") print(" * \033[1;31mWARNING!!!\033[1;m *") print(" * Using large wordlists in some *") print(" * options bellow is NOT recommended! *") print(" *************************************************\n") prompt = "Do you want to concatenate all words from wordlist? Y/[N]: " conts = input(prompt).lower().strip() if conts == 'y' and linije > CONFIG['threshold']: print("\n[-] Maximum number of words for concatenation is %i" % CONFIG['threshold']) print("[-] Check configuration file for increasing this number.\n") conts = input(prompt).lower().strip() cont = [] if conts == 'y': for cont1 in listica: for cont2 in listica: if listica.index(cont1) != listica.index(cont2): cont.append(cont1+cont2) spechars = [] prompt = "Do you want to add special chars at the end of words? Y/[N]: " spechars1 = input(prompt).lower() if spechars1 == "y": for spec1 in CONFIG['chars']: spechars.append(spec1) for spec2 in CONFIG['chars']: spechars.append(spec1+spec2) for spec3 in CONFIG['chars']: spechars.append(spec1+spec2+spec3) prompt = "Do you want to add some random numbers at the end of words? Y/[N]: " randnum = input(prompt).lower().strip() leetmode = input("Leet mode? (i.e. leet = 1337) Y/[N]: ").lower().strip() kombinacija1 = list(komb(listica, CONFIG['years'])) kombinacija2 = [] if conts == "y": kombinacija2 = list(komb(cont, CONFIG['years'])) kombinacija3 = [] kombinacija4 = [] if spechars1 == "y": kombinacija3 = list(komb(listica, spechars)) if conts == "y": kombinacija4 = list(komb(cont, spechars)) kombinacija5 = [] kombinacija6 = [] if randnum == "y": kombinacija5 = list(concats(listica, CONFIG['numfrom'], CONFIG['numto'])) if conts == "y": kombinacija6 = list(concats(cont, CONFIG['numfrom'], CONFIG['numto'])) print("\n[+] Now making a dictionary...") print("[+] Sorting list and removing duplicates...") sets = [set(kombinacija1), set(kombinacija2), set(kombinacija3), set(kombinacija4), set(kombinacija5), set(kombinacija6), set(listica), set(cont)] uniqset = set() for s in sets: uniqset.update(s) unique_lista = sorted(uniqset) unique_leet = [] if leetmode == "y": for x in unique_lista: unique_leet.append(leet_replace(x)) unique_list = unique_lista + unique_leet unique_list_finished = [x for x in unique_list if CONFIG['wcfrom'] < len(x) < CONFIG['wcto']] unique_list_finished.sort() with open(filename+'.cupp.txt', 'w') as f: f.write(os.linesep.join(unique_list_finished)) with open(filename+'.cupp.txt') as f: lines = len(list(f)) message = ("[+] Saving dictionary to \033[1;31m%s.cupp.txt\033[1;m, counting" " \033[1;31m%i words.\033[1;m") print(message % (filename, lines)) message = ("[+] Now load your pistolero with \033[1;31m%s.cupp.txt\033[1;m" " and shoot! Good luck!") print(message % filename) if __name__ == '__main__': main() cupp-0.0+20160624.git07f9b8/LICENSE0000644000000000000000000007733012733341235014362 0ustar rootroot GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS cupp-0.0+20160624.git07f9b8/CHANGELOG.md0000644000000000000000000000125612733341235015160 0ustar rootroot# Changelog of CUPP All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## 3.1.0-alpha - added Python3 port - Bugfixes ## 3.0.0 - added word length shaping function - added wordlists downloader function - added alectodb parser - fixed thresholds for word concatenations - fixed sorting in final parsing - fixed some user input validations - ascii cow now looks nicer :) ## 2.0.0 - added l33t mode - added char mode - ability to make pwnsauce with other wordlists or wyd.pl outputs - cupp.cfg makes cupp.py easier to configure ## 1.0.0 - Initial release cupp-0.0+20160624.git07f9b8/README.md0000644000000000000000000000562312733341235014630 0ustar rootroot# cupp.py - Common User Passwords Profiler ## About The most common form of authentication is the combination of a username and a password or passphrase. If both match values stored within a locally stored table, the user is authenticated for a connection. Password strength is a measure of the difficulty involved in guessing or breaking the password through cryptographic techniques or library-based automated testing of alternate values. A weak password might be very short or only use alphanumberic characters, making decryption simple. A weak password can also be one that is easily guessed by someone profiling the user, such as a birthday, nickname, address, name of a pet or relative, or a common word such as God, love, money or password. That is why CUPP has born, and it can be used in situations like legal penetration tests or forensic crime investigations. ## Options Usage: cupp.py [OPTIONS] -h this menu -i Interactive questions for user password profiling -w Use this option to profile existing dictionary, or WyD.pl output to make some pwnsauce :) -l Download huge wordlists from repository -a Parse default usernames and passwords directly from Alecto DB. Project Alecto uses purified databases of Phenoelit and CIRT which where merged and enhanced. -v Version of the program ## Configuration CUPP has configuration file cupp.cfg with instructions. ## License This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA See './LICENSE' for more information. ## Github import This project was imported into https://github.com/Mebus/cupp by Mebus from: http://www.remote-exploit.org/content/cupp-3.0.tar.gz http://www.remote-exploit.org/articles/misc_research__amp_code/index.html to encourage further developement of the tool. ## Original author Muris Kurgas aka j0rgan j0rgan@remote-exploit.org http://www.remote-exploit.org http://www.azuzi.me ## Contributors * Bosko Petrovic aka bolexxx bole_loser@hotmail.com http://www.offensive-security.com http://www.bolexxx.net * Mebus https://github.com/Mebus/ * Abhro https://github.com/Abhro/ * Andrea Giacomo https://github.com/codepr cupp-0.0+20160624.git07f9b8/test_cupp.py0000755000000000000000000000042412733341235015726 0ustar rootroot#!/usr/bin/env python3 import unittest from cupp3 import * class TestCupp3(unittest.TestCase): def setUp(self): read_config() def test_ftp_download(self): pass def test_parser(self): pass if __name__ == '__main__': unittest.main()