def bypass(target, wcode): # beta feature text = '' header = getheader.req(target, '/', 'HEAD') # bypass status code -> header[0] = 301 or 302 if header and str(header[0]) != wcode: return True else: return False
def test(target): # call from show_wildcard(domain) rndString = rnd('abcdefghijklmnopqrstuvwxyz') rndSubdomain = str(rndString) + '.' + target try: host = socket.gethostbyname(rndSubdomain) if host: httpreq = getheader.req(rndSubdomain, '/', 'HEAD') return httpreq, True except: return False, False
def get_banner(domain): # host_not_found is False by default # or set to True by show_resolved(domain, resolve) if host_not_found: return # return [headers] # status, reason, headers # len = 3 getinfo_header = getheader.req(domain, '/', 'HEAD') # set to global for show_banner(domain) global code, reason, header if not getinfo_header: (code, header) = False, False return (code, reason, header) = str(getinfo_header[0]), str( getinfo_header[1]), getinfo_header[2]
def get_header(url, path, method): return getheader.req(url, path, method)