def analy_req(address):
mainDomain = conf_read('maindomain')
address = address[:-len(mainDomain) - 1]
payload = conf_read('payload')
encoding = conf_read('encoding')
record = address
try:
if encoding == 'int':
record = ipaddr.IPAddress(int(address)).__str__()
elif encoding == 'hex':
try:
address = address.decode('hex')
if ipaddr.IPAddress(address).version == 4:
record = address
elif conf_read('type') == 'AAAA' and ipaddr.IPAddress(address).version == 6:
record = address
else:
pass
except:
pass
# elif False not in map(lambda x:x in map(lambda x:chr(x),range(97,108)),list(address)):
elif encoding == 'en':
record = numToEnToNum(address)
elif payload != 'None' and payload.find(mainDomain) == -1:
# record = payload + "www.google.com"
record = payload + mainDomain
except Exception,e:
print '[!] Subdomain Invalid {}'.format(e)
finally:
return record
评论列表
文章目录