get all websites on same server from bing search
(self, a)
| 1079 | print menuu |
| 1080 | |
| 1081 | def getSites(self, a): |
| 1082 | """ |
| 1083 | get all websites on same server |
| 1084 | from bing search |
| 1085 | """ |
| 1086 | lista = [] |
| 1087 | page = 1 |
| 1088 | while page <= 101: |
| 1089 | try: |
| 1090 | bing = "http://www.bing.com/search?q=ip%3A" + \ |
| 1091 | self.serverip + "+&count=50&first=" + str(page) |
| 1092 | openbing = urllib2.urlopen(bing) |
| 1093 | readbing = openbing.read() |
| 1094 | findwebs = re.findall('<h2><a href="(.*?)"', readbing) |
| 1095 | for i in range(len(findwebs)): |
| 1096 | allnoclean = findwebs[i] |
| 1097 | findall1 = re.findall('http://(.*?)/', allnoclean) |
| 1098 | for idx, item in enumerate(findall1): |
| 1099 | if 'www' not in item: |
| 1100 | findall1[idx] = 'http://www.' + item + '/' |
| 1101 | else: |
| 1102 | findall1[idx] = 'http://' + item + '/' |
| 1103 | lista.extend(findall1) |
| 1104 | |
| 1105 | page += 50 |
| 1106 | except urllib2.URLError: |
| 1107 | pass |
| 1108 | self.sites = unique(lista) |
| 1109 | if a: |
| 1110 | clearScr() |
| 1111 | print '[*] Found ', len(lista), ' Website\n' |
| 1112 | for site in self.sites: |
| 1113 | print site |
| 1114 | |
| 1115 | def getWordpress(self): |
| 1116 | """ |