This commit is contained in:
Jokob-sk
2023-01-02 19:48:07 +11:00
parent f8b6b5272b
commit 75cbc3c249
2 changed files with 4 additions and 7 deletions

View File

@@ -1775,13 +1775,8 @@ def performNmapScan(devicesToScan):
for device in devicesToScan: for device in devicesToScan:
# Execute command # Execute command
output = "" output = ""
# prepare arguments from user supplied ones
# nmap -p portFrom-portTo 192.168.1.3
# nmap -p -10000 192.168.1.3
nmapArgs = ['nmap'] + NMAP_ARGS.split() + [device["dev_LastIP"]] nmapArgs = ['nmap'] + NMAP_ARGS.split() + [device["dev_LastIP"]]
# nmapArgs = nmapArgs.append(NMAP_ARGS.split())
# nmapArgs = nmapArgs.append(device["dev_LastIP"])
try: try:
# try runnning a subprocess with a forced (timeout + 30 seconds) in case the subprocess hangs # try runnning a subprocess with a forced (timeout + 30 seconds) in case the subprocess hangs
@@ -1796,7 +1791,7 @@ def performNmapScan(devicesToScan):
if output == "": # check if the subprocess failed if output == "": # check if the subprocess failed
file_print('[', timeNow(), '] Scan: Nmap FAIL - check logs') file_print('[', timeNow(), '] Scan: Nmap FAIL - check logs')
else: else:
file_print('[', timeNow(), '] Scan: Nmap SUCCESS') file_print('[', timeNow(), '] Scan: Nmap SUCCESS for ', device["dev_LastIP"])
# check the last run output # check the last run output
newLines = output.split('\n') newLines = output.split('\n')

View File

@@ -532,6 +532,8 @@
} }
</script> </script>
<h3>Below results are from scheduled scans you can set up in Settings</h3>
<table id="tableNmap" class="table table-bordered table-hover table-striped "> <table id="tableNmap" class="table table-bordered table-hover table-striped ">
<thead> <thead>
<tr> <tr>