From: Russ Handorf Date: Tue, 20 Dec 2022 01:16:09 +0000 (-0500) Subject: just copy a log file into 'logs' X-Git-Url: http://russells-world.com/code/?a=commitdiff_plain;h=26657274cbcef149f9a3864281cb5d152f7bbaa7;p=kismet-logviewer.git just copy a log file into 'logs' --- diff --git a/logviewer/dbview/__pycache__/views.cpython-38.pyc b/logviewer/dbview/__pycache__/views.cpython-38.pyc index b7b9794..9842ad1 100644 Binary files a/logviewer/dbview/__pycache__/views.cpython-38.pyc and b/logviewer/dbview/__pycache__/views.cpython-38.pyc differ diff --git a/logviewer/dbview/views.py b/logviewer/dbview/views.py index c84f38b..1344acb 100644 --- a/logviewer/dbview/views.py +++ b/logviewer/dbview/views.py @@ -9,7 +9,8 @@ import pprint from django.views.decorators.csrf import csrf_exempt def load_db(query): - connection = sqlite3.connect("logs/Kismet-20221208-22-56-36-1.kismet") + dir_list = os.listdir("logs/") + connection = sqlite3.connect("logs/"+dir_list[0]) #connection.row_factory = lambda cursor, row: row[0] cursor = connection.cursor() rows = cursor.execute(query).fetchall() diff --git a/logviewer/devices/__pycache__/views.cpython-38.pyc b/logviewer/devices/__pycache__/views.cpython-38.pyc index 6b59af7..bbd0b8c 100644 Binary files a/logviewer/devices/__pycache__/views.cpython-38.pyc and b/logviewer/devices/__pycache__/views.cpython-38.pyc differ diff --git a/logviewer/devices/views.py b/logviewer/devices/views.py index 5451dc8..b65035b 100644 --- a/logviewer/devices/views.py +++ b/logviewer/devices/views.py @@ -9,7 +9,8 @@ import pprint from django.views.decorators.csrf import csrf_exempt def load_db(query): - connection = sqlite3.connect("logs/Kismet-20221208-22-56-36-1.kismet") + dir_list = os.listdir("logs/") + connection = sqlite3.connect("logs/"+dir_list[0]) #connection.row_factory = lambda cursor, row: row[0] cursor = connection.cursor() rows = cursor.execute(query).fetchall() diff --git a/logviewer/logviewer/__pycache__/settings.cpython-38.pyc b/logviewer/logviewer/__pycache__/settings.cpython-38.pyc index 5031e5a..33105dd 100644 Binary files a/logviewer/logviewer/__pycache__/settings.cpython-38.pyc and b/logviewer/logviewer/__pycache__/settings.cpython-38.pyc differ diff --git a/logviewer/logviewer/__pycache__/urls.cpython-38.pyc b/logviewer/logviewer/__pycache__/urls.cpython-38.pyc index 5fc6884..63157c6 100644 Binary files a/logviewer/logviewer/__pycache__/urls.cpython-38.pyc and b/logviewer/logviewer/__pycache__/urls.cpython-38.pyc differ