From 682e77af2dc73ca4cde6ea63f05463a179a008d1 Mon Sep 17 00:00:00 2001 From: javi Date: Wed, 24 Apr 2019 23:45:44 +0200 Subject: [PATCH] shodan to stop on no credits --- src/wfuzz/plugin_api/payloadtools.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wfuzz/plugin_api/payloadtools.py b/src/wfuzz/plugin_api/payloadtools.py index 19b827c1..ee91833a 100644 --- a/src/wfuzz/plugin_api/payloadtools.py +++ b/src/wfuzz/plugin_api/payloadtools.py @@ -184,6 +184,8 @@ def _do_search(self): self.page_queue.task_done() if "Invalid page size" in str(e): self.results_queue.put(None) + elif "Insufficient query credits" in str(e): + self.results_queue.put(None) else: self.results_queue.put(e) continue @@ -217,8 +219,6 @@ def _stop(self): self._threads = [] self.results_queue.put(None) - self._cancel_job = False - self._started = False def __next__(self): if not self._started: @@ -230,6 +230,8 @@ def __next__(self): if res is None: self._stop() + self._cancel_job = False + self._started = False raise StopIteration elif isinstance(res, Exception): self._stop()