Skip to content

Commit 7ea11fb

Browse files
committed
dont clear attempt list
1 parent 7836488 commit 7ea11fb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scanners/content_scanner.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ def single_bruter(self):
4747
attempt = self.words_queue.get().strip("/")
4848
found_any = False
4949

50-
attempt_list.extend([f"/{attempt}/", f"/{attempt}"])
51-
if "." in attempt: # check if there is a file extension
50+
attempt_list.append(f"/{attempt}")
51+
if "." in attempt: # check if there is a file extension
5252
if ScannerDefaultParams.FileExtensions:
5353
for extension in ScannerDefaultParams.FileExtensions:
5454
attempt_post = "." + attempt.split(".")[-1]
5555

5656
if attempt_post != extension:
5757
attempt_list.append(f"/{attempt.replace(attempt_post, extension)}")
58+
else:
59+
attempt_list.append(f"/{attempt}/")
5860

5961
for brute in attempt_list:
6062
path = urllib.parse.quote(brute)
@@ -88,11 +90,11 @@ def single_bruter(self):
8890
except Exception as exc:
8991
self.abort_scan(reason=f"target {url}, exception - {exc}")
9092
finally:
91-
attempt_list.clear()
9293
if found_any:
9394
self._save_results()
9495
time.sleep(self.request_cooldown)
9596

97+
attempt_list.clear()
9698
self._update_count(attempt, found_any)
9799

98100
def _start_scanner(self):

0 commit comments

Comments
 (0)