Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib2
- import re
- #Edit by iljimae (meber of VHS)
- target = raw_input("\n\tSite : ")
- if target.startswith("http://"):
- target = target.replace("http://", "")
- print "\n\tI fixed link ", target
- print ""
- elif target.startswith("https://"):
- target = target.replace("https://", "")
- print "\n\tI fixed link ", target
- print ""
- else:
- pass
- app = []
- app.append(target)
- uagent= {'User-Agent':'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0'}
- for site in set(app):
- if site.startswith("http://"):
- site = site.replace("http://", "")
- print "\n\tI fixed link ", site
- elif site.startswith("https://"):
- site = site.replace("https://", "")
- print "\n\tI fixed link ", site
- else:
- site = site
- urlqeqe = "http://viewdns.info/portscan/?host=%s" % (site)
- request = urllib2.Request(urlqeqe, headers=uagent)
- fd = urllib2.urlopen(request)
- data = fd.read()
- comp = re.compile('"/images/\S+" height="20"')
- baglantilar = comp.findall(data)
- PORT = ["","",21,22,23,25,80,110,139,143,443,445,1433,1521,3306,3389]
- Service = ["","","FTP","SSH","Telnet","SMTP","HTTP","POP3","NETBIOS","IMAP","HTTPS","SMB","MSSQL","ORACLE","MySQL","Remote Desktop(RDP)"]
- a = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
- ax = -1
- print "\nTarget %s \n" % (site)
- for i in baglantilar:
- i = i.replace('"/images/', "").replace('" height="20"', "")
- ax = ax +1 #Finally -_ -
- if 1 < ax < 16:
- if i == "ok.GIF":
- i = "OPEN"
- elif i == "error.GIF":
- i = "CLOSE"
- print "PORT %d %s Service %s" %(PORT[a[ax]],i,str(Service[a[ax]]))
- #VHS scan port!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement