def start(): import urllib from random import randint from lib.check import flib, chost host = raw_input(C + '[*]' + W + 'asm>[dnsmap] Host/ip: ') dom = flib(host) if chost(dom) == True: print '[*] Starting ... [*]' print '[*] ip/host %s is Activ [*]' % dom print '[*] Please White ... [*]' xdom = 'https://dnsdumpster.com/static/map/' + dom + '.png' rand = str(randint(0, 2000)) fname = rand + 'dns_map_' + dom.replace('.', '_') + '.jpg' # File Name try: rQx = urllib.urlretrieve(xdom, '../../output/' + fname) print '[*] Request Send [*]' print '[*] Saved To output/' + fname + ' success [*]' # Save True print W + '[*] END [*]' # End Process print GR + '[Type 98 to Back]' + W print GR + '[Type 99 to Exit]' + W print GR + '[Type 100 to options]' + W except: print '[-] oops error [-]' # Save False else: print R + '[-]' ' oops Error(%s) occured; invalid URL [-]' % dom # Error Host print W + '[*] END [*]' # End Process start() # Continue
def start(): # import from lib._fileSave import saved from requests import post import json from random import randint from lib.check import chost, flib host = raw_input(C + '[*]' + W + 'asm>[reverse_ip] Host: ') # Target file = raw_input(C + '[*]' + W + 'asm>[reverse_ip] show File output?y/n ' ) # y = Save To File n = Show Recv dom = flib(host) # Bad protocol [http:// https://] xdom = 'http://domains.yougetsignal.com/domains.php' if chost(dom) == True: # Check For Host print '[*] Starting ... [*]' print '[*] host %s is Activ [*]' % dom print '[*] Please White ... [*]' try: rQx = post(xdom, {'remoteAddress': dom}) # Request Send print '[*] Request Send [*]' data = json.loads(rQx.text) # Json Load sors = "\tSorgulanan Site = " + data["remoteAddress"] + '\n' tops = "\tToplam Site = " + data["domainCount"] + '\n' ipas = "******" + data["remoteIpAddress"] + '\n' reverse = str(sors + tops + ipas) # All if (file == 'y' or file == 'Y'): # Save To File rand = str(randint(0, 2000)) fname = rand + 'reverseip_' + dom.replace( '.', '_') + '.html' # File Name fsave = saved(reverse, fname) for domain in (data["domainArray"]): fsave = saved('\t' + domain[0] + '\n', fname) if (fsave == True): print '[*] Saved To output/' + fname + ' success [*]' # Save True elif (fsave == False): print '[*] bad to saved file [*]' # Save False else: pass elif (file == 'n' or file == 'N'): # Show Recv print print C + reverse for domain in (data["domainArray"]): print(C + '\t' + domain[0]) # Show Data print else: print print C + reverse for domain in (data["domainArray"]): print(C + '\t' + domain[0]) # Show Data print print W + '[+] End [+]' except: print '[-] oops error [-]' print W + '[+] End [+]' print GR + '[Type 98 to Back]' + W print GR + '[Type 99 to Exit]' + W print GR + '[Type 100 to options]' + W else: print R + '[-] oops Error(%s) occured; invalid URL [-]' % dom # Error Host is Ofline or invalid url print W + '[*] END [*]' start() # continue
def start(): # import from urllib import urlopen from random import randint from bs4 import BeautifulSoup from lib._fileSave import saved from lib.check import chost,flib host = raw_input(C+'[*]'+W+'asm>[reverse_mx] Host: ') # Target dom = flib(host) # Bad protocol [http:// https://] if chost(dom) == True: # Check For Host def psend(host): send = urlopen('http://www.viewdns.info/reversemx/?mx='+host).read() # Send Request bs = BeautifulSoup(send,'html.parser').find('font',face="Courier") # Parser Page return str(bs).replace('''<script class="stripe-button" data-amount="19900" data-currency="usd" data-description="Full report for 'google.com'" data-image="/images/ok.GIF" data-key="pk_live_ey9TT0KvaFQoLWRyDYg9oqQd" data-label="Download The Full Report for $199" data-name="" src="https://checkout.stripe.com/checkout.js"></script>''','') # try: print '[*] Starting ... [*]' print '[*] ip/host %s is Activ [*]'%dom print '[*] Please White ... [*]' rand = str(randint(0,2000)) fname = rand+'reverse_mx_'+dom.replace('.','_')+'.html' # File Name recv = psend(dom) fsave = saved(recv,fname) # Save To File if(fsave==True): print '[*] Saved To output/'+fname+' success [*]' # Seve True elif(fsave==False): print '[*] bad to saved file [*]' # Save False else: pass print W+'[*] END [*]' # End process # except: # print '[-] oops error [-]' else: print R+'[-] oops Error(%s) occured; invalid URL [-]'%dom # Error Host is Ofline or invalid url print W+'[*] END [*]' start() # continue
def start(): # import from urllib import urlopen from lib._fileSave import saved from random import randint from lib.check import chost, flib import lib.builtwith import sys host = raw_input(C + '[*]' + W + 'asm>[frameworks_activ_web] Host: ') # Target file = raw_input(C + '[*]' + W + 'asm>[frameworks_activ_web] show File output?y/n ' ) # y = Saved To File n = Show Recv dom = flib(host) # Bad protocol [http:// https://] # # Check for Host if chost(dom) == True: # # Start print '[*] Starting ... [*]' print '[*] ip/host %s is Activ [*]' % dom print '[*] Please White ... [*]' # try: results = lib.builtwith.builtwith('http://' + dom) if (file == 'y' or file == 'Y'): # file Save rand = str(randint(0, 2000)) fname = rand + 'frameworks_activ_web_' + dom.replace( '.', '_') + '.html' # File Name for result in sorted(results.items()): rQn = '\t%s: %s\n' % result fsave = saved(rQn, fname) # Saved if (fsave == True): print '[*] Saved To output/' + fname + ' success [*]' # File Save True elif (fsave == False): print '[*] bad to saved file [*]' # File Not Save else: pass elif (file == 'n' or file == 'N'): # Show Recv print for result in sorted(results.items()): rQn = '\t%s: %s' % result print C + rQn # Show Recv print else: print for result in sorted(results.items()): rQn = '\t%s: %s' % result print C + rQn # Show Recv print print W + '[*] END [*]' # End Process print GR + '[Type 98 to Back]' + W print GR + '[Type 99 to Exit]' + W print GR + '[Type 100 to options]' + W # except: # Error # print '[-] oops error [-]' else: print R + '[-] oops Error(%s) occured; invalid URL [-]' % dom # Error For Host print W + '[*] END [*]' start() # Continue
def start(): # import from urllib import urlopen from lib._fileSave import saved from random import randint from lib.check import chost, flib host = raw_input(C + '[*]' + W + 'asm>[http_header] Host/ip: ') # Target file = raw_input(C + '[*]' + W + 'asm>[http_header] show File output?y/n ' ) # y = Save To File n = show Recv dom = flib(host) # Bad protocol [http:// https://] if chost(dom) == True: # Check For Host print '[*] Starting ... [*]' print '[*] ip/host %s is Activ [*]' % dom print '[*] Please White ... [*]' try: rQx = urlopen('http://' + dom).headers.items() # Send Request print '[*] Request Send [*]' if (file == 'y' or file == 'Y'): # Save To File rand = str(randint(0, 2000)) fname = rand + 'httpHeader_' + dom.replace( '.', '_') + '.html' # File Name for key, value in rQx: response = '\t' + key + ' : ' + value + '\n' fsave = saved(response, fname) if (fsave == True): print '[*] Saved To output/' + fname + ' success [*]' # Save File True elif (fsave == False): print '[*] bad to saved file [*]' # Save File False else: pass elif (file == 'n' or file == 'N'): # Show Recv print for x, r in rQx: if x == 'set-cookie': print '\t' + C + 'set-cookie' + ' : ' + ' . . .' continue print '\t' + C + x + ' : ' + r print else: print for x, r in rQx: if x == 'set-cookie': print '\t' + C + 'set-cookie' + ' : ' + ' . . .' continue print '\t' + C + x + ' : ' + r print print W + '[*] END [*]' # End Process print GR + '[Type 98 to Back]' + W print GR + '[Type 99 to Exit]' + W print GR + '[Type 100 to options]' + W except: print '[-] oops error [-]' # Error Null :( else: print R + '[-] oops Error(%s) occured; invalid URL [-]' % dom # Error Host print W + '[*] END [*]' # End Process start() # Continue
def start(): # import from requests import get from socket import gethostbyname from random import randint from lib._fileSave import saved from lib.check import chost,flib host = raw_input(C+'[*]'+W+'asm>[ipapi] Host/ip: ') # Target file = raw_input(C+'[*]'+W+'asm>[ipapi] show File output?y/n ') # y = Save To File n = Show Recv dom = flib(host) if chost(dom) == True: # Check For Host print '[*] Starting ... [*]' print '[*] ip/host %s is Activ [*]'%dom print '[*] Please White ... [*]' url = gethostbyname(dom) xdom = 'https://ipapi.co/'+url+'/json'; index = ['ip', 'city', 'region', 'country','country_name', 'postal','latitude', 'longitude', 'timezone', 'asn','org'] # Option usage = {'user-agent': 'ipapi/ipapi-python/0.5.1'} # User Agent try: rQx = get(xdom,headers=usage).json() # Request Send print '[*] Request Send [*]' if (file == 'y' or file == 'Y'):# Save To File rand =str(randint(0,2000)) fname = '../../../output/'+rand+'ipapi_'+dom.replace('.','_')+'.html' # File Name for x in index: output = str(x)+' : '+str(rQx[x])+'\n' fsave = saved(output,fname) if(fsave==True): print '[*] Saved To output/'+fname+' success [*]' # Save True elif(fsave==False): print '[*] bad to saved file [*]' # Save False else: pass elif(file == 'n' or file == 'N'): # Show Recv print for x in index: output = C+str(x)+' : '+str(rQx[x]) print '\t'+output print else: print for x in index: output = C+str(x)+' : '+str(rQx[x]) print '\t'+output print print W+'[*] END [*]'# End Process print GR+'[Type 98 to Back]'+W print GR+'[Type 99 to Exit]'+W print GR+'[Type 100 to options]'+W except: print '[-] oops error [-]' # Error Null :( else: print R+'[-]'' oops Error(%s) occured; Server offline or invalid URL [-]'%dom # Error Host print W+'[*] END [*]' start() # Continue
def start(): # import from urllib import urlopen from bs4 import BeautifulSoup from lib._fileSave import saved from random import randint from lib.check import chost, flib host = raw_input(C + '[*]' + W + 'asm>[whois] Host/ip: ') # Target file = raw_input( C + '[*]' + W + 'asm>[whois] show File output?y/n ') # y = Save To File n = Show Recv dom = flib(host) xdom = 'https://whois.com/whois/' + dom if chost(dom) == True: # Check For Host print '[*] Starting ... [*]' print '[*] ip/host %s is Activ [*]' % dom print '[*] Please White ... [*]' try: rQx = urlopen(xdom).read() # Send Request rQn = BeautifulSoup(rQx, 'html.parser') if (file == 'y' or file == 'Y'): rand = str(randint(0, 2000)) fname = rand + 'whois_' + dom.replace( '.', '_') + '.html' # File Name fsave = saved(str(rQn.find('pre', id="registrarData")), fname) # Save To File if (fsave == True): print '[*] Saved To output/' + fname + ' success [*]' # Save True elif (fsave == False): print '[*] bad to saved file [*]' # Save False else: pass elif (file == 'n' or file == 'N'): print print C + rQn.find('pre', id="registrarData").text # Show Recv print else: print print '\t' + C + rQn.find('pre', id="registrarData").text # Show Recv print print W + '[*] END [*]' # End Process print GR + '[Type 98 to Back]' + W print GR + '[Type 99 to Exit]' + W print GR + '[Type 100 to options]' + W except: print '[-] oops error [-]' # Error Null :( else: print R + '[-] oops Error(%s) occured; invalid URL [-]' % dom # Error Host print W + '[*] END [*]' # End Process start() # Continue
def start(): # import from urllib import urlopen from bs4 import BeautifulSoup from random import randint from lib.check import flib, chost def _a(host, f): bs = BeautifulSoup(host, 'html.parser').find_all( 'a', href=True) # Parser Page For a try: s = open(f, 'a') s.write('all link : ' + str(len(bs))) save = bs for x in save: value = '\n' + str(x['href']) + '\n\t' s.write(value) s.close() return True except: return False host = raw_input(C + '[*]' + W + 'asm>[crawler] Host: ') # Target dom = flib(host) # Bad protocot [http:// https://] if chost(dom) == True: try: print '[*] Starting ... [*]' print '[*] ip/host %s is Activ [*]' % dom print '[*] Please White ... [*]' fname = 'output/' + str(randint(0, 2000)) + 'crawler_' + dom.replace( '.', '_') + '.txt' # File Name host = urlopen('http://' + dom).read() recv = _a(host, fname) if recv == True: print '[*] Saved To ' + fname + ' success [*]' # Save True elif recv == False: print '[*] bad to saved file [*]' # Save False else: pass print W + '[*] END [*]' # End Process print GR + '[Type 98 to Back]' + W print GR + '[Type 99 to Exit]' + W print GR + '[Type 100 to options]' + W except: print '[-] oops error [-]' # Error Null :( else: print R + '[-] oops Error(%s) occured; invalid URL [-]' % dom # Error Host print W + '[*] END [*]' # End Process start() # Continue
def start(): # import from lib._fileSave import saved from random import randint from requests import post from bs4 import BeautifulSoup from lib.check import chost, flib host = raw_input(C + '[*]' + W + 'asm>[traceroute] Host/ip: ') # Target file = raw_input( C + '[*]' + W + 'asm>[traceroute] show File output?y/n ') # y = Save To File dom = flib(host) # Bad protocol [http:// https://] if chost(dom) == True: # Check For Host print '[*] Starting ... [*]' print '[*] ip/host %s is Activ [*]' % dom print '[*] Please White ... [*]' try: rQx = post('http://www.ipaddressguide.com/traceroute', { 'host': dom }).content # Request Send bs = BeautifulSoup(rQx, 'html.parser').code.text # Parser Page print '[*] Request Send [*]' if (file == 'y' or file == 'Y'): # Save To File rand = str(randint(0, 2000)) fname = rand + 'traceroute_' + dom.replace( '.', '_') + '.html' # FileName fsave = _fileSave.saved(bs, fname) if (fsave == True): print '[*] Saved To output/' + fname + ' success [*]' # Save True elif (fsave == False): print '[*] bad to saved file [*]' # Save False else: pass elif (file == 'n' or file == 'N'): # show recv print print C + bs print else: print print C + bs print print W + '[*] END [*]' # End Process except: print '[-] oops error [-]' # Error else: print R + '[-] oops Error(%s) occured; invalid URL [-]' % dom # Error Host print W + '[*] END [*]' # End Process start() # Continue
def start(): # import from urllib import urlopen from lib._fileSave import saved from random import randint from lib.check import chost, flib host = raw_input(C + '[*]' + W + 'asm>[find_shared_dns] Host/ip: ') # Target file = raw_input(C + '[*]' + W + 'asm>[find_shared_dns] show File output?y/n ' ) # y = Save To File n = Show Recv dom = flib(host) xdom = 'https://api.hackertarget.com/findshareddns/?q=' + dom if chost(dom) == True: # Check For Host print '[*] Starting ... [*]' print '[*] ip/host %s is Activ [*]' % dom print '[*] Please White ... [*]' try: rQx = urlopen(xdom).read() # Send Request print '[*] Request Send [*]' if (file == 'y' or file == 'Y'): rand = str(randint(0, 2000)) fname = rand + 'find_shared_dns_' + dom.replace( '.', '_') + '.html' # File Name fsave = saved(rQx, fname) # Save To File if (fsave == True): print '[*] Saved To output/' + fname + ' success [*]' # Save True elif (fsave == False): print '[*] bad to saved file [*]' # Save False else: pass elif (file == 'n' or file == 'N'): print print C + rQx # Show Recv print else: print print C + rQx # Show Recv print print W + '[*] END [*]' # End Process print GR + '[Type 98 to Back]' + W print GR + '[Type 99 to Exit]' + W print GR + '[Type 100 to options]' + W except: print '[-] oops error [-]' # Error Null :( else: print R + '[-] oops Error(%s) occured; invalid URL [-]' % dom # Error Host print W + '[*] END [*]' # End Process start() # Continue
def start(): # import from urllib import urlopen from lib._fileSave import saved from bs4 import BeautifulSoup from random import randint from lib.check import chost, flib host = raw_input(C + '[*]' + W + 'asm>[dns_report] Host/ip: ') # Target dom = flib(host) if chost(dom) == True: # Check For Host def psend(host): send = urllib.urlopen( 'http://www.viewdns.info/dnsreport/?domain=' + host).read() bs = bs4.BeautifulSoup(send, 'html.parser').find('font', face="Courier") return str(bs).replace('ViewDNS.info', '') try: print '[*] Starting ... [*]' print '[*] ip/host %s is Activ [*]' % dom print '[*] Please White ... [*]' rand = str(randint(0, 2000)) fname = rand + 'dns_report_' + dom.replace( '.', '_') + '.html' # File Name recv = psend(dom) fsave = saved(recv, fname) if (fsave == True): print '[*] Saved To output/' + fname + ' success [*]' elif (fsave == False): print '[*] bad to saved file [*]' else: pass print W + '[*] END [*]' print GR + '[Type 98 to Back]' + W print GR + '[Type 99 to Exit]' + W print GR + '[Type 100 to options]' + W except: print '[-] oops error [-]' # Error null :( else: print R + '[-] oops Error(%s) occured; invalid URL [-]' % dom # Error For Host print W + '[*] END [*]' # End Process start() # Continue
def start(): # import from httplib import HTTPConnection from urllib import urlopen from lib.check import chost,flib def z(host): try: return urllib.urlopen('http://'+str(host)).code except: return None host = raw_input(C+'[*]'+W+'asm>[admin_finder_php] Host: ') # Target dom = flib(host) # Bad protocot [http:// https://] if chost(dom) == True: # Check Host php = ['admin/slider.php','admin/add-slider.php','admin/add_gallery_image.php','config/','robots.txt','admin/welcome.php','admin/configration.php','admin/dashbord.php','manage_admin.php','admin/form.php','admin/my_account.php','admin/specializations.php','admin/initialadmin.php','admin/pages/home_admin.php','admin/home.php','admin/save.php','admin/enter.php','admin/userpage.php','admin/banners_report.php','admin/login-home.php','admin/category.php','admin/dashboard/index.php','admin/add_banner.php','admin/add_testimonials.php','admin/userpage.php','admin_main.html','admin/addblog.php','admin/products.php','admin/admin_management.php','admin/add.php','admin/add-room.php','admin/main_page.php','admin/adminview.php','admin/welcomepage.php','admin/index-digital.php','admin/overview.php','admin_home.php','admin/admin_users.php','admin/upload.php','admin/index_ref.php','admin/checklogin.php','admin/member_home.php','admin/banner.php','admin/manageImages.php','admin/login_success.php','admin/leads.php','admin/uhome.html','admin/AdminDashboard.php','admin/cpanel.php','admin/manage_team.php','admin/voucher.php','admin/ManageAdmin.php','admin/dashboard.php','admin/account.php','admin/change_gallery.php','admin/list_gallery.php','admin/viewblog.php','admin/main.php','admin/AdminHome.php','admin/dash.php','admin/gallery.php','admin/product.php','admin/loginsuccess.php','admin/gallery.php','admin/headline.php','admin/page_management.php','admin/index.php','admin/event.php','admin/admin-home.php','admin/myaccount.php','admin/admin_index.php','admin/viewmembers.php','admin/default.php','admin/CPhome.php','admin/control_pages/admin_home.php','admin/adminarea.php','admin/','administrator/','admin1/','admin2/','admin3/','admin4/','admin5/','usuarios/','usuario/','administrator/','moderator/','webadmin/','adminarea/','bb-admin/','adminLogin/','admin_area/','panel-administracion/','instadmin/','memberadmin/','administratorlogin/','adm/','admin/account.php','admin/index.php','admin/login.php','admin/admin.php','admin/account.php','admin_area/admin.php','admin_area/login.php','siteadmin/login.php','siteadmin/index.php','siteadmin/login.html','admin/account.html','admin/index.html','admin/login.html','admin/admin.html','admin_area/index.php','bb-admin/index.php','bb-admin/login.php','bb-admin/admin.php','admin/home.php','admin_area/login.html','admin_area/index.html','admin/controlpanel.php','admin.php','admincp/index.php','admincp/login.php','admincp/index.html','admin/account.html','adminpanel.html','webadmin.html','webadmin/index.html','webadmin/admin.html','webadmin/login.html','admin/admin_login.html','admin_login.html','panel-administracion/login.html','admin/cp.php','cp.php','administrator/index.php','administrator/login.php','nsw/admin/login.php','webadmin/login.php','admin/admin_login.php','admin_login.php','administrator/account.php','administrator.php','admin_area/admin.html','pages/admin/admin-login.php','admin/admin-login.php','admin-login.php','bb-admin/index.html','bb-admin/login.html','acceso.php','bb-admin/admin.html','admin/home.html','login.php','modelsearch/login.php','moderator.php','moderator/login.php','moderator/admin.php','account.php','pages/admin/admin-login.html','admin/admin-login.html','admin-login.html','controlpanel.php','admincontrol.php','admin/adminLogin.html','adminLogin.html','admin/adminLogin.html','home.html','rcjakar/admin/login.php','adminarea/index.html','adminarea/admin.html','webadmin.php','webadmin/index.php','webadmin/admin.php','admin/controlpanel.html','admin.html','admin/cp.html','cp.html','adminpanel.php','moderator.html','administrator/index.html','administrator/login.html','user.html','administrator/account.html','administrator.html','login.html','modelsearch/login.html','moderator/login.html','adminarea/login.html','panel-administracion/index.html','panel-administracion/admin.html','modelsearch/index.html','modelsearch/admin.html','admincontrol/login.html','adm/index.html','adm.html','moderator/admin.html','user.php','account.html','controlpanel.html','admincontrol.html','panel-administracion/login.php','wp-login.php','adminLogin.php','admin/adminLogin.php','home.php','admin.php','adminarea/index.php','adminarea/admin.php','adminarea/login.php','panel-administracion/index.php','panel-administracion/admin.php','modelsearch/index.php','modelsearch/admin.php','admincontrol/login.php','adm/admloginuser.php','admloginuser.php','admin2.php','admin2/login.php','admin2/index.php','usuarios/login.php','adm/index.php','adm_auth.php','memberadmin.php','administratorlogin.php','adm.php'] try: print '[*] Starting ... [*]' print '[*] ip/host %s is Activ [*]'%dom print '[*] Please White ... [*]' def requests(host,adm): for page in adm: page = '/'+str(page).replace('\n','') url = str(host)+page con = HTTPConnection(host) # Send Requests con.request('GET',page) res = con.getresponse().status recv = '\t[+]> '+url+' => '+str(res); if res == 200: print C+recv # True Request else: print R+recv print Y+'\t{'+str(len(adm))+' We checked the page }' requests(dom,php) print W+'[*] END [*]' # End Process print GR+'[Type 98 to Back]'+W print GR+'[Type 99 to Exit]'+W print GR+'[Type 100 to options]'+W except: print '[-] oops error [-]' # Error Null :( else: print R+'[-] oops Error(%s) occured; invalid URL [-]'%dom # Error Host print W+'[*] END [*]' # End Process start() # Continue
def start(): # import from urllib import urlopen from lib._fileSave import saved from bs4 import BeautifulSoup from random import randint from lib.check import chost, flib host = raw_input(C + '[*]' + W + 'asm>[ip_history] Host/ip: ') # Target dom = flib(host) # Bad Protocol [http:// https://] if chost(dom) == True: # Check Domain print '[*] Starting ... [*]' print '[*] ip/host %s is Activ [*]' % dom print '[*] Please White ... [*]' # def psend(host): send = urlopen('http://www.viewdns.info/iphistory/?domain=' + dom).read() # Send Request bs = BeautifulSoup(send, 'html.parser').find('font', face="Courier") recv = str(bs).replace('ViewDNS.info', '') try: rand = str(randint(0, 2000)) fname = rand + 'ip_history_' + dom.replace( '.', '_') + '.html' # File Name fsave = saved(recv, fname) # Saved To File if (fsave == True): print '[*] Saved To output/' + fname + ' success [*]' # Save True elif (fsave == False): print '[*] bad to saved file [*]' # Save False else: pass print GR + '[Type 98 to Back]' + W print GR + '[Type 99 to Exit]' + W print GR + '[Type 100 to options]' + W print W + '[*] END [*]' # End Process except: print '[-] oops error [-]' # Error else: print R + '[-] oops Error(%s) occured; invalid URL [-]' % dom # Error Host print W + '[*] END [*]' start() # Continue
def start(): # import import socket from lib._fileSave import saved from random import randint from lib.check import chost, flib host = raw_input(C + '[*]' + W + 'asm>[scan_port_fast] Host/ip: ') # Target dom = flib(host) # Bad Value Protocol [http:// https://] # Check For host if chost(dom) == True: star = raw_input(C + '[*]' + W + 'asm>[scan_port_fast] start range: ') end = raw_input(C + '[*]' + W + 'asm>[scan_port_fast] end range: ') file = raw_input(C + '[*]' + W + 'asm>[scan_port_fast] show File output?y/n ') def psend(host, port, f=False): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.settimeout(8) try: send = s.connect_ex((host, port)) except: send = 10035 if send == 0: if f == False: return C + '\tport ' + str(port) + ' is open !' else: return '\tport ' + str(port) + ' is open !\n' elif send == 10035: if f == False: return R + '\tport ' + str(port) + ' is close !' else: return '\tport ' + str(port) + ' is close !\n' else: if f == False: return R + '\tport ' + str(port) + ' is close !' else: return '\tport ' + str(port) + ' is close !\n' try: print '[*] Starting ... [*]' print '[*] ip/host %s is Activ [*]' % dom print '[*] start range ' + str(star) + ' up to ' + str( end) + ' [*]' print '[*] Please White ... [*]' rand = str(randint(0, 2000)) fname = rand + 'scan_port_fast_' + dom.replace( '.', '_') + '.html' # File Name if (file == 'y' or file == 'Y'): # Save File for x in range(int(star), int(end)): recv = psend(dom, x, True) fsave = saved(recv, fname) if (fsave == True): print '[*] Saved To output/' + fname + ' success [*]' # File Save True elif (fsave == False): print '[*] bad to saved file [*]' # File Save False else: pass elif (file == 'n' or file == 'N'): # Show Recv print for x in range(int(star), int(end)): print psend(dom, x) print else: print for x in range(int(star), int(end)): print psend(dom, x) print print W + '[*] END [*]' # End Process except: print '[-] oops error [-]' # Error :( else: print R + '[-] oops Error(%s) occured; invalid URL [-]' % dom # Error For Host print W + '[*] END [*]' start() # Continue
def start(): # import from lib._fileSave import saved from random import randint import socket from lib.check import chost,flib host = raw_input(C+'[*]'+W+'asm>[scanportservice] Host/ip: ') # Target dom = flib(host) if chost(dom) == True: # Check for Host star = raw_input(C+'[*]'+W+'asm>[scanportservice] start range: ') end = raw_input(C+'[*]'+W+'asm>[scanportservice] end range: ') file = raw_input(C+'[*]'+W+'asm>[scanportservice] show File output?y/n ') # y = Save To File n = Show Recv def psend(host,port,f=False): s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.settimeout(8) try: send = s.connect_ex((host,port)) try: serv = socket.getservbyport(port) except: serv = 'unknow' except: send = 10035 try: serv = socket.getservbyport(port) except: serv = 'unknow' if send == 0: if f == False: return C+'\tport '+str(port)+'( '+B+serv+C+' ) is open !' else: return '\tport '+str(port)+'( '+serv+' ) is open !' elif send == 10035: if f == False: return R+'\tport '+str(port)+'( '+B+serv+R+' ) is close !' else: return '\tport '+str(port)+'( '+serv+' ) is close !' else: if f == False: return R+'\tport '+str(port)+'( '+B+serv+R+' ) is close !' else: return '\tport '+str(port)+'( '+serv+' ) is close !' try: print '[*] Starting ... [*]' print '[*] ip/host %s is Activ [*]'%dom print '[*] start range '+str(star)+' up to '+str(end)+' [*]' print '[*] Please White ... [*]' if (file == 'y' or file == 'Y'): # Save To File rand = str(randint(0,2000)) fname = rand+'scanportservice_'+dom.replace('.','_')+'.html' # File Save for x in range(int(star),int(end)): recv = psend(dom,x,True) fsave = _fileSave.saved(recv,fname) if(fsave==True): print '[*] Saved To output/'+fname+' success [*]' # Save True elif(fsave==False): print '[*] bad to saved file [*]' # Save False else: pass elif(file == 'n' or file == 'N'): print for x in range(int(star),int(end)): # Show Recv print psend(dom,x) print else: print for x in range(int(star),int(end)): print psend(dom,x) print print W+'[*] END [*]' # End Process except: print '[-] oops error [-]' # Error Null :( else: print R+'[-] oops Error(%s) occured; invalid URL [-]'%dom # Error Host print W+'[*] END [*]' # End Process start() # Continue