Update portscan-top-100-udp-ports.py

Allows for UDP scan to be run even if user is not root (edge case).
Fixes #145
This commit is contained in:
Tib3rius 2022-05-10 16:40:14 -04:00
parent f82a9a7005
commit 48bea9d0d2
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ class Top100UDPPortScan(PortScan):
async def run(self, target):
# Only run UDP scan if user is root.
if os.getuid() == 0:
if os.getuid() == 0 or config['disable_sanity_checks']:
if target.ports:
if target.ports['udp']:
process, stdout, stderr = await target.execute('nmap {nmap_extra} -sU -A --osscan-guess -p ' + target.ports['udp'] + ' -oN "{scandir}/_custom_ports_udp_nmap.txt" -oX "{scandir}/xml/_custom_ports_udp_nmap.xml" {address}', blocking=False)