Skip to content

Commit

Permalink
Merge pull request #1067 from psyray/fix-port-scan-nmap-error
Browse files Browse the repository at this point in the history
Nmap port scan fails when Naabu return no port
  • Loading branch information
yogeshojha authored Nov 23, 2023
2 parents fafbf7a + 329ac81 commit d8af5d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions web/reNgine/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1372,6 +1372,12 @@ def port_scan(self, hosts=[], ctx={}, description=None):
# Send notification
logger.warning(f'Found opened port {port_number} on {ip_address} ({host})')

if len(ports_data) == 0:
logger.info('Finished running naabu port scan - No open ports found.')
if nmap_enabled:
logger.info('Nmap scans skipped')
return ports_data

# Send notification
fields_str = ''
for host, ports in ports_data.items():
Expand Down

0 comments on commit d8af5d2

Please sign in to comment.