def trace_(url): for a, b in regex.REGEX_URL.items(): mutch = re.search(b, url) if (mutch): mutch_ = mutch.group() try: resp = requests.get(url) scode = resp.status_code if '2' in str(scode): r = "\033[32m[{}]\033[00m".format(str(scode)) elif '3' in str(scode): r = "\033[36m[{}]\033[00m".format(str(scode)) elif '4' in str(scode): r = "\033[95m[{}]\033[00m".format(str(scode)) elif '5' in str(scode): r = "\033[35m[{}]\033[00m".format(str(scode)) else: r = scode print( "\033[94m[INFO]\033[00m\033[33m[{}]\033[00m{} {}".format( a.rstrip(), r, nano.search_color(str(mutch_), url))) except: pass else: pass
def dir_(url): try: Dir = str(url).split('/') for item in Dir: if item not in regex.Base_64_white_list and len(item) > 10: mutch = re.search( "^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$", item) if (mutch): m = mutch.group() try: decodebs64 = base64.b64decode(m) try: if "\\x" not in str(decodebs64): print( "\033[94m[INFO] Possibly base64 on url:\033[00m {} " .format(nano.search_color(str(m), url))) print( "\033[32m[decode is] ----------|\033[00m " + str(decodebs64)) except UnicodeError: pass except binascii.Error: pass except: pass
def param_(url): try: basedir = url.split('?')[1] item = basedir.split('&') c = '' for x in item: if nano.rev(x)[0] == '=': c += '=' if nano.rev(x)[1] == '=': c += '=' if nano.rev(x)[2] == '=': c += '=' fstring = x.split('=')[1] fstring += c if fstring not in regex.Base_64_white_list: mutch = re.search( "^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$", fstring) if (mutch): m = mutch.group() try: decodebs64 = base64.b64decode(m) try: Decode = decodebs64.encode('utf-8') if "\\x" not in str(Decode): print( "\033[94m[INFO] Possibly base64 on url:\033[00m {} " .format(nano.search_color(str(m), url))) print( "\033[32m[decode is] ----------|\033[00m " + str(decodebs64)) except UnicodeError: pass except binascii.Error: pass except: pass