From 241314192946917ea839e1795f2e3839f2f21eb9 Mon Sep 17 00:00:00 2001 From: r4ulcl Date: Sun, 1 Oct 2023 12:50:03 +0100 Subject: [PATCH 1/2] Fix SQL error in v1.4 --- utils/database_utils.py | 2 +- mac-vendors-export.csv => utils/mac-vendors-export.csv | 0 utils/wifi_db_aircrack.py | 3 +-- wifi_db.py | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) rename mac-vendors-export.csv => utils/mac-vendors-export.csv (100%) diff --git a/utils/database_utils.py b/utils/database_utils.py index b9a21ee..1b58eef 100644 --- a/utils/database_utils.py +++ b/utils/database_utils.py @@ -81,7 +81,7 @@ def insertAP(cursor, verbose, bssid, essid, manuf, channel, freqmhz, carrier, if firstTimeSeen != 0: sql = """UPDATE AP SET firstTimeSeen = CASE WHEN firstTimeSeen = '' OR firstTimeSeen = '0' OR - firstTimeSeen IS NULL OR firstTimeSeen > (?)) AND + firstTimeSeen IS NULL OR firstTimeSeen > (?) AND (?) <> 0 AND firstTimeSeen <> 0 THEN (?) ELSE firstTimeSeen END WHERE bssid = (?)""" if verbose: diff --git a/mac-vendors-export.csv b/utils/mac-vendors-export.csv similarity index 100% rename from mac-vendors-export.csv rename to utils/mac-vendors-export.csv diff --git a/utils/wifi_db_aircrack.py b/utils/wifi_db_aircrack.py index 53408a5..de60ec6 100644 --- a/utils/wifi_db_aircrack.py +++ b/utils/wifi_db_aircrack.py @@ -19,7 +19,7 @@ def parse_netxml(ouiMap, name, database, verbose): '''Function to parse the .kismet.netxml files''' filename = name - exists = os.path.isfile(filename) + exists = os.path.isfile(filename)) errors = 0 try: cursor = database.cursor() @@ -352,7 +352,6 @@ def parse_log_csv(ouiMap, name, database, verbose, fake_lat, fake_lon): # if row[6] != "0.000000": errors += database_utils.insertSeenAP( cursor, verbose, row[3], time, - 'aircrack-ng', row[4], lat, lon, '0.0', 0) diff --git a/wifi_db.py b/wifi_db.py index d57ab6b..510646b 100755 --- a/wifi_db.py +++ b/wifi_db.py @@ -18,7 +18,7 @@ # import nest_asyncio ; nest_asyncio.apply() -> # Fix RuntimeError: This event loop is already running” -VERSION = '1.4' +VERSION = '1.4.1' def banner(): From ee82b17c0f069811db4db39615ca69917c2bf4bd Mon Sep 17 00:00:00 2001 From: r4ulcl Date: Sun, 1 Oct 2023 12:52:47 +0100 Subject: [PATCH 2/2] Fix )) --- utils/wifi_db_aircrack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/wifi_db_aircrack.py b/utils/wifi_db_aircrack.py index de60ec6..7fbeed1 100644 --- a/utils/wifi_db_aircrack.py +++ b/utils/wifi_db_aircrack.py @@ -19,7 +19,7 @@ def parse_netxml(ouiMap, name, database, verbose): '''Function to parse the .kismet.netxml files''' filename = name - exists = os.path.isfile(filename)) + exists = os.path.isfile(filename) errors = 0 try: cursor = database.cursor()