コード例 #1
0
ファイル: finger_google.py プロジェクト: 0x554simon/w3af
    def discover(self, fuzzable_request):
        """
        :param fuzzable_request: A fuzzable_request instance that contains
                                    (among other things) the URL to test.
        """
        if not is_private_site(fuzzable_request.get_url().get_domain()):
            self._google = google(self._uri_opener)
            self._domain = domain = fuzzable_request.get_url().get_domain()
            self._domain_root = fuzzable_request.get_url().get_root_domain()

            if self._fast_search:
                self._do_fast_search(domain)
            else:
                self._do_complete_search(domain)
コード例 #2
0
    def discover(self, fuzzable_request):
        """
        :param fuzzable_request: A fuzzable_request instance that contains
                                    (among other things) the URL to test.
        """
        if not is_private_site(fuzzable_request.get_url().get_domain()):
            self._google = google(self._uri_opener)
            self._domain = domain = fuzzable_request.get_url().get_domain()
            self._domain_root = fuzzable_request.get_url().get_root_domain()

            if self._fast_search:
                self._do_fast_search(domain)
            else:
                self._do_complete_search(domain)
コード例 #3
0
ファイル: google_spider.py プロジェクト: ZionOps/w3af
    def crawl(self, fuzzable_request):
        """
        :param fuzzable_request: A fuzzable_request instance that contains
                                    (among other things) the URL to test.
        """
        google_se = google(self._uri_opener)

        domain = fuzzable_request.get_url().get_domain()
        if is_private_site(domain):
            msg = 'There is no point in searching google for "site:%s".' " Google doesn't index private pages."
            raise BaseFrameworkException(msg % domain)

        try:
            g_results = google_se.get_n_results("site:" + domain, self._result_limit)
        except:
            pass
        else:
            self.worker_pool.map(self.http_get_and_parse, [r.URL for r in g_results])
コード例 #4
0
ファイル: finger_google.py プロジェクト: hougomartim/w3af
    def discover(self, fuzzable_request, debugging_id):
        """
        :param debugging_id: A unique identifier for this call to discover()
        :param fuzzable_request: A fuzzable_request instance that contains
                                    (among other things) the URL to test.
        """
        if is_private_site(fuzzable_request.get_url().get_domain()):
            return

        # There are no race conditions here with these attributes because of
        # @runonce
        self._domain = fuzzable_request.get_url().get_domain()
        self._domain_root = fuzzable_request.get_url().get_root_domain()
        self._google = google(self._uri_opener)

        if self._fast_search:
            self._do_fast_search()
        else:
            self._do_complete_search()
コード例 #5
0
    def _do_clasic_GHDB(self, domain):
        """
        In classic GHDB, i search google for every term in the ghdb.
        """
        self._google_se = google(self._uri_opener)

        google_hack_list = self._read_ghdb()
        # Don't get discovered by google [at least try...] and avoid dups
        random.shuffle(google_hack_list)
        google_hack_set = set(google_hack_list)

        for gh in google_hack_set:
            search_term = 'site:%s %s' % (domain, gh.search)
            try:
                self._classic_worker(gh, search_term)
            except BaseFrameworkException as w3:
                # Google is saying: "no more automated tests".
                om.out.error('GHDB exception: "' + str(w3) + '".')
                break
コード例 #6
0
ファイル: ghdb.py プロジェクト: 3rdDegree/w3af
    def _do_clasic_GHDB(self, domain):
        """
        In classic GHDB, i search google for every term in the ghdb.
        """
        self._google_se = google(self._uri_opener)

        google_hack_list = self._read_ghdb()
        # Don't get discovered by google [at least try...] and avoid dups
        random.shuffle(google_hack_list)
        google_hack_set = set(google_hack_list)

        for gh in google_hack_set:
            search_term = 'site:%s %s' % (domain, gh.search)
            try:
                self._classic_worker(gh, search_term)
            except BaseFrameworkException, w3:
                # Google is saying: "no more automated tests".
                om.out.error('GHDB exception: "' + str(w3) + '".')
                break
コード例 #7
0
ファイル: google_spider.py プロジェクト: intfrr/Tortazo
    def crawl(self, fuzzable_request):
        """
        :param fuzzable_request: A fuzzable_request instance that contains
                                    (among other things) the URL to test.
        """
        google_se = google(self._uri_opener)

        domain = fuzzable_request.get_url().get_domain()
        if is_private_site(domain):
            msg = 'There is no point in searching google for "site:%s".'\
                  ' Google doesn\'t index private pages.'
            raise BaseFrameworkException(msg % domain)

        try:
            g_results = google_se.get_n_results('site:' + domain,
                                                self._result_limit)
        except:
            pass
        else:
            self.worker_pool.map(self.http_get_and_parse,
                                 [r.URL for r in g_results])
コード例 #8
0
ファイル: test_google.py プロジェクト: Daisymei/w3af
 def setUp(self):
     self.query, self.limit = random.choice([('big bang theory', 20),
                                             ('two and half man', 20),
                                             ('doctor house', 20)])
     opener = ExtendedUrllib()
     self.gse = google(opener)
コード例 #9
0
ファイル: test_google.py プロジェクト: chenbremer/w3af-1
 def setUp(self):
     self.query, self.limit = random.choice([('big bang theory', 20),
                                             ('two and half man', 20),
                                             ('doctor house', 20)])
     opener = ExtendedUrllib()
     self.gse = google(opener)