Maintaining

Changing the layout of maintenance page, fixing some bugs, add a function to disable the network scan (just for fun), update the readme
This commit is contained in:
leiweibau
2022-06-24 22:46:16 +02:00
parent 5ea6764f40
commit cbf55ca58b
8 changed files with 382 additions and 266 deletions

View File

@@ -34,6 +34,7 @@ import csv
#===============================================================================
PIALERT_BACK_PATH = os.path.dirname(os.path.abspath(__file__))
PIALERT_PATH = PIALERT_BACK_PATH + "/.."
STOPARPSCAN = PIALERT_PATH + "/db/setting_stoparpscan"
if (sys.version_info > (3,0)):
exec(open(PIALERT_PATH + "/config/version.conf").read())
@@ -81,8 +82,10 @@ def main ():
res = update_devices_MAC_vendors()
elif cycle == 'update_vendors_silent':
res = update_devices_MAC_vendors('-s')
else :
elif os.path.exists(STOPARPSCAN) == False :
res = scan_network()
elif os.path.exists(STOPARPSCAN) == True :
res = 0
# Check error
if res != 0 :
@@ -457,7 +460,6 @@ def execute_arpscan (pRetries):
# Default arp-scan
# arpscan_args = ['sudo', 'arp-scan', SCAN_SUBNETS, '--ignoredups', '--retry=' + str(pRetries)]
# print (arpscan_args)
# TESTING - Fast Scan