def scratchword(siteList): scrabbler = "scrabbler" resluts = [] # Create an empty list for generation logic. y_arr = [] for site in siteList: try: site = site.strip() response = urlopen(site) response.addheaders = \ [('User-agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0')] # if you don't decode('utf-8'), it will don't work both in python2 and python3 try: x = stripHTMLTags(response.read().decode('utf-8') + site) except: try: x = stripHTMLTags(response.read().decode('GBK') + site) except: exit( cool.red( "[-] Page coding parse error, please use 'extend' plug instead" ) + pyoptions.CRLF) # Replace junk found in our response x = x.replace('\n', ' ') x = x.replace(',', ' ') x = x.replace('.', ' ') x = x.replace('/', ' ') x = re.sub('[^A-Za-z0-9]+', ' ', x) x_arr = x.split(' ') for y in x_arr: y = y.strip() if y and (len(y) >= 5): if ((y[0] == '2') and (y[1] == 'F')) \ or ((y[0] == '2') and (y[1] == '3')) \ or ((y[0] == '3') and (y[1] == 'F')) or ((y[0] == '3') and (y[1] == 'D')): y = y[2:] if len(y) <= 8 and True if y.lower( ) not in passcratch_white_list else False: y_arr.append(y) elif 9 <= len(y) <= 25 and True if y.lower( ) not in passcratch_white_list else False: y_arr.append(y) except Exception: exit( cool.red( "[-] Process abort, please check url and try use 'extend' plug instead" ) + pyoptions.CRLF) for yy in unique(y_arr): if yy.strip().isdigit(): pass else: if not re.findall( pyoptions.passcraper_filter, yy.strip(), flags=re.I): resluts.append(yy.strip()) return unique(resluts)
def uniqifer_enter(original_file_path, from_combiner=False): dict_prefix = pystrs.UNIQIFER_prefix if from_combiner: dict_prefix = pystrs.UNIQBINER_prefix storepath = finalsavepath(paths.results_path, dict_prefix, mybuildtime(), pyoptions.filextension, paths.results_file_name) with open(original_file_path) as o_f: with open(storepath, "a") as s_f: for item in unique(o_f.readlines()): item = filterforfun(item.strip(), head=pyoptions.head, tail=pyoptions.tail, lenght_is_filter=pyoptions.args_pick, minlen=pyoptions.minlen, maxlen=pyoptions.maxlen, regex_is_filter=True, regex=pyoptions.filter_regex, encode_is_filter=True, encode=pyoptions.encode, occur_is_filter=True, letter_occur=pyoptions.letter_occur, digital_occur=pyoptions.digital_occur, special_occur=pyoptions.special_occur, types_is_filter=True, letter_types=pyoptions.letter_types, digital_types=pyoptions.digital_types, special_types=pyoptions.special_types, ) if item: s_f.write(item + pyoptions.CRLF) print("[+] Source of :{0} lines".format(cool.orange(finishcounter(original_file_path)))) finishprinter(finishcounter(storepath), storepath)
def magic(func): storepath = finalsavepath(func.__name__) try: with open(storepath, "a") as f: for item in unique(func()): item = filterforfun( item, head=pyoptions.head, tail=pyoptions.tail, lenght_is_filter=pyoptions.args_pick, minlen=pyoptions.minlen, maxlen=pyoptions.maxlen, regex_is_filter=True, regex=pyoptions.filter_regex, encode_is_filter=True, encode=pyoptions.encode, occur_is_filter=True, letter_occur=pyoptions.letter_occur, digital_occur=pyoptions.digital_occur, special_occur=pyoptions.special_occur, types_is_filter=True, letter_types=pyoptions.letter_types, digital_types=pyoptions.digital_types, special_types=pyoptions.special_types, ) if item: f.write(item + pyoptions.CRLF) finishprinter(storepath) except Exception as e: print(cool.red('[-] Exception as following:') + pyoptions.CRLF) print(traceback.print_exc())
def birthday_magic(begin_date, end_date): def check_date(dt, desc="datetime"): if len(dt) != 8 or not dt.isdigit(): exit( cool.fuchsia( "[!] {} format:[YYYYMMDD], such as:19900512{}".format( desc, pyoptions.CRLF))) elif int(dt[4:6]) > 12 or int(dt[4:6]) < 1 or int(dt[6:8]) > 31 or int( dt[6:8]) < 1: exit( cool.fuchsia( "[!] {} date format: 1<= month <=12 and 1<= day <=31{}". format(desc, pyoptions.CRLF))) else: return int(dt[:4]), int(dt[4:6]), int(dt[6:]) def check_range(s, e): if s[0] > e[0] or (s[0] == e[0] and s[1] > e[1]) or (s[1] == e[1] and s[2] > e[2]): exit( cool.fuchsia("[!] Start date should later than End date" + pyoptions.CRLF)) else: return True start_valid = check_date(begin_date, desc="Start datetime") end_valid = check_date(end_date, desc="End datetime") valid = check_range(start_valid, end_valid) if start_valid and end_valid else False storepath = finalsavepath(paths.results_path, pystrs.BIRTHDAY_prefix, mybuildtime(), pyoptions.filextension, paths.results_file_name) if valid: res = [] begin = datetime.datetime.strptime(begin_date, "%Y%m%d") end = datetime.datetime.strptime(end_date, "%Y%m%d") while begin <= end: date_str = begin.strftime("%Y%m%d") res.extend(dateshaper(date_str)) begin += datetime.timedelta(days=1) with open(storepath, "a") as f: for item in unique(res): item = filterforfun( item, head=pyoptions.head, tail=pyoptions.tail, lenght_is_filter=pyoptions.args_pick, minlen=pyoptions.minlen, maxlen=pyoptions.maxlen, encode_is_filter=True, encode=pyoptions.encode, ) if item: f.write(item + pyoptions.CRLF) finishprinter(finishcounter(storepath), storepath)
def magic(func): storepath = finalsavepath(func.__name__) try: with open(storepath, "a") as f: for item in unique(func()): item = filterforfun(item) if item: f.write(item + pyoptions.CRLF) finishprinter(storepath) except Exception as e: print(cool.red('[-] Exception as following:') + pyoptions.CRLF) print(traceback.print_exc())
def uniqifer_enter(original_file_path, from_combiner=False): prefix = pystrs.UNIQIFER_prefix if from_combiner: prefix = pystrs.UNIQBINER_prefix storepath = os.path.join( paths.results_path, "%s_%s%s" % (prefix, mybuildtime(), pyoptions.filextension)) with open(original_file_path) as o_f: with open(storepath, "a") as s_f: for _ in unique(o_f.readlines()): s_f.write(_) print("[+] Source of :{0} lines".format( cool.orange(finishcounter(original_file_path)))) finishprinter(finishcounter(storepath), storepath)
def magic(func): storepath = finalsavepath(func.__name__) # global variable transfer local variable to improved speed buffer = [] buffer_size = pyoptions.buffer_size head = pyoptions.head tail = pyoptions.tail crlf = pyoptions.CRLF encode_name = pyoptions.encode encode_fun = pyoptions.operator.get(encode_name) minlen = pyoptions.minlen maxlen = pyoptions.maxlen args_pick = pyoptions.args_pick letter_occur = pyoptions.letter_occur digital_occur = pyoptions.digital_occur special_occur = pyoptions.special_occur occur_is_filter = pyoptions.occur_is_filter letter_types = pyoptions.letter_types digital_types = pyoptions.digital_types special_types = pyoptions.special_types types_is_filter = pyoptions.types_is_filter letter_repeat = pyoptions.letter_repeat digital_repeat = pyoptions.digital_repeat special_repeat = pyoptions.special_repeat repeat_is_filter = pyoptions.repeat_is_filter filter_regex = pyoptions.filter_regex regex_is_filter = pyoptions.regex_is_filter try: with open(storepath, "a") as f: for item in unique(func()): item = fff_speed(item, head, tail, minlen, maxlen, args_pick, encode_fun, letter_occur, digital_occur, special_occur, occur_is_filter, letter_types, digital_types, special_types, types_is_filter, letter_repeat, digital_repeat, special_repeat, repeat_is_filter, filter_regex, regex_is_filter) if item: buffer.append(item) if len(buffer) == buffer_size: f.write(crlf.join(buffer) + crlf) buffer = [] f.write(crlf.join(buffer)) finishprinter(storepath) except Exception as e: print(cool.red('[-] Exception as following:') + pyoptions.CRLF) print(traceback.print_exc())
def wordshaper(word, *args): shapes = [] if not args: shapes.extend(wordsharker(word, pyoptions.sedb_leet)) else: if not type(word) is list: shapes.extend(wordsharker(word, pyoptions.sedb_leet)) else: for w in word: shapes.extend(wordsharker(w, pyoptions.sedb_leet)) for arg in args: if not type(arg) is list: shapes.extend(wordsharker(arg, pyoptions.sedb_leet)) else: for a in arg: shapes.extend(wordsharker(a, pyoptions.sedb_leet)) return unique(shapes)
def extend_enter(rawlist, leet=True): extend_conf_dict = { 'prefix': [], 'suffix': [], 'prefix_suffix': [], 'middle': [] } try: config = ConfigParser.SafeConfigParser(allow_no_value=True) config.optionxform = str config.read(paths.extendconf_path) for s in config.sections(): for o in config.options(s): extend_conf_dict[s].append(o) except Exception as e: exit( cool.red('[-] Parse extend cfg file error' + pyoptions.CRLF + cool.fuchsia('[!] ' + e.message))) res = [] prefix_content = extend_conf_dict['prefix'] suffix_content = extend_conf_dict['suffix'] prefix_suffix_content = extend_conf_dict['prefix_suffix'] middle_content = extend_conf_dict['middle'] for raw in rawlist: shapers = wordsharker(raw, leet=leet) for middle in middle_content: matches = re.findall(pyoptions.level_str_pattern, middle) if matches: middles = [] level = matches[0][0] middle = matches[0][1].strip() for key, value in pyoptions.charmap.items(): middle = middle.replace(key, value) if re.findall(pyoptions.rangepattern, middle): middles.extend(charanger(middle[1:-1])) elif re.findall(pyoptions.confpattern, middle): for m in confcore(middle): middles.append(m) else: middles.append(middle) middle_lenght = pyoptions.middle_switcher for m in middles: if int(level) >= pyoptions.level: for item in itertools.product(rawlist, repeat=2): if len(item[0]) <= middle_lenght and len( item[1]) <= middle_lenght: res.append(item[0] + m + item[1]) for item in itertools.product(shapers, repeat=2): if len(item[0]) <= middle_lenght and len( item[1]) <= middle_lenght: res.append(item[0] + m + item[1]) for w in shapers: res.append(w) for suffix in suffix_content: matches = re.findall(pyoptions.level_str_pattern, suffix) if matches: tails = [] level = matches[0][0] tail = matches[0][1].strip() for key, value in pyoptions.charmap.items(): tail = tail.replace(key, value) if re.findall(pyoptions.rangepattern, tail): tails.extend(charanger(tail[1:-1])) elif re.findall(pyoptions.confpattern, tail): for t in confcore(tail): tails.append(t) else: tails.append(tail) for t in tails: if int(level) >= pyoptions.level: res.append(w + t) for prefix_suffix in prefix_suffix_content: matches = re.findall(pyoptions.level_str_str_pattern, prefix_suffix) if matches: heads = [] tails = [] level = matches[0][0] head = matches[0][1].strip() tail = matches[0][2].strip() for key, value in pyoptions.charmap.items(): head = head.replace(key, value) tail = tail.replace(key, value) if re.findall(pyoptions.rangepattern, head): heads.extend(charanger(head[1:-1])) elif re.findall(pyoptions.confpattern, head): for h in confcore(head): heads.append(h) else: heads.append(head) if re.findall(pyoptions.rangepattern, tail): tails.extend(charanger(tail[1:-1])) elif re.findall(pyoptions.confpattern, tail): for t in confcore(tail): tails.append(t) else: tails.append(tail) for h in heads: for t in tails: if int(level) >= pyoptions.level: res.append(h + w + t) for prefix in prefix_content: matches = re.findall(pyoptions.level_str_pattern, prefix) if matches: heads = [] level = matches[0][0] head = matches[0][1].strip() for key, value in pyoptions.charmap.items(): head = head.replace(key, value) if re.findall(pyoptions.rangepattern, head): heads.extend(charanger(head[1:-1])) elif re.findall(pyoptions.confpattern, head): for h in confcore(head): heads.append(h) else: heads.append(head) for h in heads: if int(level) >= pyoptions.level: res.append(h + w) return unique(res)
def wordsharker(raw, leet=True): # raw word maybe strange case, both not lowercase and uppercase, such as 'myName' # init_word_res = [] raw = str(raw).strip() # level {format} if pyoptions.level <= 5: # 5 {raw} init_word_res.append(raw) if pyoptions.level <= 4: # 4 {raw:lowercase} init_word_res.append(raw.lower()) # 4 {Raw:capitalize} init_word_res.append(raw.capitalize()) if pyoptions.level <= 3: # 3 {RAW:uppercase} init_word_res.append(raw.upper()) # 3 {raw}{raw} init_word_res.append(raw + raw) # 3 {raw:lowercase}{raw:lowercase} init_word_res.append(raw.lower() + raw.lower()) # 3 {raw}{RAW:uppercase} init_word_res.append(raw + raw.upper()) # 3 {raw:lowercase}{RAW:uppercase} init_word_res.append(raw.lower() + raw.upper()) if pyoptions.level <= 2: # 2 {RAW:uppercase}{raw} init_word_res.append(raw.upper() + raw) # 2 {RAW:uppercase}{raw:lowercase} init_word_res.append(raw.upper() + raw.lower()) # 2 {r:initials:lowercase} init_word_res.append(raw[0].lower()) # 2 {R:initials:uppercase} init_word_res.append(raw[0].upper()) # 2 {war:reverse} init_word_res.append(raw[::-1]) # 2 {war:reverse:lowercase} init_word_res.append(raw[::-1].lower()) # 2 {war:reverse:uppercase} init_word_res.append(raw[::-1].upper()) if pyoptions.level <= 1: # 1 {Raw:capitalize}{raw} init_word_res.append(raw.capitalize() + raw) # 1 {Raw:capitalize}{raw:lowercase} init_word_res.append(raw.capitalize() + raw.lower()) # 1 {Raw:capitalize}{RAW:uppercase} init_word_res.append(raw.capitalize() + raw.upper()) # 1 {Raw:capitalize}{Raw:capitalize} init_word_res.append(raw.capitalize() + raw.capitalize()) # 1 {waR:capitalize:reverse} init_word_res.append(raw.capitalize()[::-1]) # 1 {raW:reverse:capitalize:reverse} init_word_res.append(raw[::-1].capitalize()[::-1]) # 1 {raw}{war:reverse} init_word_res.append(raw + raw[::-1]) # 1 {raw}{war:reverse:lowercase} init_word_res.append(raw + raw[::-1].lower()) # 1 {raw}{war:reverse:uppercase} init_word_res.append(raw + raw[::-1].upper()) # 1337 mode if leet: for code in pyoptions.leetmode_code: init_word_res.append(leet_mode_magic(raw, code)) return unique(init_word_res)
def do_run(self, args): pystrs.startime = time.time() results = [] storepath = os.path.join( paths.results_path, '%s_%s%s' % (pystrs.SEDB_prefix, mybuildtime(), pyoptions.filextension)) with open(storepath, "a") as f: # SingleRule for single in SingleRule(pystrs.sedb_dict[pystrs.sedb_range[0]], pystrs.sedb_dict[pystrs.sedb_range[1]], pystrs.sedb_dict[pystrs.sedb_range[2]], pystrs.sedb_dict[pystrs.sedb_range[3]], pystrs.sedb_dict[pystrs.sedb_range[4]], pystrs.sedb_dict[pystrs.sedb_range[5]], pystrs.sedb_dict[pystrs.sedb_range[6]], pystrs.sedb_dict[pystrs.sedb_range[7]], pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[9]], pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[11]], pystrs.sedb_dict[pystrs.sedb_range[12]], pystrs.sedb_dict[pystrs.sedb_range[13]], pystrs.sedb_dict[pystrs.sedb_range[14]]): results.append(single) # SDrule for sd in SDrule(pystrs.sedb_dict[pystrs.sedb_range[0]], pystrs.sedb_dict[pystrs.sedb_range[3]]): results.append(sd) for sd in SDrule(pystrs.sedb_dict[pystrs.sedb_range[0]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(sd) # EB for eb in EB(pystrs.sedb_dict[pystrs.sedb_range[1]], pystrs.sedb_dict[pystrs.sedb_range[3]]): results.append(eb) for eb in EB(pystrs.sedb_dict[pystrs.sedb_range[1]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(eb) # Mailrule for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[0]]): results.append(mr) for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[1]]): results.append(mr) for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[2]]): results.append(mr) for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[4]]): results.append(mr) for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[10]]): results.append(mr) for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[14]]): results.append(mr) for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[3]], isstrs=False): results.append(mr) for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[13]], isstrs=False): results.append(mr) # NB for nn in NB(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[3]]): results.append(nn) for nn in NB(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(nn) # SB for sb in SB(pystrs.sedb_dict[pystrs.sedb_range[2]], pystrs.sedb_dict[pystrs.sedb_range[3]]): results.append(sb) for sb in SB(pystrs.sedb_dict[pystrs.sedb_range[2]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(sb) # NNrule for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]], pystrs.sedb_dict[pystrs.sedb_range[5]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]], pystrs.sedb_dict[pystrs.sedb_range[6]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[5]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[6]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[7]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[9]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[12]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]], pystrs.sedb_dict[pystrs.sedb_range[7]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]], pystrs.sedb_dict[pystrs.sedb_range[9]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]], pystrs.sedb_dict[pystrs.sedb_range[11]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]], pystrs.sedb_dict[pystrs.sedb_range[12]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(nn) # SNrule for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]], pystrs.sedb_dict[pystrs.sedb_range[3]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]], pystrs.sedb_dict[pystrs.sedb_range[5]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]], pystrs.sedb_dict[pystrs.sedb_range[6]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]], pystrs.sedb_dict[pystrs.sedb_range[7]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]], pystrs.sedb_dict[pystrs.sedb_range[9]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]], pystrs.sedb_dict[pystrs.sedb_range[11]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[3]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[5]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[6]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[7]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[9]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[11]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]], pystrs.sedb_dict[pystrs.sedb_range[3]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]], pystrs.sedb_dict[pystrs.sedb_range[5]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]], pystrs.sedb_dict[pystrs.sedb_range[6]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]], pystrs.sedb_dict[pystrs.sedb_range[7]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]], pystrs.sedb_dict[pystrs.sedb_range[9]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]], pystrs.sedb_dict[pystrs.sedb_range[11]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(sn) # SSrule for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]], pystrs.sedb_dict[pystrs.sedb_range[1]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]], pystrs.sedb_dict[pystrs.sedb_range[4]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]], pystrs.sedb_dict[pystrs.sedb_range[8]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]], pystrs.sedb_dict[pystrs.sedb_range[10]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]], pystrs.sedb_dict[pystrs.sedb_range[14]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]], pystrs.sedb_dict[pystrs.sedb_range[4]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]], pystrs.sedb_dict[pystrs.sedb_range[8]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]], pystrs.sedb_dict[pystrs.sedb_range[10]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]], pystrs.sedb_dict[pystrs.sedb_range[14]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[10]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[14]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[14]]): results.append(ss) # WeakPass for weakpwd in walks_all_files(paths.sedblist_path): results.append(weakpwd) readylist = [] readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[0]]) readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[1]]) readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[2]]) readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[4]]) readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[10]]) readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[14]]) # Using extend_enter plug for extendstr in extend_enter(readylist, leet=pyoptions.sedb_leet): results.append(extendstr) if not pyoptions.args_pick: for ur in unique(results): f.write(ur + pyoptions.CRLF) else: for ur in unique(results): if pyoptions.minlen <= len(ur) <= pyoptions.maxlen: f.write(ur + pyoptions.CRLF) finishprinter(finishcounter(storepath), storepath)
def do_run(self, args): pystrs.startime = time.time() results = [] storepath = finalsavepath(paths.results_path, pystrs.SEDB_prefix, mybuildtime(), pyoptions.filextension, paths.results_file_name) paths.results_file_name = None # SingleRule for single in SingleRule(pystrs.sedb_dict[pystrs.sedb_range[0]], pystrs.sedb_dict[pystrs.sedb_range[1]], pystrs.sedb_dict[pystrs.sedb_range[2]], pystrs.sedb_dict[pystrs.sedb_range[3]], pystrs.sedb_dict[pystrs.sedb_range[4]], pystrs.sedb_dict[pystrs.sedb_range[5]], pystrs.sedb_dict[pystrs.sedb_range[6]], pystrs.sedb_dict[pystrs.sedb_range[7]], pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[9]], pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[11]], pystrs.sedb_dict[pystrs.sedb_range[12]], pystrs.sedb_dict[pystrs.sedb_range[13]], pystrs.sedb_dict[pystrs.sedb_range[14]]): results.append(single) # SDrule for sd in SDrule(pystrs.sedb_dict[pystrs.sedb_range[0]], pystrs.sedb_dict[pystrs.sedb_range[3]]): results.append(sd) for sd in SDrule(pystrs.sedb_dict[pystrs.sedb_range[0]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(sd) # EB for eb in EB(pystrs.sedb_dict[pystrs.sedb_range[1]], pystrs.sedb_dict[pystrs.sedb_range[3]]): results.append(eb) for eb in EB(pystrs.sedb_dict[pystrs.sedb_range[1]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(eb) # Mailrule for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[0]]): results.append(mr) for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[1]]): results.append(mr) for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[2]]): results.append(mr) for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[4]]): results.append(mr) for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[10]]): results.append(mr) for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[14]]): results.append(mr) for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[3]], isstrs=False): results.append(mr) for mr in Mailrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[13]], isstrs=False): results.append(mr) # NB for nn in NB(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[3]]): results.append(nn) for nn in NB(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(nn) # SB for sb in SB(pystrs.sedb_dict[pystrs.sedb_range[2]], pystrs.sedb_dict[pystrs.sedb_range[3]]): results.append(sb) for sb in SB(pystrs.sedb_dict[pystrs.sedb_range[2]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(sb) # NNrule for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]], pystrs.sedb_dict[pystrs.sedb_range[5]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]], pystrs.sedb_dict[pystrs.sedb_range[6]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[5]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[6]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[7]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[9]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[12]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]], pystrs.sedb_dict[pystrs.sedb_range[7]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]], pystrs.sedb_dict[pystrs.sedb_range[9]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]], pystrs.sedb_dict[pystrs.sedb_range[11]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]], pystrs.sedb_dict[pystrs.sedb_range[12]]): results.append(nn) for nn in NNrule(pystrs.sedb_dict[pystrs.sedb_range[3]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(nn) # SNrule for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]], pystrs.sedb_dict[pystrs.sedb_range[3]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]], pystrs.sedb_dict[pystrs.sedb_range[5]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]], pystrs.sedb_dict[pystrs.sedb_range[6]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]], pystrs.sedb_dict[pystrs.sedb_range[7]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]], pystrs.sedb_dict[pystrs.sedb_range[9]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]], pystrs.sedb_dict[pystrs.sedb_range[11]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[4]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[3]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[5]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[6]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[7]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[9]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[11]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]], pystrs.sedb_dict[pystrs.sedb_range[3]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]], pystrs.sedb_dict[pystrs.sedb_range[5]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]], pystrs.sedb_dict[pystrs.sedb_range[6]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]], pystrs.sedb_dict[pystrs.sedb_range[7]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]], pystrs.sedb_dict[pystrs.sedb_range[9]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]], pystrs.sedb_dict[pystrs.sedb_range[11]]): results.append(sn) for sn in SNrule(pystrs.sedb_dict[pystrs.sedb_range[14]], pystrs.sedb_dict[pystrs.sedb_range[13]]): results.append(sn) # SSrule for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]], pystrs.sedb_dict[pystrs.sedb_range[1]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]], pystrs.sedb_dict[pystrs.sedb_range[4]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]], pystrs.sedb_dict[pystrs.sedb_range[8]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]], pystrs.sedb_dict[pystrs.sedb_range[10]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[0]], pystrs.sedb_dict[pystrs.sedb_range[14]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]], pystrs.sedb_dict[pystrs.sedb_range[4]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]], pystrs.sedb_dict[pystrs.sedb_range[8]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]], pystrs.sedb_dict[pystrs.sedb_range[10]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[1]], pystrs.sedb_dict[pystrs.sedb_range[14]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[10]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[8]], pystrs.sedb_dict[pystrs.sedb_range[14]]): results.append(ss) for ss in SSrule(pystrs.sedb_dict[pystrs.sedb_range[10]], pystrs.sedb_dict[pystrs.sedb_range[14]]): results.append(ss) # WeakPass for weakpwd in walks_all_files(paths.sedblist_path): results.append(weakpwd) readylist = [] readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[0]]) readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[1]]) readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[2]]) readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[4]]) readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[10]]) readylist.extend(pystrs.sedb_dict[pystrs.sedb_range[14]]) # Using extend_enter plug for extendstr in extend_enter(readylist, leet=pyoptions.sedb_leet): results.append(extendstr) with open(storepath, "a") as f: for ur in unique(results): item = filterforfun( "".join(ur), head=pyoptions.head, tail=pyoptions.tail, lenght_is_filter=pyoptions.args_pick, minlen=pyoptions.minlen, maxlen=pyoptions.maxlen, regex_is_filter=True, regex=pyoptions.filter_regex, encode_is_filter=True, encode=pyoptions.encode, occur_is_filter=True, letter_occur=pyoptions.letter_occur, digital_occur=pyoptions.digital_occur, special_occur=pyoptions.special_occur, types_is_filter=True, letter_types=pyoptions.letter_types, digital_types=pyoptions.digital_types, special_types=pyoptions.special_types, ) if item: f.write(item + pyoptions.CRLF) finishprinter(finishcounter(storepath), storepath)