Skip to content

Commit 030fb6c

Browse files
committed
return 0 on error
1 parent 8b47646 commit 030fb6c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scanners/bypass_403.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def try_bypass(self) -> dict:
136136
return results
137137

138138
def send_request(self, method, path, headers=None) -> int:
139-
response = str()
139+
response = 0
140140
time.sleep(self.request_cooldown)
141141
try:
142142
response = self._make_request(method=method, url=path, headers=headers,
@@ -147,6 +147,8 @@ def send_request(self, method, path, headers=None) -> int:
147147
except requests.exceptions.TooManyRedirects:
148148
self._log_exception(requests.exceptions.TooManyRedirects.__name__, abort=False)
149149
return ScannerDefaultParams.TooManyRedirectsSCode
150+
except Exception as exc: # error -> return 0
151+
pass
150152
return response
151153

152154
def _start_scanner(self, results_filename=None) -> Dict[int, List[str]]:

0 commit comments

Comments
 (0)