def start(self): print '[%s] Start Spider...' % (time.strftime('%H:%M:%S')) self.tasks_queue.put((1, (self.site, self.depth))) while True: try: p, (url, depth) = self.tasks_queue.get(True, 1) except Empty, e: if self.pool.undone_tasks(): continue else: break if url not in self.visited: self.pool.spawn(self.crawl_page, *(url, depth)) self.visited.append(url) fuzz_urls.put(url)
def brute(self, url): if self.get_is_vul(url): self.bruted_urls.append(url) fuzz_urls.put(url)