Esempio n. 1
0
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
Esempio n. 2
0
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)
Esempio n. 3
0
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
Esempio n. 4
0
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
Esempio n. 5
0
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