def scan(scanner, domain): urls = set() for case in http.get(URL % domain).text.split('<TD>')[1:]: if not '<A ' in case: urls.add(case.split('</TD>')[0]) return urls
def scan(scanner, domain): urls = set() for case in http.get(URL % domain).text: case = case.split(' ')[0] if (domain in case) and (not '@' in case) and (not '/' in case) and ( not ':' in case): urls.add(case)
def scan(scanner, domain): urls = set() for case in http.get(URL % domain).text.split('"'): if (domain in case) and (not '@' in case) and (not '/' in case) and ( not ':' in case): urls.add(case) return urls
def askSearch(query, page=0): urls = list() url = 'http://www.ask.com/web?q=%s&page=%s' % (query, page) response = http.get(url).text if 'Make sure all words are spelled correctly' in response: return urls cases = response.split('<div class="PartialSearchResults-item-title">')[1:] for case in cases: try: urls.append(case.split('href=\'')[1].split('\'')[0]) except: return urls return urls
def googleSearch(query, page=0, rpp=10): # rpp = results per page, default 10 urls = list() url = 'https://google.com/search?q=%s&btnG=Search&hl=en-US&biw=&bih=&gbv=1&start=%s&filter=0' % ( query, page * rpp) response = http.get(url).text if 'Our systems have detected unusual traffic' in response: return urls if 'did not match any documents' in response: return urls cases = response.split('<cite')[1:] for case in cases: result = case.split('>')[1].split('</cite')[0] if result.startswith('http'): urls.append(result) return urls