fix port scan NoneType Exception to task result

This commit is contained in:
blockomat2100 2021-11-11 13:34:47 +01:00
parent 03f11f6e9b
commit 887cf737d6
1 changed files with 1 additions and 2 deletions

View File

@ -334,8 +334,7 @@ async def scan_target(target):
continue
except asyncio.InvalidStateError:
pass
if task.result()['type'] == 'port':
if task.result() and task.result()['type'] == 'port':
for service in (task.result()['result'] or []):
services.append(service)