Fix small bug from curl 404 output (#134)
* Fix small bug from curl 404 output This PR fixes a small bug from when `curl` receives an `HTTP 404` from the web server and the error code is non-zero (in this case `22`). This handles that case in the if statement. There may other error codes that `curl` throws, HTTP-wise, that you may want to catch in the future as well but I didn't run into them. * Update main.py Fixed small logic bug. Co-authored-by: Tib3rius <48113936+Tib3rius@users.noreply.github.com>
This commit is contained in:
parent
1a2b9e9501
commit
29b302fa8c
|
@ -323,7 +323,7 @@ async def service_scan(plugin, service):
|
|||
warn('A process was left running after service scan {bblue}' + plugin.name + ' {green}(' + tag + '){rst} against {byellow}' + service.target.address + '{rst} finished. Please ensure non-blocking processes are awaited before the run coroutine finishes. Awaiting now.', verbosity=2)
|
||||
await process_dict['process'].wait()
|
||||
|
||||
if process_dict['process'].returncode != 0:
|
||||
if process_dict['process'].returncode != 0 and not (process_dict['cmd'].startswith('curl') and process_dict['process'].returncode == 22):
|
||||
errors = []
|
||||
while True:
|
||||
line = await process_dict['stderr'].readline()
|
||||
|
|
Loading…
Reference in New Issue