compatible with python 3

This commit is contained in:
Riyad Parvez 2013-11-09 11:54:30 +06:00
commit b436ebfae9

10
LANs.py
View file

@ -344,12 +344,12 @@ class Parser():
pass pass
else: else:
searched = searched.replace('+', ' ').replace('%20', ' ').replace('%3F', '?').replace('%27', '\'').replace('%40', '@').replace('%24', '$').replace('%3A', ':').replace('%3D', '=').replace('%22', '\"').replace('%24', '$') searched = searched.replace('+', ' ').replace('%20', ' ').replace('%3F', '?').replace('%27', '\'').replace('%40', '@').replace('%24', '$').replace('%3A', ':').replace('%3D', '=').replace('%22', '\"').replace('%24', '$')
print T+'[+] Searched '+W+host+T+': '+searched+W print(T+'[+] Searched '+W+host+T+': '+searched+W)
logger.write('[+] Searched '+host+ ' for: '+searched+'\n') logger.write('[+] Searched '+host+ ' for: '+searched+'\n')
def post_parser(self, url, body, host, header_lines): def post_parser(self, url, body, host, header_lines):
if 'ocsp' in url: if 'ocsp' in url:
print B+'[+] POST: '+W+url print(B+'[+] POST: '+W+url)
logger.write('[+] POST: '+url+'\n') logger.write('[+] POST: '+url+'\n')
elif body != '': elif body != '':
try: try:
@ -988,12 +988,12 @@ def main():
nmap = nmap.communicate()[0] nmap = nmap.communicate()[0]
nmap = nmap.splitlines()[3:-4] nmap = nmap.splitlines()[3:-4]
except: except:
print '[-] Nmap port and OS scan failed, is it installed?' print('[-] Nmap port and OS scan failed, is it installed?')
for x in nmap: for x in nmap:
print '[+]',x print('[+]',x)
logger.write('[+] '+x+'\n') logger.write('[+] '+x+'\n')
print '' print('')
# Cleans up if Ctrl-C is caught # Cleans up if Ctrl-C is caught
def signal_handler(signal, frame): def signal_handler(signal, frame):