@@ -26,24 +26,23 @@ def __init__(self, domains_queue=None, original_subdomain=None, *args, **kwargs)
26
26
super ().__init__ (* args , ** kwargs )
27
27
self .original_subdomain = original_subdomain
28
28
if self .original_subdomain is not None :
29
- url_path = self .generate_url_base_path (self .original_subdomain )
30
- self ._save_results (f"{ url_path } \n " )
29
+ self ._record_found (self .generate_url_base_path (self .original_subdomain ))
31
30
self .domains_queue = domains_queue if domains_queue else queue .Queue ()
32
31
33
32
def single_bruter (self ):
34
33
35
34
while not self .words_queue .empty () and not ScanManager ._SHOULD_ABORT :
36
35
subdomain = self .words_queue .get ()
36
+ url_path = self .generate_url_base_path (subdomain )
37
37
if subdomain == self .original_subdomain :
38
+ self ._update_count (url_path , True )
38
39
continue
39
- url_path = self .generate_url_base_path (subdomain )
40
40
found = False
41
41
try :
42
42
res = self ._make_request (method = "GET" , url = url_path )
43
43
found = res .status_code
44
44
if found :
45
- self ._save_results (f"{ url_path } \n " )
46
- self ._log_progress (f"found -> { url_path } " )
45
+ self ._record_found (url_path )
47
46
self .domains_queue .put (url_path )
48
47
except (requests .exceptions .ConnectionError , requests .exceptions .ConnectTimeout ,
49
48
requests .exceptions .ReadTimeout , HTTPError ):
@@ -58,6 +57,10 @@ def single_bruter(self):
58
57
self ._update_count (url_path , found )
59
58
time .sleep (self .request_cooldown )
60
59
60
+ def _record_found (self , url_path : str ):
61
+ self ._save_results (f"{ url_path } \n " )
62
+ self ._log_progress (f"added to queue -> { url_path } " )
63
+
61
64
def _start_scanner (self ) -> queue .Queue :
62
65
threads = list ()
63
66
self ._log_status (OutputStatusKeys .State , OutputValues .StateRunning )
0 commit comments