From 0dd1bf265827167517184260dbe24c99fdc9d77f Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Fri, 1 Mar 2024 10:07:46 +0000 Subject: [PATCH 01/18] add update function for emba --- embark/embark/urls.py | 1 + embark/static/content/css/updater.css | 0 embark/templates/base.html | 19 ------ embark/templates/navigation.html | 8 +++ embark/templates/updater/index.html | 19 ++++++ embark/templates/updater/update-emba.html | 18 +++++ embark/updater/__init__.py | 0 embark/updater/admin.py | 3 + embark/updater/apps.py | 6 ++ embark/updater/forms.py | 16 +++++ embark/updater/migrations/__init__.py | 0 embark/updater/models.py | 3 + embark/updater/tests.py | 3 + embark/updater/urls.py | 11 ++++ embark/updater/views.py | 80 +++++++++++++++++++++++ embark/uploader/boundedexecutor.py | 33 ++++++++++ supervisor.sh | 4 +- 17 files changed, 203 insertions(+), 21 deletions(-) create mode 100644 embark/static/content/css/updater.css create mode 100644 embark/templates/updater/index.html create mode 100644 embark/templates/updater/update-emba.html create mode 100644 embark/updater/__init__.py create mode 100644 embark/updater/admin.py create mode 100644 embark/updater/apps.py create mode 100644 embark/updater/forms.py create mode 100644 embark/updater/migrations/__init__.py create mode 100644 embark/updater/models.py create mode 100644 embark/updater/tests.py create mode 100644 embark/updater/urls.py create mode 100644 embark/updater/views.py diff --git a/embark/embark/urls.py b/embark/embark/urls.py index 60899c5a4..20e67f97b 100644 --- a/embark/embark/urls.py +++ b/embark/embark/urls.py @@ -19,6 +19,7 @@ urlpatterns = [ # path('admin/', admin.site.urls), + path('', include('updater.urls')), path('', include('uploader.urls')), path('', include('users.urls')), path('', include('dashboard.urls')), diff --git a/embark/static/content/css/updater.css b/embark/static/content/css/updater.css new file mode 100644 index 000000000..e69de29bb diff --git a/embark/templates/base.html b/embark/templates/base.html index 74eec6fe4..55c469078 100644 --- a/embark/templates/base.html +++ b/embark/templates/base.html @@ -80,24 +80,5 @@ - \ No newline at end of file diff --git a/embark/templates/navigation.html b/embark/templates/navigation.html index 7f878753e..11d54b78d 100644 --- a/embark/templates/navigation.html +++ b/embark/templates/navigation.html @@ -93,6 +93,14 @@ Reports +
  • + + + + + Updater + +
  • - + Updater From 6b46a9862bbdfa6b00909887d23c2789dd935322 Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Tue, 5 Mar 2024 08:16:50 +0000 Subject: [PATCH 04/18] ugly check --- VERSION.txt | 1 + dev-tools/create-version.sh | 17 +++++++++ embark/embark/context_processor.py | 4 ++ embark/embark/helper.py | 38 +++++++++++++++++++ embark/embark/settings/dev.py | 12 +++++- embark/static/content/css/updater.css | 26 +++++++++++++ embark/templates/base.html | 3 ++ embark/templates/updater/check.html | 13 +++++++ embark/templates/updater/index.html | 30 +++++++++++++-- .../updater/{update-emba.html => update.html} | 4 +- embark/templates/user/login.html | 1 + embark/updater/forms.py | 10 ++--- embark/updater/views.py | 29 ++++++++------ embark/uploader/boundedexecutor.py | 10 ++--- 14 files changed, 171 insertions(+), 27 deletions(-) create mode 100644 VERSION.txt create mode 100755 dev-tools/create-version.sh create mode 100644 embark/embark/context_processor.py create mode 100644 embark/templates/updater/check.html rename embark/templates/updater/{update-emba.html => update.html} (76%) diff --git a/VERSION.txt b/VERSION.txt new file mode 100644 index 000000000..5c3f2bfd4 --- /dev/null +++ b/VERSION.txt @@ -0,0 +1 @@ +0.1-748b8460 \ No newline at end of file diff --git a/dev-tools/create-version.sh b/dev-tools/create-version.sh new file mode 100755 index 000000000..a9d52ade9 --- /dev/null +++ b/dev-tools/create-version.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# EMBArk - The firmware security scanning environment +# +# Copyright 2024 Siemens Energy AG +# +# EMBArk comes with ABSOLUTELY NO WARRANTY. +# +# EMBArk is licensed under MIT +# +# Author(s): Benedikt Kuehne + +# Description: Automates writing the VERSION.txt + +# create version +sed -i "s|-.*|-$(git describe --always)|1" "$(dirname "${0}")/../VERSION.txt" +# and tag for version +# TODO \ No newline at end of file diff --git a/embark/embark/context_processor.py b/embark/embark/context_processor.py new file mode 100644 index 000000000..735cf1e2e --- /dev/null +++ b/embark/embark/context_processor.py @@ -0,0 +1,4 @@ +from django.conf import settings + +def embark_version(request): + return {'EMBARK_VERSION': settings.VERSION[0], 'EMBA_VERSION': settings.VERSION[1]} diff --git a/embark/embark/helper.py b/embark/embark/helper.py index 3076fda70..0a0205456 100644 --- a/embark/embark/helper.py +++ b/embark/embark/helper.py @@ -1,6 +1,9 @@ +from pathlib import Path from random import randrange import os +# from embark.settings.deploy import EMBA_ROOT +EMBA_ROOT = os.path.join('/home/benedikt/embark', 'emba') def rnd_rgb_color(): """ @@ -56,6 +59,41 @@ def cleanup_charfield(charfield) -> str: return charfield +def get_version_strings(): + # gets us the currently installed version + if Path(EMBA_ROOT + "/external/onlinechecker").exists(): + # get the latest version nnumbers + with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_VERSION.txt"),'r') as emba_version_file: + stable_emba_version = emba_version_file.read().splitlines()[0] + with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_CONTAINER_HASH.txt"),'r') as container_version_file: + container_version = container_version_file.read().splitlines()[0] + with open(Path(EMBA_ROOT + "/external/onlinechecker/NVD_HASH.txt"),'r') as nvd_version_file: + nvd_version = nvd_version_file.read().splitlines()[0] + with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_GITHUB_HASH.txt"),'r') as emba_github_version_file: + github_emba_version = emba_github_version_file.read().splitlines()[0] + else: + stable_emba_version = "" + container_version = "" + nvd_version = "" + github_emba_version = "" + + if Path(EMBA_ROOT + "/config/VERSION.txt").exists(): + with open(Path(EMBA_ROOT + "/config/VERSION.txt"),'r') as emba_version_file: + emba_version = emba_version_file.read().splitlines()[0] + else: + emba_version = "" + + if Path("./VERSION.txt").exists(): + with open(Path("./VERSION.txt"),'r') as embark_version_file: + embark_version = embark_version_file.read().splitlines()[0] + else: + embark_version = "" + + return embark_version, emba_version, stable_emba_version, container_version, nvd_version, github_emba_version + + if __name__ == '__main__': TEST_STRING = 'Linux / v2.6.33.2' print(cleanup_charfield(TEST_STRING)) + + print(get_version_strings()) diff --git a/embark/embark/settings/dev.py b/embark/embark/settings/dev.py index cfe99852a..e0f389f46 100644 --- a/embark/embark/settings/dev.py +++ b/embark/embark/settings/dev.py @@ -4,6 +4,8 @@ from dotenv import load_dotenv +from embark.helper import get_version_strings + # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent.parent load_dotenv(dotenv_path=os.path.join(BASE_DIR.parent, '.env')) @@ -33,7 +35,8 @@ 'reporter', 'dashboard', 'tracker', - 'porter' + 'porter', + 'updater' ] AUTH_USER_MODEL = 'users.User' @@ -61,6 +64,7 @@ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', + 'embark.context_processor.embark_version' ], }, }, @@ -134,6 +138,10 @@ 'level': 'WARNING', 'handlers': ['info_handler', 'console_handler'], }, + 'updater': { + 'handlers': ['debug_handler', 'info_handler', 'console_handler'], + 'level': 'DEBUG', + }, 'uploader': { 'handlers': ['debug_handler', 'info_handler', 'console_handler'], 'level': 'DEBUG', @@ -283,3 +291,5 @@ def count_emba_modules(emba_dir_path): EMBA_P_MOD_CNT = 18 EMBA_F_MOD_CNT = 4 EMBA_L_MOD_CNT = 8 + +VERSION = get_version_strings() diff --git a/embark/static/content/css/updater.css b/embark/static/content/css/updater.css index e69de29bb..61e172b7a 100644 --- a/embark/static/content/css/updater.css +++ b/embark/static/content/css/updater.css @@ -0,0 +1,26 @@ +#embarkLogo { + width: 100%; + padding: 50px; +} + +#embarkLogo img { + width: 60%; + max-width: 600px; + display: block; + margin-left: auto; + margin-right: auto; +} + +::selection{ + background-color: #160022; + color: #ffcc00; +} + +.alert { + margin: 30px; +} + +#login_footer { + text-align: center; + margin: 50px 0; +} \ No newline at end of file diff --git a/embark/templates/base.html b/embark/templates/base.html index 55c469078..eb945b61d 100644 --- a/embark/templates/base.html +++ b/embark/templates/base.html @@ -78,6 +78,9 @@ +
    + {{ EMBARK_VERSION }} +
    diff --git a/embark/templates/updater/check.html b/embark/templates/updater/check.html new file mode 100644 index 000000000..39a64e3ac --- /dev/null +++ b/embark/templates/updater/check.html @@ -0,0 +1,13 @@ +{% load django_bootstrap5 %} +
    + +
    + {% csrf_token %} +
    + {% load filters %} + {% bootstrap_form emba_check_form %} + +
    +
    + +
    \ No newline at end of file diff --git a/embark/templates/updater/index.html b/embark/templates/updater/index.html index 2929c0d0a..bfde42802 100644 --- a/embark/templates/updater/index.html +++ b/embark/templates/updater/index.html @@ -12,8 +12,32 @@ {% block maincontent %} {% timezone request.session.django_timezone %} -

    Updater TODO

    - +
    + +
    +

    Current Version: {{ EMBARK_VERSION }}

    +
    + +
    +
    +

    EMBA version {{ EMBA_VERSION }}

    + {% block check %}{% include "updater/check.html" %}{% endblock check %} +
    +
    +
    +

    + +

    + {% block update %}{% include "updater/update.html" %}{% endblock update %} +
    + +
    + {% endtimezone %} {% endblock %} \ No newline at end of file diff --git a/embark/templates/updater/update-emba.html b/embark/templates/updater/update.html similarity index 76% rename from embark/templates/updater/update-emba.html rename to embark/templates/updater/update.html index 84423216c..2563752e2 100644 --- a/embark/templates/updater/update-emba.html +++ b/embark/templates/updater/update.html @@ -5,12 +5,12 @@

    EMBA Configuration

    Update EMBA

    -
    + {% csrf_token %}
    {% load filters %} {% bootstrap_form emba_update_form %} - +
    diff --git a/embark/templates/user/login.html b/embark/templates/user/login.html index 82debb55a..cdb37bc98 100644 --- a/embark/templates/user/login.html +++ b/embark/templates/user/login.html @@ -8,6 +8,7 @@ EMBArk logo graphic
    +

    New Version 0.1

    diff --git a/embark/updater/forms.py b/embark/updater/forms.py index 8b4d989bb..2af1a4f69 100644 --- a/embark/updater/forms.py +++ b/embark/updater/forms.py @@ -5,12 +5,12 @@ class EmbaUpdateForm(forms.Form): - option = forms.ChoiceField(choices=[ - (0, 'Git Update'), (1, 'Docker Update'), (2, 'CVE Update') - ], help_text='Update EMBA', widget=forms.CheckboxSelectMultiple, required=True) + option = forms.MultipleChoiceField(choices=[ + ('GIT', 'Git Update'), ('DOCKER', 'Docker Update'), ('NVD', 'CVE Update') + ], help_text='Update EMBA', widget=forms.CheckboxSelectMultiple, required=False) class CheckForm(forms.Form): - option = forms.ChoiceField(choices=[ - (1, 'Host and container'), (2, 'Only Container') + option = forms.MultipleChoiceField(choices=[ + ('BOTH', 'Host and container'), ('CONTAINER', 'Only Container') ], help_text='Check EMBA', widget=forms.CheckboxSelectMultiple, required=True) diff --git a/embark/updater/views.py b/embark/updater/views.py index a65460807..a9459824a 100644 --- a/embark/updater/views.py +++ b/embark/updater/views.py @@ -24,7 +24,8 @@ def updater_home(request): req_logger.info("User %s called updater_home", request.user.username) emba_update_form = EmbaUpdateForm() - return render(request, 'updater/index.html', {'emba_update_form': emba_update_form}) + emba_check_form = CheckForm() + return render(request, 'updater/index.html', {'emba_update_form': emba_update_form, 'emba_check_form': emba_check_form}) @csrf_protect @@ -40,18 +41,20 @@ def check_update(request): """ req_logger.info("User %s called check_update", request.user.username) # add dep check - form = CheckForm() + form = CheckForm(request.POST) if form.is_valid(): option = form.cleaned_data["option"] logger.debug("Got option %d for emba dep check", option) # inject into bounded Executor if BoundedExecutor.submit_emba_check(option=option): - return HttpResponse("OK") + messages.info(request, "Checking now") + return redirect('embark-updater-home') logger.error("Server Queue full, or other boundenexec error") - return HttpResponseServerError("Queue full") + messages.error(request, 'Queue full') + return redirect('embark-updater-home') logger.error("Form invalid") messages.error(request, 'Form invalid') - return redirect('..') + return redirect('embark-updater-home') @csrf_protect @@ -69,11 +72,15 @@ def update_emba(request): form = EmbaUpdateForm(request.POST) if form.is_valid(): logger.info("User %s tryied to update emba", request.user.username) - # TODO update emba + option = form.cleaned_data['option'] + # do something with it + logger.debug("Option was: %s", option) + for option_ in option: + if option_ == 'GIT': + pass # TODO change shown version - stable_emba_version, container_version, nvd_version, github_emba_version = get_version_strings() - messages.info(request, "") - return redirect('..') - logger.error("update form invalid %s ", request.POST) + messages.info(request, "Updating now") + return redirect('embark-updater-home') + logger.error("update form invalid %s with error: %s", request.POST, form.errors) messages.error(request, 'update not successful') - return redirect('..') + return redirect('embark-updater-home') diff --git a/embark/uploader/boundedexecutor.py b/embark/uploader/boundedexecutor.py index c254c0a21..06681ccbd 100644 --- a/embark/uploader/boundedexecutor.py +++ b/embark/uploader/boundedexecutor.py @@ -366,11 +366,11 @@ def emba_check(cls, option): # wait for completion proc.communicate() # success - logger.info("Kill Successful: %s", cmd) + logger.info("Check Successful: %s", cmd) except BaseException as exce: - logger.error("kill_emba_cmd error: %s", exce) + logger.error("emba dep check error: %s", exce) - # take resulting log and show to user + # TODO take resulting log and show to user @@ -387,9 +387,9 @@ def submit_unzip(cls, uuid, file_loc): return emba_fut @classmethod - def submit_emba_check(cls,uuid, option): + def submit_emba_check(cls, option): # submit dep check to executor threadpool - emba_fut = BoundedExecutor.submit(cls.emba_check, uuid, option) + emba_fut = BoundedExecutor.submit(cls.emba_check, option) return emba_fut @staticmethod From 0d50fea8d36e19ec02ecb38aabf01279d9f9ce13 Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Fri, 12 Apr 2024 06:35:11 +0000 Subject: [PATCH 05/18] drafting --- embark/templates/updater/index.html | 2 + embark/templates/updater/progress.html | 0 embark/updater/forms.py | 4 +- embark/updater/progress.py | 193 +++++++++++++++++++++++++ embark/updater/urls.py | 3 +- embark/updater/views.py | 20 ++- embark/uploader/boundedexecutor.py | 13 +- 7 files changed, 227 insertions(+), 8 deletions(-) create mode 100644 embark/templates/updater/progress.html create mode 100644 embark/updater/progress.py diff --git a/embark/templates/updater/index.html b/embark/templates/updater/index.html index bfde42802..0ec3a00e8 100644 --- a/embark/templates/updater/index.html +++ b/embark/templates/updater/index.html @@ -25,6 +25,8 @@

    Current Version: {{ EMBARK_VERSION }}

    EMBA version {{ EMBA_VERSION }}

    +
    +
    {% block check %}{% include "updater/check.html" %}{% endblock check %}
    diff --git a/embark/templates/updater/progress.html b/embark/templates/updater/progress.html new file mode 100644 index 000000000..e69de29bb diff --git a/embark/updater/forms.py b/embark/updater/forms.py index 2af1a4f69..a1c5b37e6 100644 --- a/embark/updater/forms.py +++ b/embark/updater/forms.py @@ -11,6 +11,6 @@ class EmbaUpdateForm(forms.Form): class CheckForm(forms.Form): - option = forms.MultipleChoiceField(choices=[ + option = forms.ChoiceField(choices=[ ('BOTH', 'Host and container'), ('CONTAINER', 'Only Container') - ], help_text='Check EMBA', widget=forms.CheckboxSelectMultiple, required=True) + ], help_text='Check EMBA', widget=forms.Select, required=True) diff --git a/embark/updater/progress.py b/embark/updater/progress.py new file mode 100644 index 000000000..22d26f87d --- /dev/null +++ b/embark/updater/progress.py @@ -0,0 +1,193 @@ +import asyncio +import os +import base64 +import logging +import json + +from pathlib import Path +from watchdog.observers import Observer +from watchdog.events import FileSystemEventHandler +from channels.generic.websocket import AsyncWebsocketConsumer + +logger = logging.getLogger(__name__) + + +class LogConsumer(AsyncWebsocketConsumer): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + self.analysis_id = None + self.line_cache = None + self.file_view = None + self.observer = None + + def load_file_content(self): + logger.info( + 'Getting file content for analysis id "%s"; view: %s', + self.analysis_id, + self.file_view, + ) + + num_lines = self.line_cache.num_lines() + limit = min(num_lines, self.file_view.limit) + + # Ensure you can't read negative lines + offset = max(self.file_view.offset, 0) + # Ensure you can't read lines bigger than the last line + offset = min(num_lines - limit, offset) + + # Fix the offset, in case the user tried to read invalid lines + self.file_view.offset = offset + + content = self.line_cache.read_lines(offset, offset + limit - 1) + self.file_view.content = base64.b64encode(content).decode("ascii") + self.file_view.num_lines = num_lines + + + async def connect(self): + logger.info("WS - connect") + await self.accept() + logger.info("WS - connect - accept") + + log_file_path_ = f"{Path(firmware.path_to_logs).parent}/emba_run.log" + + if not os.path.isfile(log_file_path_): + await self.send_message({"error": "The log file does not exist, yet."}) + await self.close() + + self.line_cache = LineCache(log_file_path_) + + self.file_view = FileView() + + this = self + + class ModifyEventHandler(FileSystemEventHandler): + def on_modified(self, _event): + asyncio.run(this.update_lines()) + + event_handler = ModifyEventHandler() + + self.observer = Observer() + self.observer.schedule(event_handler, log_file_path_) + self.observer.start() + + await self.update_lines() + + async def send_file_content(self) -> None: + self.load_file_content() + await self.send_message({"file_view": self.file_view.__dict__}) + + async def update_lines(self) -> None: + self.line_cache.refresh() + await self.send_file_content() + + async def receive(self, text_data: str = "", bytes_data=None) -> None: + logger.info("WS - receive") + try: + data = json.loads(text_data) + if data["action"] == "change_view": + logger.info("WS - action: change view") + logger.info(data["file_view"]) + self.file_view = FileView(**data["file_view"]) + await self.send_file_content() + else: + raise NotImplementedError("Unknown action") + except Exception as exception: + logger.error(exception) + await self.send_message({"error": "Unknown error"}) + + async def disconnect(self, code): + logger.info("WS - disconnected: %s", code) + if self.line_cache: + self.line_cache.close() + + if self.observer: + self.observer.stop() + + # send data to frontend + async def send_message(self, message: dict) -> None: + # logger.info(f"WS - send message: " + str(message)) + logger.info("WS - send message") + # Send message to WebSocket + await self.send(json.dumps(message, sort_keys=False)) + + +class FileView: + def __init__(self, offset=0, limit=30, content="", num_lines=0) -> None: + self.offset = offset + self.limit = limit + self.content = content + self.num_lines = num_lines + + +REFRESH_LINES = 10 # This will define how many of the last lines will be refreshed + + +class LineCache: + def __init__(self, filepath: str) -> None: + self.line_beginnings = [0] + self.line_endings = [0] + # Intentionally not using with to save resources + # because we don't have to open the file as often + # pylint: disable-next=consider-using-with + self.filehandle = open(filepath, "rb") + self.refresh() + + def refresh(self) -> None: + # Make sure to not go out of bounds + refresh_from_line = min(len(self.line_beginnings), REFRESH_LINES) + refresh_from_byte = self.line_beginnings[-refresh_from_line] + + # Remove the line beginnings and endings to be refreshed + self.line_beginnings = self.line_beginnings[:-refresh_from_line] + self.line_endings = self.line_endings[:-refresh_from_line] + + logger.debug( + "Start refreshing line cache from line %s (start counting from end of the file)", refresh_from_line + ) + logger.debug("Start refreshing line cache from byte %s", refresh_from_byte) + + self.filehandle.seek(refresh_from_byte) + + while True: + line_beginning = self.filehandle.tell() + line = self.filehandle.readline() + + line_ending = self.filehandle.tell() + + if len(line) > 0 and line[-1:] == b'\n': + line_ending = line_ending - 1 + + if len(line) > 1 and line[-2:] == b'\r\n': + line_ending = line_ending - 1 + + self.line_beginnings.append(line_beginning) + self.line_endings.append(line_ending) + + if len(line) == 0 or line[-1:] != b'\n': + break + + def num_lines(self) -> int: + return len(self.line_beginnings) + + def read_lines(self, first_line: int, last_line: int) -> bytes: + num_lines = self.num_lines() + + if first_line > last_line: + raise IndexError("The first line cannot be bigger than the last line") + + if first_line < 0: + raise IndexError("The first line cannot be below 0") + + if last_line >= num_lines: + raise IndexError("The first line cannot be equal or above the number of lines") + + first_byte = self.line_beginnings[num_lines - last_line - 1] + last_byte = self.line_endings[num_lines - first_line - 1] + self.filehandle.seek(first_byte) + output = self.filehandle.read(last_byte - first_byte) + + return output + + def close(self) -> None: + self.filehandle.close() diff --git a/embark/updater/urls.py b/embark/updater/urls.py index 4af414fa9..73573bd58 100644 --- a/embark/updater/urls.py +++ b/embark/updater/urls.py @@ -7,5 +7,6 @@ path('updater/', views.updater_home, name='embark-updater-home'), path('updater/update-emba', views.update_emba, name='embark-updater-update'), - path('updater/check-emba', views.check_update, name='embark-updater-check') + path('updater/check-emba', views.check_update, name='embark-updater-check'), + path('updater/progress', views.progress, name='embark-updater-progress') ] diff --git a/embark/updater/views.py b/embark/updater/views.py index a9459824a..f669432fe 100644 --- a/embark/updater/views.py +++ b/embark/updater/views.py @@ -44,11 +44,15 @@ def check_update(request): form = CheckForm(request.POST) if form.is_valid(): option = form.cleaned_data["option"] - logger.debug("Got option %d for emba dep check", option) + if option == 'BOTH': + check_option = '1' + elif option == 'CONTAINER': + check_option = '2' + logger.debug("Got option %d for emba dep check", check_option) # inject into bounded Executor - if BoundedExecutor.submit_emba_check(option=option): + if BoundedExecutor.submit_emba_check(option=check_option): messages.info(request, "Checking now") - return redirect('embark-updater-home') + return redirect('embark-updater-log') logger.error("Server Queue full, or other boundenexec error") messages.error(request, 'Queue full') return redirect('embark-updater-home') @@ -84,3 +88,13 @@ def update_emba(request): logger.error("update form invalid %s with error: %s", request.POST, form.errors) messages.error(request, 'update not successful') return redirect('embark-updater-home') + + +@csrf_protect +@require_http_methods(["GET"]) +@login_required(login_url='/' + settings.LOGIN_URL) +def progress(request): + """ + shows the dep check to the user + """ + return render(request, 'updater/progress.html', {}) diff --git a/embark/uploader/boundedexecutor.py b/embark/uploader/boundedexecutor.py index 06681ccbd..afde4bd88 100644 --- a/embark/uploader/boundedexecutor.py +++ b/embark/uploader/boundedexecutor.py @@ -359,7 +359,7 @@ def emba_check(cls, option): """ logger.debug("Checking EMBA with: %d", option) try: - cmd = f"{EMBA_SCRIPT_LOCATION} -d{str(option)}" + cmd = f"{EMBA_SCRIPT_LOCATION} -d{option}" with open(f"{settings.EMBA_LOG_ROOT}/check.log", "w+", encoding="utf-8") as file: proc = Popen(cmd, stdin=PIPE, stdout=file, stderr=file, shell=True) # nosec @@ -371,7 +371,16 @@ def emba_check(cls, option): logger.error("emba dep check error: %s", exce) # TODO take resulting log and show to user - + + room_group_name = f"versions" + channel_layer = get_channel_layer() + # send ws message + async_to_sync(channel_layer.group_send)( + room_group_name, { + "type": 'send.message', + "message": {} # TODO same as logviewer + } + ) @classmethod From 8edacb739099799a5889b3a8d11f836841d32607 Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Tue, 9 Jul 2024 14:15:19 +0000 Subject: [PATCH 06/18] make dep check viewable --- embark/emba_check.html | 358 +++++++++++++++++++++++++ embark/templates/updater/check.html | 4 +- embark/templates/updater/index.html | 23 +- embark/templates/updater/progress.html | 9 + embark/updater/progress.py | 193 ------------- embark/updater/urls.py | 4 +- embark/updater/views.py | 22 +- embark/uploader/boundedexecutor.py | 16 +- 8 files changed, 416 insertions(+), 213 deletions(-) create mode 100644 embark/emba_check.html delete mode 100644 embark/updater/progress.py diff --git a/embark/emba_check.html b/embark/emba_check.html new file mode 100644 index 000000000..5e5827b36 --- /dev/null +++ b/embark/emba_check.html @@ -0,0 +1,358 @@ + + + + + + + + +
    +==> Imported 13 helper files
    +
    +
    +==> Imported 86 module/s
    +
    +╔═══════════════════════════════════════════════════════════════╗
    +                            E M B A                            
    +║                   EMBEDDED FIRMWARE ANALYZER                  
    +╚═══════════════════════════════════════════════════════════════╝
    +
    +
    +
    +
    +EMBA version 1.4.1 - White rabbit
    +
    +.%%%%%%..%%...%%..%%%%%....%%%%...........%%..%%...%%%%....%%%%...........%%..%%...%%%%...%%..%%.................................                                                                                         
    +.%%......%%%.%%%..%%..%%..%%..%%..........%%..%%..%%..%%..%%...............%%%%...%%..%%..%%..%%.................................                                                                                         
    +.%%%%....%%.%.%%..%%%%%...%%%%%%..........%%%%%%..%%%%%%...%%%%.............%%....%%..%%..%%..%%.................................                                                                                         
    +.%%......%%...%%..%%..%%..%%..%%..........%%..%%..%%..%%......%%............%%....%%..%%..%%..%%............%%......%%......%%...                                                                                         
    +.%%%%%%..%%...%%..%%%%%...%%..%%..........%%..%%..%%..%%...%%%%.............%%.....%%%%....%%%%.............%%......%%......%%...                                                                                         
    +.................................................................................................................................                                                                                         
    +.%%%%%%...%%%%...%%......%%.......%%%%...%%...%%..........%%%%%%..%%..%%..%%%%%%..........%%...%%..%%..%%..%%%%%%..%%%%%%..%%%%%%..........%%%%%....%%%%...%%%%%...%%%%%...%%%%%%..%%%%%%.................................
    +.%%......%%..%%..%%......%%......%%..%%..%%...%%............%%....%%..%%..%%..............%%...%%..%%..%%....%%......%%....%%..............%%..%%..%%..%%..%%..%%..%%..%%....%%......%%...................................
    +.%%%%....%%..%%..%%......%%......%%..%%..%%.%.%%............%%....%%%%%%..%%%%............%%.%.%%..%%%%%%....%%......%%....%%%%............%%%%%...%%%%%%..%%%%%...%%%%%.....%%......%%...................................
    +.%%......%%..%%..%%......%%......%%..%%..%%%%%%%............%%....%%..%%..%%..............%%%%%%%..%%..%%....%%......%%....%%..............%%..%%..%%..%%..%%..%%..%%..%%....%%......%%..............%%......%%......%%...
    +.%%.......%%%%...%%%%%%..%%%%%%...%%%%....%%.%%.............%%....%%..%%..%%%%%%...........%%.%%...%%..%%..%%%%%%....%%....%%%%%%..........%%..%%..%%..%%..%%%%%...%%%%%...%%%%%%....%%..............%%......%%......%%...
    +..........................................................................................................................................................................................................................
    +.%%..%%..%%..%%...%%%%....%%%%...%%..%%..........%%..%%..%%..%%...%%%%....%%%%...%%..%%..................%%..%%..%%%%%%...%%%%..........                                                                                  
    +.%%.%%...%%%.%%..%%..%%..%%..%%..%%.%%...........%%.%%...%%%.%%..%%..%%..%%..%%..%%.%%...................%%%.%%..%%......%%..%%.........                                                                                  
    +.%%%%....%%.%%%..%%..%%..%%......%%%%............%%%%....%%.%%%..%%..%%..%%......%%%%......%%............%%.%%%..%%%%....%%..%%.........                                                                                  
    +.%%.%%...%%..%%..%%..%%..%%..%%..%%.%%...........%%.%%...%%..%%..%%..%%..%%..%%..%%.%%.....%%............%%..%%..%%......%%..%%....%%...                                                                                  
    +.%%..%%..%%..%%...%%%%....%%%%...%%..%%..........%%..%%..%%..%%...%%%%....%%%%...%%..%%.....%............%%..%%..%%%%%%...%%%%.....%%...                                                                                  
    +........................................................................................................................................                                                                                  
    +
    +The Matrix - 25th anniversary
    +
    +
    +[*] Tue Jul  9 13:55:03 UTC 2024 - Enable python virtual environment /home/benedikt/embark/emba/external/emba_venv
    +
    +
    +[+] Dependency check
    +=================================================================
    +
    +
    +[*] Network connection:
    +    Internet connection - not ok
    +[!] Warning: EMBA has NO internet connection!
    +[!] Warning: Update checks and multiple EMBA modules are disabled!
    +[!] Warning: GPT (Q02), kernel verification (S26) and further online modules are disabled!
    +    ChatGPT-API key not set - see https://github.com/e-m-b-a/emba/wiki/AI-supported-firmware-analysis for more information
    +
    +
    +[*] Elementary:
    +    user permission - ok
    +    Docker compose version - docker compose ok
    +    Docker-compose EMBA image version - ok
    +    configuration directory - ok
    +    Python virtual environment - ok
    +
    +
    +[*] Load kernel modules on host system:
    +    ufs kernel module - ok
    +    nandsim kernel module - ok
    +    ubi kernel module - ok
    +    nbd kernel module - ok
    +
    +
    +[*] Necessary utils on system:
    +    docker - ok
    +    docker-compose - ok
    +    inotifywait - ok
    +    notify-send - ok
    +
    +
    +[*] Tue Jul  9 13:55:04 UTC 2024 - EMBA sets up the docker environment.
    +
    +[*] Tue Jul  9 13:55:04 UTC 2024 - EMBA initializes docker container.
    +
    +time="2024-07-09T13:55:04Z" level=warning msg="/home/benedikt/embark/emba/docker-compose.yml: `version` is obsolete"
    +==> Imported 13 helper files
    +
    +
    +==> Imported 86 module/s
    +
    +╔═══════════════════════════════════════════════════════════════╗
    +                            E M B A                            
    +║                   EMBEDDED FIRMWARE ANALYZER                  
    +╚═══════════════════════════════════════════════════════════════╝
    +
    +
    +[*] Tue Jul  9 13:55:06 UTC 2024 - Enable python virtual environment /external/emba_venv
    +
    +
    +[+] Dependency check
    +=================================================================
    +
    +
    +[*] Network connection:
    +    Isolation - ok
    +
    +
    +[*] Elementary:
    +    user permission - ok
    +    host distribution - ok
    +    configuration directory - ok
    +    external directory - ok
    +    Python virtual environment - ok
    +
    +
    +[*] Necessary utils on system:
    +    awk - ok
    +    basename - ok
    +    bash - ok
    +    bash (version): 5 - ok
    +    cat - ok
    +    chmod - ok
    +    chown - ok
    +    cp - ok
    +    cut - ok
    +    date - ok
    +    dirname - ok
    +    dpkg-deb - ok
    +    echo - ok
    +    eval - ok
    +    find - ok
    +    grep - ok
    +    head - ok
    +    kill - ok
    +    ln - ok
    +    ls - ok
    +    md5sum - ok
    +    mkdir - ok
    +    mknod - ok
    +    modinfo - ok
    +    mv - ok
    +    netstat - ok
    +    openssl - ok
    +    printf - ok
    +    pwd - ok
    +    readelf - ok
    +    realpath - ok
    +    rm - ok
    +    rmdir - ok
    +    sed - ok
    +    seq - ok
    +    sleep - ok
    +    sort - ok
    +    strings - ok
    +    tee - ok
    +    touch - ok
    +    tr - ok
    +    uniq - ok
    +    unzip - ok
    +    wc - ok
    +
    +
    +[*] External utils:
    +    bc - ok
    +    tree - ok
    +    unzip - ok
    +    7z - ok
    +    jchroot - ok
    +    uboot mkimage - ok
    +    binwalk extractor - ok
    +    cpu_rec - ok
    +    unblob - ok
    +    unrar - ok
    +    john - ok
    +    pixd visualizer - ok
    +    PHP iniscan - ok
    +    pixd image renderer - ok
    +    progpilot php ini checker - ok
    +    luacheck - ok
    +    APKHunt apk scanner - ok
    +    rpm - ok
    +    patool - ok
    +    EnGenius decryptor - ok
    +    Android payload.bin extractor - ok
    +    Buffalo decryptor - ok
    +    ubireader image extractor - ok
    +    ubireader file extractor - ok
    +    UEFI Firmware parser - ok
    +    UEFI image extractor - ok
    +    UEFI AMI PFAT extractor - ok
    +    Binarly FwHunt analyzer - ok
    +    NVD CVE database - ok
    +    CVE Searchsploit - ok
    +    Routersploit EDB database - ok
    +    Routersploit CVE database - ok
    +    Metasploit CVE database - ok
    +    checksec script - ok
    +    sshdcc script - ok
    +    sudo-parser script - ok
    +    BMC decryptor - ok
    +    shellcheck script - ok
    +    fdtdump - ok
    +    linux-exploit-suggester.sh script - ok
    +    objdump disassembler - ok
    +    radare2 - ok
    +    bandit - python vulnerability scanner - ok
    +    qemu-[ARCH]-static - ok
    +    yara - ok
    +    ssdeep - ok
    +    cyclonedx - ok
    +    vmlinux-to-elf - ok
    +    STACS hash detection - ok
    +    Qemu system emulator ARM - ok
    +    Qemu system emulator ARM64 - ok
    +    Qemu system emulator MIPS - ok
    +    Qemu system emulator MIPSel - ok
    +    Qemu system emulator MIPS64 - ok
    +    Qemu system emulator MIPS64el - ok
    +    Qemu system emulator NIOS2 - ok
    +    Qemu system emulator x86 - ok
    +    console.* - ok
    +    gdb.* - ok
    +    gdbserver.* - ok
    +    netcat.* - ok
    +    strace.* - ok
    +    busybox.* - ok
    +    libnvram.* - ok
    +    libnvram_ioctl.* - ok
    +    Linux kernel v4.1.52 for MIPS architecture - ok
    +    Linux kernel v4.1.52 for ARM architecture - ok
    +    fixImage.sh - ok
    +    preInit.sh - ok
    +    inferFile.sh - ok
    +    inferService.sh - ok
    +    Routersploit installation - ok
    +    TestSSL.sh installation - ok
    +    Nikto web server analyzer - ok
    +    Cutycapt screenshot tool - ok
    +    snmp-check tool - ok
    +    Nmap portscanner - ok
    +    hping3 - ok
    +    ping - ok
    +    Metasploit framework - ok
    +    Running Qemu network service - ok
    +    Running Qemu telnet service - ok
    +    GHIDRA - ok
    +    CWE Checker - ok
    +
    +
    +time="2024-07-09T13:55:11Z" level=warning msg="/home/benedikt/embark/emba/docker-compose.yml: `version` is obsolete"
    +==> Imported 13 helper files
    +
    +
    +==> Imported 86 module/s
    +
    +╔═══════════════════════════════════════════════════════════════╗
    +                            E M B A                            
    +║                   EMBEDDED FIRMWARE ANALYZER                  
    +╚═══════════════════════════════════════════════════════════════╝
    +
    +
    +[*] Tue Jul  9 13:55:14 UTC 2024 - Enable python virtual environment /external/emba_venv
    +
    +
    +[+] Dependency check
    +=================================================================
    +
    +
    +[*] Network connection:
    +    ChatGPT-API key not set - see https://github.com/e-m-b-a/emba/wiki/AI-supported-firmware-analysis for more information
    +
    +
    +[*] Elementary:
    +    user permission - ok
    +    host distribution - ok
    +    configuration directory - ok
    +    external directory - ok
    +    Python virtual environment - ok
    +
    +
    +[*] Necessary utils on system:
    +    awk - ok
    +    basename - ok
    +    bash - ok
    +    bash (version): 5 - ok
    +    cat - ok
    +    chmod - ok
    +    chown - ok
    +    cp - ok
    +    cut - ok
    +    date - ok
    +    dirname - ok
    +    dpkg-deb - ok
    +    echo - ok
    +    eval - ok
    +    find - ok
    +    grep - ok
    +    head - ok
    +    kill - ok
    +    ln - ok
    +    ls - ok
    +    md5sum - ok
    +    mkdir - ok
    +    mknod - ok
    +    modinfo - ok
    +    mv - ok
    +    netstat - ok
    +    openssl - ok
    +    printf - ok
    +    pwd - ok
    +    readelf - ok
    +    realpath - ok
    +    rm - ok
    +    rmdir - ok
    +    sed - ok
    +    seq - ok
    +    sleep - ok
    +    sort - ok
    +    strings - ok
    +    tee - ok
    +    touch - ok
    +    tr - ok
    +    uniq - ok
    +    unzip - ok
    +    wc - ok
    +
    +
    +[*] External utils:
    +    bc - ok
    +    tree - ok
    +    unzip - ok
    +    7z - ok
    +
    +
    +[!] Tue Jul  9 13:55:15 UTC 2024 - Test ended on Tue Jul  9 13:55:15 UTC 2024 and took about 0 days and 00:00:14 
    +
    +
    +
    + + + diff --git a/embark/templates/updater/check.html b/embark/templates/updater/check.html index 39a64e3ac..5b3e2ddd1 100644 --- a/embark/templates/updater/check.html +++ b/embark/templates/updater/check.html @@ -1,6 +1,8 @@ {% load django_bootstrap5 %} +
    +
    {% csrf_token %}
    @@ -10,4 +12,4 @@
    -
    \ No newline at end of file +
    diff --git a/embark/templates/updater/index.html b/embark/templates/updater/index.html index 0ec3a00e8..4e1e8c30b 100644 --- a/embark/templates/updater/index.html +++ b/embark/templates/updater/index.html @@ -3,7 +3,10 @@ {% load django_bootstrap5 %} {% load tz %} -{% block style %}{% endblock style %} +{% block style %} + + +{% endblock style %} {% block title %}EMBArk updater dashboard{% endblock title %} {% block navigation %}{% include "navigation.html" %}{% endblock navigation %} @@ -26,16 +29,18 @@

    Current Version: {{ EMBARK_VERSION }}

    EMBA version {{ EMBA_VERSION }}

    -
    +
    + {% block progress %}{% include "updater/progress.html" %}{% endblock progress %} +
    +
    {% block check %}{% include "updater/check.html" %}{% endblock check %}
    -
    -
    -

    - -

    +
    +

    + +

    {% block update %}{% include "updater/update.html" %}{% endblock update %}
    diff --git a/embark/templates/updater/progress.html b/embark/templates/updater/progress.html index e69de29bb..988e73e2b 100644 --- a/embark/templates/updater/progress.html +++ b/embark/templates/updater/progress.html @@ -0,0 +1,9 @@ +{% load django_bootstrap5 %} +{% load static %} +
    +
    +
    + {{ log_content|safe }} +
    +
    +
    \ No newline at end of file diff --git a/embark/updater/progress.py b/embark/updater/progress.py deleted file mode 100644 index 22d26f87d..000000000 --- a/embark/updater/progress.py +++ /dev/null @@ -1,193 +0,0 @@ -import asyncio -import os -import base64 -import logging -import json - -from pathlib import Path -from watchdog.observers import Observer -from watchdog.events import FileSystemEventHandler -from channels.generic.websocket import AsyncWebsocketConsumer - -logger = logging.getLogger(__name__) - - -class LogConsumer(AsyncWebsocketConsumer): - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - - self.analysis_id = None - self.line_cache = None - self.file_view = None - self.observer = None - - def load_file_content(self): - logger.info( - 'Getting file content for analysis id "%s"; view: %s', - self.analysis_id, - self.file_view, - ) - - num_lines = self.line_cache.num_lines() - limit = min(num_lines, self.file_view.limit) - - # Ensure you can't read negative lines - offset = max(self.file_view.offset, 0) - # Ensure you can't read lines bigger than the last line - offset = min(num_lines - limit, offset) - - # Fix the offset, in case the user tried to read invalid lines - self.file_view.offset = offset - - content = self.line_cache.read_lines(offset, offset + limit - 1) - self.file_view.content = base64.b64encode(content).decode("ascii") - self.file_view.num_lines = num_lines - - - async def connect(self): - logger.info("WS - connect") - await self.accept() - logger.info("WS - connect - accept") - - log_file_path_ = f"{Path(firmware.path_to_logs).parent}/emba_run.log" - - if not os.path.isfile(log_file_path_): - await self.send_message({"error": "The log file does not exist, yet."}) - await self.close() - - self.line_cache = LineCache(log_file_path_) - - self.file_view = FileView() - - this = self - - class ModifyEventHandler(FileSystemEventHandler): - def on_modified(self, _event): - asyncio.run(this.update_lines()) - - event_handler = ModifyEventHandler() - - self.observer = Observer() - self.observer.schedule(event_handler, log_file_path_) - self.observer.start() - - await self.update_lines() - - async def send_file_content(self) -> None: - self.load_file_content() - await self.send_message({"file_view": self.file_view.__dict__}) - - async def update_lines(self) -> None: - self.line_cache.refresh() - await self.send_file_content() - - async def receive(self, text_data: str = "", bytes_data=None) -> None: - logger.info("WS - receive") - try: - data = json.loads(text_data) - if data["action"] == "change_view": - logger.info("WS - action: change view") - logger.info(data["file_view"]) - self.file_view = FileView(**data["file_view"]) - await self.send_file_content() - else: - raise NotImplementedError("Unknown action") - except Exception as exception: - logger.error(exception) - await self.send_message({"error": "Unknown error"}) - - async def disconnect(self, code): - logger.info("WS - disconnected: %s", code) - if self.line_cache: - self.line_cache.close() - - if self.observer: - self.observer.stop() - - # send data to frontend - async def send_message(self, message: dict) -> None: - # logger.info(f"WS - send message: " + str(message)) - logger.info("WS - send message") - # Send message to WebSocket - await self.send(json.dumps(message, sort_keys=False)) - - -class FileView: - def __init__(self, offset=0, limit=30, content="", num_lines=0) -> None: - self.offset = offset - self.limit = limit - self.content = content - self.num_lines = num_lines - - -REFRESH_LINES = 10 # This will define how many of the last lines will be refreshed - - -class LineCache: - def __init__(self, filepath: str) -> None: - self.line_beginnings = [0] - self.line_endings = [0] - # Intentionally not using with to save resources - # because we don't have to open the file as often - # pylint: disable-next=consider-using-with - self.filehandle = open(filepath, "rb") - self.refresh() - - def refresh(self) -> None: - # Make sure to not go out of bounds - refresh_from_line = min(len(self.line_beginnings), REFRESH_LINES) - refresh_from_byte = self.line_beginnings[-refresh_from_line] - - # Remove the line beginnings and endings to be refreshed - self.line_beginnings = self.line_beginnings[:-refresh_from_line] - self.line_endings = self.line_endings[:-refresh_from_line] - - logger.debug( - "Start refreshing line cache from line %s (start counting from end of the file)", refresh_from_line - ) - logger.debug("Start refreshing line cache from byte %s", refresh_from_byte) - - self.filehandle.seek(refresh_from_byte) - - while True: - line_beginning = self.filehandle.tell() - line = self.filehandle.readline() - - line_ending = self.filehandle.tell() - - if len(line) > 0 and line[-1:] == b'\n': - line_ending = line_ending - 1 - - if len(line) > 1 and line[-2:] == b'\r\n': - line_ending = line_ending - 1 - - self.line_beginnings.append(line_beginning) - self.line_endings.append(line_ending) - - if len(line) == 0 or line[-1:] != b'\n': - break - - def num_lines(self) -> int: - return len(self.line_beginnings) - - def read_lines(self, first_line: int, last_line: int) -> bytes: - num_lines = self.num_lines() - - if first_line > last_line: - raise IndexError("The first line cannot be bigger than the last line") - - if first_line < 0: - raise IndexError("The first line cannot be below 0") - - if last_line >= num_lines: - raise IndexError("The first line cannot be equal or above the number of lines") - - first_byte = self.line_beginnings[num_lines - last_line - 1] - last_byte = self.line_endings[num_lines - first_line - 1] - self.filehandle.seek(first_byte) - output = self.filehandle.read(last_byte - first_byte) - - return output - - def close(self) -> None: - self.filehandle.close() diff --git a/embark/updater/urls.py b/embark/updater/urls.py index 73573bd58..ada9c51fd 100644 --- a/embark/updater/urls.py +++ b/embark/updater/urls.py @@ -4,9 +4,9 @@ # view routing urlpatterns = [ - path('updater/', views.updater_home, name='embark-updater-home'), path('updater/update-emba', views.update_emba, name='embark-updater-update'), path('updater/check-emba', views.check_update, name='embark-updater-check'), - path('updater/progress', views.progress, name='embark-updater-progress') + path('updater/progress', views.progress, name='embark-updater-progress'), + path('updater/raw-progress', views.raw_progress, name='embark-updater-raw') ] diff --git a/embark/updater/views.py b/embark/updater/views.py index f669432fe..20fd69ee8 100644 --- a/embark/updater/views.py +++ b/embark/updater/views.py @@ -1,5 +1,7 @@ +import base64 import logging import os +import re from django.conf import settings from django.shortcuts import render @@ -25,7 +27,11 @@ def updater_home(request): req_logger.info("User %s called updater_home", request.user.username) emba_update_form = EmbaUpdateForm() emba_check_form = CheckForm() - return render(request, 'updater/index.html', {'emba_update_form': emba_update_form, 'emba_check_form': emba_check_form}) + # get into the progress.html f"{settings.EMBA_LOG_ROOT}/emba_check.html" + with open(f"{settings.EMBA_LOG_ROOT}/emba_check.html", 'r') as in_file_: + text = in_file_.read() + #text = re.search(r'\n.*?<\\html>', in_file_.read(), re.DOTALL).group() + return render(request, 'updater/index.html', {'emba_update_form': emba_update_form, 'emba_check_form': emba_check_form, 'log_content': text}) @csrf_protect @@ -33,7 +39,7 @@ def updater_home(request): @login_required(login_url='/' + settings.LOGIN_URL) def check_update(request): """ - checks if components are updateable via wss + checks if components are updateable :params request: HTTP request @@ -52,7 +58,7 @@ def check_update(request): # inject into bounded Executor if BoundedExecutor.submit_emba_check(option=check_option): messages.info(request, "Checking now") - return redirect('embark-updater-log') + return redirect('embark-updater-home') logger.error("Server Queue full, or other boundenexec error") messages.error(request, 'Queue full') return redirect('embark-updater-home') @@ -98,3 +104,13 @@ def progress(request): shows the dep check to the user """ return render(request, 'updater/progress.html', {}) + +@csrf_protect +@require_http_methods(["GET"]) +@login_required(login_url='/' + settings.LOGIN_URL) +def raw_progress(request): + """ + shows the dep check to the user as raw file + """ + # TODO + return render(request, 'updater/progress.html', {}) diff --git a/embark/uploader/boundedexecutor.py b/embark/uploader/boundedexecutor.py index 95b0ec418..bb642e0f9 100644 --- a/embark/uploader/boundedexecutor.py +++ b/embark/uploader/boundedexecutor.py @@ -29,6 +29,7 @@ from porter.models import LogZipFile from porter.importer import result_read_in +from ansi2html import Ansi2HTMLConverter logger = logging.getLogger(__name__) @@ -367,16 +368,21 @@ def emba_check(cls, option): try: cmd = f"{EMBA_SCRIPT_LOCATION} -d{option}" - with open(f"{settings.EMBA_LOG_ROOT}/check.log", "w+", encoding="utf-8") as file: + with open(f"{settings.EMBA_LOG_ROOT}/emba_check.log", "w+", encoding="utf-8") as file: proc = Popen(cmd, stdin=PIPE, stdout=file, stderr=file, shell=True) # nosec # wait for completion proc.communicate() + return_code = proc.wait() # success logger.info("Check Successful: %s", cmd) - except BaseException as exce: + if return_code != 0: + raise BoundedException("EMBA has non zero exit-code") + with open(f"{settings.EMBA_LOG_ROOT}/emba_check.log", 'r') as in_file_, open(f"{settings.EMBA_LOG_ROOT}/emba_check.html", 'w+') as out_file_: + conv = Ansi2HTMLConverter() + file_content = conv.convert(in_file_.read()) + out_file_.write(file_content) + except (BaseException, BoundedException) as exce: logger.error("emba dep check error: %s", exce) - - # TODO take resulting log and show to user room_group_name = f"versions" channel_layer = get_channel_layer() @@ -384,7 +390,7 @@ def emba_check(cls, option): async_to_sync(channel_layer.group_send)( room_group_name, { "type": 'send.message', - "message": {} # TODO same as logviewer + "message": {f"EMBA dep check {option}": return_code} } ) From 5267d8a4d23b7c18234786f5805b4bf2ff20ad57 Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Tue, 9 Jul 2024 15:36:06 +0000 Subject: [PATCH 07/18] update log html gen --- check.html | 101 +++++++++++++++++++++++++++++ embark/updater/views.py | 12 ++-- embark/uploader/boundedexecutor.py | 10 +-- installer.sh | 4 ++ 4 files changed, 115 insertions(+), 12 deletions(-) create mode 100644 check.html diff --git a/check.html b/check.html new file mode 100644 index 000000000..8ef2455f8 --- /dev/null +++ b/check.html @@ -0,0 +1,101 @@ + + + + + +Source file + + +
    ==> Imported 13 helper files
    +
    +
    +==> Imported 86 module/s
    +
    +╔═══════════════════════════════════════════════════════════════╗
    +                            E M B A                            
    +║                   EMBEDDED FIRMWARE ANALYZER                  
    +╚═══════════════════════════════════════════════════════════════╝
    +
    +
    +
    +
    +EMBA version 1.4.1 - White rabbit
    +
    +.%%%%%%..%%...%%..%%%%%....%%%%...........%%..%%...%%%%....%%%%...........%%..%%...%%%%...%%..%%.................................                                                                                         
    +.%%......%%%.%%%..%%..%%..%%..%%..........%%..%%..%%..%%..%%...............%%%%...%%..%%..%%..%%.................................                                                                                         
    +.%%%%....%%.%.%%..%%%%%...%%%%%%..........%%%%%%..%%%%%%...%%%%.............%%....%%..%%..%%..%%.................................                                                                                         
    +.%%......%%...%%..%%..%%..%%..%%..........%%..%%..%%..%%......%%............%%....%%..%%..%%..%%............%%......%%......%%...                                                                                         
    +.%%%%%%..%%...%%..%%%%%...%%..%%..........%%..%%..%%..%%...%%%%.............%%.....%%%%....%%%%.............%%......%%......%%...                                                                                         
    +.................................................................................................................................                                                                                         
    +.%%%%%%...%%%%...%%......%%.......%%%%...%%...%%..........%%%%%%..%%..%%..%%%%%%..........%%...%%..%%..%%..%%%%%%..%%%%%%..%%%%%%..........%%%%%....%%%%...%%%%%...%%%%%...%%%%%%..%%%%%%.................................
    +.%%......%%..%%..%%......%%......%%..%%..%%...%%............%%....%%..%%..%%..............%%...%%..%%..%%....%%......%%....%%..............%%..%%..%%..%%..%%..%%..%%..%%....%%......%%...................................
    +.%%%%....%%..%%..%%......%%......%%..%%..%%.%.%%............%%....%%%%%%..%%%%............%%.%.%%..%%%%%%....%%......%%....%%%%............%%%%%...%%%%%%..%%%%%...%%%%%.....%%......%%...................................
    +.%%......%%..%%..%%......%%......%%..%%..%%%%%%%............%%....%%..%%..%%..............%%%%%%%..%%..%%....%%......%%....%%..............%%..%%..%%..%%..%%..%%..%%..%%....%%......%%..............%%......%%......%%...
    +.%%.......%%%%...%%%%%%..%%%%%%...%%%%....%%.%%.............%%....%%..%%..%%%%%%...........%%.%%...%%..%%..%%%%%%....%%....%%%%%%..........%%..%%..%%..%%..%%%%%...%%%%%...%%%%%%....%%..............%%......%%......%%...
    +..........................................................................................................................................................................................................................
    +.%%..%%..%%..%%...%%%%....%%%%...%%..%%..........%%..%%..%%..%%...%%%%....%%%%...%%..%%..................%%..%%..%%%%%%...%%%%..........                                                                                  
    +.%%.%%...%%%.%%..%%..%%..%%..%%..%%.%%...........%%.%%...%%%.%%..%%..%%..%%..%%..%%.%%...................%%%.%%..%%......%%..%%.........                                                                                  
    +.%%%%....%%.%%%..%%..%%..%%......%%%%............%%%%....%%.%%%..%%..%%..%%......%%%%......%%............%%.%%%..%%%%....%%..%%.........                                                                                  
    +.%%.%%...%%..%%..%%..%%..%%..%%..%%.%%...........%%.%%...%%..%%..%%..%%..%%..%%..%%.%%.....%%............%%..%%..%%......%%..%%....%%...                                                                                  
    +.%%..%%..%%..%%...%%%%....%%%%...%%..%%..........%%..%%..%%..%%...%%%%....%%%%...%%..%%.....%............%%..%%..%%%%%%...%%%%.....%%...                                                                                  
    +........................................................................................................................................                                                                                  
    +
    +The Matrix - 25th anniversary
    +
    +
    +[*] Tue Jul  9 15:22:20 UTC 2024 - Enable python virtual environment /home/cylox/embark/emba/external/emba_venv
    +
    +
    +[+] Dependency check
    +=================================================================
    +
    +
    +[*] Network connection:
    +    Internet connection - not ok
    +[!] Warning: EMBA has NO internet connection!
    +[!] Warning: Update checks and multiple EMBA modules are disabled!
    +[!] Warning: GPT (Q02), kernel verification (S26) and further online modules are disabled!
    +    ChatGPT-API key not set - see https://github.com/e-m-b-a/emba/wiki/AI-supported-firmware-analysis for more information
    +
    +
    +[*] Elementary:
    +    user permission - ok
    +    Docker compose version - docker compose ok
    +    Docker-compose EMBA image version - Updates available (docker base image v5" required)
    +    configuration directory - ok
    +    Python virtual environment - ok
    +
    +
    +[*] Load kernel modules on host system:
    +    ufs kernel module - ok
    +    nandsim kernel module - ok
    +    ubi kernel module - ok
    +    nbd kernel module - ok
    +
    +
    +[*] Necessary utils on system:
    +    docker - ok
    +    docker-compose - ok
    +    inotifywait - ok
    +    notify-send - ok
    +
    +Some dependencies are missing - please check your installation
    +
    +To install all needed dependencies, run 'sudo ./installer.sh'.
    +Learn more about the installation on the EMBA wiki: https://github.com/e-m-b-a/emba/wiki/installation
    +
    +
    + + + diff --git a/embark/updater/views.py b/embark/updater/views.py index 20fd69ee8..fdae5fdb0 100644 --- a/embark/updater/views.py +++ b/embark/updater/views.py @@ -28,10 +28,14 @@ def updater_home(request): emba_update_form = EmbaUpdateForm() emba_check_form = CheckForm() # get into the progress.html f"{settings.EMBA_LOG_ROOT}/emba_check.html" - with open(f"{settings.EMBA_LOG_ROOT}/emba_check.html", 'r') as in_file_: - text = in_file_.read() - #text = re.search(r'\n.*?<\\html>', in_file_.read(), re.DOTALL).group() - return render(request, 'updater/index.html', {'emba_update_form': emba_update_form, 'emba_check_form': emba_check_form, 'log_content': text}) + try: + with open(f"{settings.EMBA_LOG_ROOT}/emba_check.html", 'r') as in_file_: + log_content = in_file_.read() + except FileNotFoundError: + logger.error('No dep check file exists yet') + messages.error(request, "There is no dependancy check log yet") + log_content = "EMPTY" + return render(request, 'updater/index.html', {'emba_update_form': emba_update_form, 'emba_check_form': emba_check_form, 'log_content': log_content}) @csrf_protect diff --git a/embark/uploader/boundedexecutor.py b/embark/uploader/boundedexecutor.py index bb642e0f9..81832189a 100644 --- a/embark/uploader/boundedexecutor.py +++ b/embark/uploader/boundedexecutor.py @@ -29,8 +29,6 @@ from porter.models import LogZipFile from porter.importer import result_read_in -from ansi2html import Ansi2HTMLConverter - logger = logging.getLogger(__name__) # maximum concurrent running workers @@ -366,9 +364,9 @@ def emba_check(cls, option): """ logger.debug("Checking EMBA with: %d", option) try: - cmd = f"{EMBA_SCRIPT_LOCATION} -d{option}" + cmd = f"{EMBA_SCRIPT_LOCATION} -d{option} | ansifilter -H -o {settings.EMBA_LOG_ROOT}/emba_check.html" - with open(f"{settings.EMBA_LOG_ROOT}/emba_check.log", "w+", encoding="utf-8") as file: + with open(f"{settings.EMBA_LOG_ROOT}/emba_check.log", "w+", encoding="utf-8") as file: # File should be empty proc = Popen(cmd, stdin=PIPE, stdout=file, stderr=file, shell=True) # nosec # wait for completion proc.communicate() @@ -377,10 +375,6 @@ def emba_check(cls, option): logger.info("Check Successful: %s", cmd) if return_code != 0: raise BoundedException("EMBA has non zero exit-code") - with open(f"{settings.EMBA_LOG_ROOT}/emba_check.log", 'r') as in_file_, open(f"{settings.EMBA_LOG_ROOT}/emba_check.html", 'w+') as out_file_: - conv = Ansi2HTMLConverter() - file_content = conv.convert(in_file_.read()) - out_file_.write(file_content) except (BaseException, BoundedException) as exce: logger.error("emba dep check error: %s", exce) diff --git a/installer.sh b/installer.sh index 8a7dbbafd..4bd39f6cd 100755 --- a/installer.sh +++ b/installer.sh @@ -281,6 +281,10 @@ install_debs(){ if ! dpkg -l python3-django &>/dev/null; then apt-get install -y python3-django fi + # ansifilter + if ! command -v ansifilter > /dev/null ; then + apt-get install -y ansifilter + fi } install_daemon(){ From 1f652fc6df9080a6ec6675066bdc0f933e30d454 Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Wed, 10 Jul 2024 08:26:16 +0000 Subject: [PATCH 08/18] make importing more dynamic --- embark/porter/views.py | 1 + embark/uploader/boundedexecutor.py | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/embark/porter/views.py b/embark/porter/views.py index e3c83ba2d..dc0435465 100644 --- a/embark/porter/views.py +++ b/embark/porter/views.py @@ -59,6 +59,7 @@ def import_read(request): zip_file_obj = form.cleaned_data['zip_log_file'] if zip_file_obj.user != request.user: logger.error("Permission denied - %s", request) + messages.error(request, "You don't have permission") return redirect('..') # create new analysis new_analysis = FirmwareAnalysis.objects.create(user=request.user) diff --git a/embark/uploader/boundedexecutor.py b/embark/uploader/boundedexecutor.py index 81832189a..ca8ae15e3 100644 --- a/embark/uploader/boundedexecutor.py +++ b/embark/uploader/boundedexecutor.py @@ -329,13 +329,22 @@ def unzip_log(cls, analysis_id, file_loc): # 1.check archive contents (security) zip_contents = zip_.namelist() if zip_check(zip_contents): - # 2.extract + # 2.extract blindly logger.debug("extracting....") zip_.extractall(path=Path(f"{settings.EMBA_LOG_ROOT}/{analysis_id}/")) logger.debug("finished unzipping....") else: - logger.error("Wont extract since there are inconsistencies with the zip file") - + logger.info("There are inconsistencies with the zip file, extracting.....") + zip_.extractall(path=Path(f"{settings.EMBA_LOG_ROOT}/{analysis_id}/tmp/")) + logger.debug("finished unzipping, now renaming") + # renaming and moving + # 1. find toplevel in tmp (takes first find) + for root_, dir_ in os.walk(Path(f"{settings.EMBA_LOG_ROOT}/{analysis_id}/tmp/")): + if os.path.dirname(dir_) == "html-report": + top_level = os.path.abspath(root_) + break + # 2. move dirs and file from there into emba_logs + shutil.move(top_level, f"{settings.EMBA_LOG_ROOT}/{analysis_id}/emba_logs") # 3. sanity check (conformity) # TODO check the files except builtins.Exception as exce: From 8d52a420402345c117fea3bd03d4c72cebf1ef31 Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Wed, 10 Jul 2024 10:32:57 +0000 Subject: [PATCH 09/18] change version --- VERSION.txt | 2 +- check.html | 101 ---------------------------------------------------- 2 files changed, 1 insertion(+), 102 deletions(-) delete mode 100644 check.html diff --git a/VERSION.txt b/VERSION.txt index 5c3f2bfd4..d34a4e8fa 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -0.1-748b8460 \ No newline at end of file +0.1-1f652fc6 \ No newline at end of file diff --git a/check.html b/check.html deleted file mode 100644 index 8ef2455f8..000000000 --- a/check.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - -Source file - - -
    ==> Imported 13 helper files
    -
    -
    -==> Imported 86 module/s
    -
    -╔═══════════════════════════════════════════════════════════════╗
    -                            E M B A                            
    -║                   EMBEDDED FIRMWARE ANALYZER                  
    -╚═══════════════════════════════════════════════════════════════╝
    -
    -
    -
    -
    -EMBA version 1.4.1 - White rabbit
    -
    -.%%%%%%..%%...%%..%%%%%....%%%%...........%%..%%...%%%%....%%%%...........%%..%%...%%%%...%%..%%.................................                                                                                         
    -.%%......%%%.%%%..%%..%%..%%..%%..........%%..%%..%%..%%..%%...............%%%%...%%..%%..%%..%%.................................                                                                                         
    -.%%%%....%%.%.%%..%%%%%...%%%%%%..........%%%%%%..%%%%%%...%%%%.............%%....%%..%%..%%..%%.................................                                                                                         
    -.%%......%%...%%..%%..%%..%%..%%..........%%..%%..%%..%%......%%............%%....%%..%%..%%..%%............%%......%%......%%...                                                                                         
    -.%%%%%%..%%...%%..%%%%%...%%..%%..........%%..%%..%%..%%...%%%%.............%%.....%%%%....%%%%.............%%......%%......%%...                                                                                         
    -.................................................................................................................................                                                                                         
    -.%%%%%%...%%%%...%%......%%.......%%%%...%%...%%..........%%%%%%..%%..%%..%%%%%%..........%%...%%..%%..%%..%%%%%%..%%%%%%..%%%%%%..........%%%%%....%%%%...%%%%%...%%%%%...%%%%%%..%%%%%%.................................
    -.%%......%%..%%..%%......%%......%%..%%..%%...%%............%%....%%..%%..%%..............%%...%%..%%..%%....%%......%%....%%..............%%..%%..%%..%%..%%..%%..%%..%%....%%......%%...................................
    -.%%%%....%%..%%..%%......%%......%%..%%..%%.%.%%............%%....%%%%%%..%%%%............%%.%.%%..%%%%%%....%%......%%....%%%%............%%%%%...%%%%%%..%%%%%...%%%%%.....%%......%%...................................
    -.%%......%%..%%..%%......%%......%%..%%..%%%%%%%............%%....%%..%%..%%..............%%%%%%%..%%..%%....%%......%%....%%..............%%..%%..%%..%%..%%..%%..%%..%%....%%......%%..............%%......%%......%%...
    -.%%.......%%%%...%%%%%%..%%%%%%...%%%%....%%.%%.............%%....%%..%%..%%%%%%...........%%.%%...%%..%%..%%%%%%....%%....%%%%%%..........%%..%%..%%..%%..%%%%%...%%%%%...%%%%%%....%%..............%%......%%......%%...
    -..........................................................................................................................................................................................................................
    -.%%..%%..%%..%%...%%%%....%%%%...%%..%%..........%%..%%..%%..%%...%%%%....%%%%...%%..%%..................%%..%%..%%%%%%...%%%%..........                                                                                  
    -.%%.%%...%%%.%%..%%..%%..%%..%%..%%.%%...........%%.%%...%%%.%%..%%..%%..%%..%%..%%.%%...................%%%.%%..%%......%%..%%.........                                                                                  
    -.%%%%....%%.%%%..%%..%%..%%......%%%%............%%%%....%%.%%%..%%..%%..%%......%%%%......%%............%%.%%%..%%%%....%%..%%.........                                                                                  
    -.%%.%%...%%..%%..%%..%%..%%..%%..%%.%%...........%%.%%...%%..%%..%%..%%..%%..%%..%%.%%.....%%............%%..%%..%%......%%..%%....%%...                                                                                  
    -.%%..%%..%%..%%...%%%%....%%%%...%%..%%..........%%..%%..%%..%%...%%%%....%%%%...%%..%%.....%............%%..%%..%%%%%%...%%%%.....%%...                                                                                  
    -........................................................................................................................................                                                                                  
    -
    -The Matrix - 25th anniversary
    -
    -
    -[*] Tue Jul  9 15:22:20 UTC 2024 - Enable python virtual environment /home/cylox/embark/emba/external/emba_venv
    -
    -
    -[+] Dependency check
    -=================================================================
    -
    -
    -[*] Network connection:
    -    Internet connection - not ok
    -[!] Warning: EMBA has NO internet connection!
    -[!] Warning: Update checks and multiple EMBA modules are disabled!
    -[!] Warning: GPT (Q02), kernel verification (S26) and further online modules are disabled!
    -    ChatGPT-API key not set - see https://github.com/e-m-b-a/emba/wiki/AI-supported-firmware-analysis for more information
    -
    -
    -[*] Elementary:
    -    user permission - ok
    -    Docker compose version - docker compose ok
    -    Docker-compose EMBA image version - Updates available (docker base image v5" required)
    -    configuration directory - ok
    -    Python virtual environment - ok
    -
    -
    -[*] Load kernel modules on host system:
    -    ufs kernel module - ok
    -    nandsim kernel module - ok
    -    ubi kernel module - ok
    -    nbd kernel module - ok
    -
    -
    -[*] Necessary utils on system:
    -    docker - ok
    -    docker-compose - ok
    -    inotifywait - ok
    -    notify-send - ok
    -
    -Some dependencies are missing - please check your installation
    -
    -To install all needed dependencies, run 'sudo ./installer.sh'.
    -Learn more about the installation on the EMBA wiki: https://github.com/e-m-b-a/emba/wiki/installation
    -
    -
    - - - From 463fd9892666449db49f4f237cca3127724acf12 Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Wed, 10 Jul 2024 10:33:56 +0000 Subject: [PATCH 10/18] rm check html --- embark/emba_check.html | 358 ----------------------------------------- 1 file changed, 358 deletions(-) delete mode 100644 embark/emba_check.html diff --git a/embark/emba_check.html b/embark/emba_check.html deleted file mode 100644 index 5e5827b36..000000000 --- a/embark/emba_check.html +++ /dev/null @@ -1,358 +0,0 @@ - - - - - - - - -
    -==> Imported 13 helper files
    -
    -
    -==> Imported 86 module/s
    -
    -╔═══════════════════════════════════════════════════════════════╗
    -                            E M B A                            
    -║                   EMBEDDED FIRMWARE ANALYZER                  
    -╚═══════════════════════════════════════════════════════════════╝
    -
    -
    -
    -
    -EMBA version 1.4.1 - White rabbit
    -
    -.%%%%%%..%%...%%..%%%%%....%%%%...........%%..%%...%%%%....%%%%...........%%..%%...%%%%...%%..%%.................................                                                                                         
    -.%%......%%%.%%%..%%..%%..%%..%%..........%%..%%..%%..%%..%%...............%%%%...%%..%%..%%..%%.................................                                                                                         
    -.%%%%....%%.%.%%..%%%%%...%%%%%%..........%%%%%%..%%%%%%...%%%%.............%%....%%..%%..%%..%%.................................                                                                                         
    -.%%......%%...%%..%%..%%..%%..%%..........%%..%%..%%..%%......%%............%%....%%..%%..%%..%%............%%......%%......%%...                                                                                         
    -.%%%%%%..%%...%%..%%%%%...%%..%%..........%%..%%..%%..%%...%%%%.............%%.....%%%%....%%%%.............%%......%%......%%...                                                                                         
    -.................................................................................................................................                                                                                         
    -.%%%%%%...%%%%...%%......%%.......%%%%...%%...%%..........%%%%%%..%%..%%..%%%%%%..........%%...%%..%%..%%..%%%%%%..%%%%%%..%%%%%%..........%%%%%....%%%%...%%%%%...%%%%%...%%%%%%..%%%%%%.................................
    -.%%......%%..%%..%%......%%......%%..%%..%%...%%............%%....%%..%%..%%..............%%...%%..%%..%%....%%......%%....%%..............%%..%%..%%..%%..%%..%%..%%..%%....%%......%%...................................
    -.%%%%....%%..%%..%%......%%......%%..%%..%%.%.%%............%%....%%%%%%..%%%%............%%.%.%%..%%%%%%....%%......%%....%%%%............%%%%%...%%%%%%..%%%%%...%%%%%.....%%......%%...................................
    -.%%......%%..%%..%%......%%......%%..%%..%%%%%%%............%%....%%..%%..%%..............%%%%%%%..%%..%%....%%......%%....%%..............%%..%%..%%..%%..%%..%%..%%..%%....%%......%%..............%%......%%......%%...
    -.%%.......%%%%...%%%%%%..%%%%%%...%%%%....%%.%%.............%%....%%..%%..%%%%%%...........%%.%%...%%..%%..%%%%%%....%%....%%%%%%..........%%..%%..%%..%%..%%%%%...%%%%%...%%%%%%....%%..............%%......%%......%%...
    -..........................................................................................................................................................................................................................
    -.%%..%%..%%..%%...%%%%....%%%%...%%..%%..........%%..%%..%%..%%...%%%%....%%%%...%%..%%..................%%..%%..%%%%%%...%%%%..........                                                                                  
    -.%%.%%...%%%.%%..%%..%%..%%..%%..%%.%%...........%%.%%...%%%.%%..%%..%%..%%..%%..%%.%%...................%%%.%%..%%......%%..%%.........                                                                                  
    -.%%%%....%%.%%%..%%..%%..%%......%%%%............%%%%....%%.%%%..%%..%%..%%......%%%%......%%............%%.%%%..%%%%....%%..%%.........                                                                                  
    -.%%.%%...%%..%%..%%..%%..%%..%%..%%.%%...........%%.%%...%%..%%..%%..%%..%%..%%..%%.%%.....%%............%%..%%..%%......%%..%%....%%...                                                                                  
    -.%%..%%..%%..%%...%%%%....%%%%...%%..%%..........%%..%%..%%..%%...%%%%....%%%%...%%..%%.....%............%%..%%..%%%%%%...%%%%.....%%...                                                                                  
    -........................................................................................................................................                                                                                  
    -
    -The Matrix - 25th anniversary
    -
    -
    -[*] Tue Jul  9 13:55:03 UTC 2024 - Enable python virtual environment /home/benedikt/embark/emba/external/emba_venv
    -
    -
    -[+] Dependency check
    -=================================================================
    -
    -
    -[*] Network connection:
    -    Internet connection - not ok
    -[!] Warning: EMBA has NO internet connection!
    -[!] Warning: Update checks and multiple EMBA modules are disabled!
    -[!] Warning: GPT (Q02), kernel verification (S26) and further online modules are disabled!
    -    ChatGPT-API key not set - see https://github.com/e-m-b-a/emba/wiki/AI-supported-firmware-analysis for more information
    -
    -
    -[*] Elementary:
    -    user permission - ok
    -    Docker compose version - docker compose ok
    -    Docker-compose EMBA image version - ok
    -    configuration directory - ok
    -    Python virtual environment - ok
    -
    -
    -[*] Load kernel modules on host system:
    -    ufs kernel module - ok
    -    nandsim kernel module - ok
    -    ubi kernel module - ok
    -    nbd kernel module - ok
    -
    -
    -[*] Necessary utils on system:
    -    docker - ok
    -    docker-compose - ok
    -    inotifywait - ok
    -    notify-send - ok
    -
    -
    -[*] Tue Jul  9 13:55:04 UTC 2024 - EMBA sets up the docker environment.
    -
    -[*] Tue Jul  9 13:55:04 UTC 2024 - EMBA initializes docker container.
    -
    -time="2024-07-09T13:55:04Z" level=warning msg="/home/benedikt/embark/emba/docker-compose.yml: `version` is obsolete"
    -==> Imported 13 helper files
    -
    -
    -==> Imported 86 module/s
    -
    -╔═══════════════════════════════════════════════════════════════╗
    -                            E M B A                            
    -║                   EMBEDDED FIRMWARE ANALYZER                  
    -╚═══════════════════════════════════════════════════════════════╝
    -
    -
    -[*] Tue Jul  9 13:55:06 UTC 2024 - Enable python virtual environment /external/emba_venv
    -
    -
    -[+] Dependency check
    -=================================================================
    -
    -
    -[*] Network connection:
    -    Isolation - ok
    -
    -
    -[*] Elementary:
    -    user permission - ok
    -    host distribution - ok
    -    configuration directory - ok
    -    external directory - ok
    -    Python virtual environment - ok
    -
    -
    -[*] Necessary utils on system:
    -    awk - ok
    -    basename - ok
    -    bash - ok
    -    bash (version): 5 - ok
    -    cat - ok
    -    chmod - ok
    -    chown - ok
    -    cp - ok
    -    cut - ok
    -    date - ok
    -    dirname - ok
    -    dpkg-deb - ok
    -    echo - ok
    -    eval - ok
    -    find - ok
    -    grep - ok
    -    head - ok
    -    kill - ok
    -    ln - ok
    -    ls - ok
    -    md5sum - ok
    -    mkdir - ok
    -    mknod - ok
    -    modinfo - ok
    -    mv - ok
    -    netstat - ok
    -    openssl - ok
    -    printf - ok
    -    pwd - ok
    -    readelf - ok
    -    realpath - ok
    -    rm - ok
    -    rmdir - ok
    -    sed - ok
    -    seq - ok
    -    sleep - ok
    -    sort - ok
    -    strings - ok
    -    tee - ok
    -    touch - ok
    -    tr - ok
    -    uniq - ok
    -    unzip - ok
    -    wc - ok
    -
    -
    -[*] External utils:
    -    bc - ok
    -    tree - ok
    -    unzip - ok
    -    7z - ok
    -    jchroot - ok
    -    uboot mkimage - ok
    -    binwalk extractor - ok
    -    cpu_rec - ok
    -    unblob - ok
    -    unrar - ok
    -    john - ok
    -    pixd visualizer - ok
    -    PHP iniscan - ok
    -    pixd image renderer - ok
    -    progpilot php ini checker - ok
    -    luacheck - ok
    -    APKHunt apk scanner - ok
    -    rpm - ok
    -    patool - ok
    -    EnGenius decryptor - ok
    -    Android payload.bin extractor - ok
    -    Buffalo decryptor - ok
    -    ubireader image extractor - ok
    -    ubireader file extractor - ok
    -    UEFI Firmware parser - ok
    -    UEFI image extractor - ok
    -    UEFI AMI PFAT extractor - ok
    -    Binarly FwHunt analyzer - ok
    -    NVD CVE database - ok
    -    CVE Searchsploit - ok
    -    Routersploit EDB database - ok
    -    Routersploit CVE database - ok
    -    Metasploit CVE database - ok
    -    checksec script - ok
    -    sshdcc script - ok
    -    sudo-parser script - ok
    -    BMC decryptor - ok
    -    shellcheck script - ok
    -    fdtdump - ok
    -    linux-exploit-suggester.sh script - ok
    -    objdump disassembler - ok
    -    radare2 - ok
    -    bandit - python vulnerability scanner - ok
    -    qemu-[ARCH]-static - ok
    -    yara - ok
    -    ssdeep - ok
    -    cyclonedx - ok
    -    vmlinux-to-elf - ok
    -    STACS hash detection - ok
    -    Qemu system emulator ARM - ok
    -    Qemu system emulator ARM64 - ok
    -    Qemu system emulator MIPS - ok
    -    Qemu system emulator MIPSel - ok
    -    Qemu system emulator MIPS64 - ok
    -    Qemu system emulator MIPS64el - ok
    -    Qemu system emulator NIOS2 - ok
    -    Qemu system emulator x86 - ok
    -    console.* - ok
    -    gdb.* - ok
    -    gdbserver.* - ok
    -    netcat.* - ok
    -    strace.* - ok
    -    busybox.* - ok
    -    libnvram.* - ok
    -    libnvram_ioctl.* - ok
    -    Linux kernel v4.1.52 for MIPS architecture - ok
    -    Linux kernel v4.1.52 for ARM architecture - ok
    -    fixImage.sh - ok
    -    preInit.sh - ok
    -    inferFile.sh - ok
    -    inferService.sh - ok
    -    Routersploit installation - ok
    -    TestSSL.sh installation - ok
    -    Nikto web server analyzer - ok
    -    Cutycapt screenshot tool - ok
    -    snmp-check tool - ok
    -    Nmap portscanner - ok
    -    hping3 - ok
    -    ping - ok
    -    Metasploit framework - ok
    -    Running Qemu network service - ok
    -    Running Qemu telnet service - ok
    -    GHIDRA - ok
    -    CWE Checker - ok
    -
    -
    -time="2024-07-09T13:55:11Z" level=warning msg="/home/benedikt/embark/emba/docker-compose.yml: `version` is obsolete"
    -==> Imported 13 helper files
    -
    -
    -==> Imported 86 module/s
    -
    -╔═══════════════════════════════════════════════════════════════╗
    -                            E M B A                            
    -║                   EMBEDDED FIRMWARE ANALYZER                  
    -╚═══════════════════════════════════════════════════════════════╝
    -
    -
    -[*] Tue Jul  9 13:55:14 UTC 2024 - Enable python virtual environment /external/emba_venv
    -
    -
    -[+] Dependency check
    -=================================================================
    -
    -
    -[*] Network connection:
    -    ChatGPT-API key not set - see https://github.com/e-m-b-a/emba/wiki/AI-supported-firmware-analysis for more information
    -
    -
    -[*] Elementary:
    -    user permission - ok
    -    host distribution - ok
    -    configuration directory - ok
    -    external directory - ok
    -    Python virtual environment - ok
    -
    -
    -[*] Necessary utils on system:
    -    awk - ok
    -    basename - ok
    -    bash - ok
    -    bash (version): 5 - ok
    -    cat - ok
    -    chmod - ok
    -    chown - ok
    -    cp - ok
    -    cut - ok
    -    date - ok
    -    dirname - ok
    -    dpkg-deb - ok
    -    echo - ok
    -    eval - ok
    -    find - ok
    -    grep - ok
    -    head - ok
    -    kill - ok
    -    ln - ok
    -    ls - ok
    -    md5sum - ok
    -    mkdir - ok
    -    mknod - ok
    -    modinfo - ok
    -    mv - ok
    -    netstat - ok
    -    openssl - ok
    -    printf - ok
    -    pwd - ok
    -    readelf - ok
    -    realpath - ok
    -    rm - ok
    -    rmdir - ok
    -    sed - ok
    -    seq - ok
    -    sleep - ok
    -    sort - ok
    -    strings - ok
    -    tee - ok
    -    touch - ok
    -    tr - ok
    -    uniq - ok
    -    unzip - ok
    -    wc - ok
    -
    -
    -[*] External utils:
    -    bc - ok
    -    tree - ok
    -    unzip - ok
    -    7z - ok
    -
    -
    -[!] Tue Jul  9 13:55:15 UTC 2024 - Test ended on Tue Jul  9 13:55:15 UTC 2024 and took about 0 days and 00:00:14 
    -
    -
    -
    - - - From 734a8eea2909fead84b375c8176741b3219563b2 Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Wed, 10 Jul 2024 12:10:34 +0000 Subject: [PATCH 11/18] pipenv update --- Pipfile.lock | 607 +++++++++++++++++++++++++++------------------------ installer.sh | 4 +- 2 files changed, 321 insertions(+), 290 deletions(-) diff --git a/Pipfile.lock b/Pipfile.lock index ca92568b5..356bb6a39 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -26,18 +26,18 @@ }, "asgiref": { "hashes": [ - "sha256:89b2ef2247e3b562a16eef663bc0e2e703ec6468e2fa8a5cd61cd449786d4f6e", - "sha256:9e0ce3aa93a819ba5b45120216b23878cf6e8525eb3848653452b4192b92afed" + "sha256:3e1e3ecc849832fe52ccf2cb6686b7a55f82bb1d6aee72a58826471390335e47", + "sha256:c343bd80a0bec947a9860adb4c432ffa7db769836c64238fc34bdc3fec84d590" ], - "markers": "python_version >= '3.7'", - "version": "==3.7.2" + "markers": "python_version >= '3.8'", + "version": "==3.8.1" }, "async-timeout": { "hashes": [ "sha256:4640d96be84d82d02ed59ea2b7105a0f7b33abe8703703cd0ab0bf87c427522f", "sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028" ], - "markers": "python_full_version <= '3.11.2'", + "markers": "python_full_version < '3.11.3'", "version": "==4.0.3" }, "attrs": { @@ -64,11 +64,11 @@ }, "certifi": { "hashes": [ - "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f", - "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1" + "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b", + "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90" ], "markers": "python_version >= '3.6'", - "version": "==2024.2.2" + "version": "==2024.7.4" }, "cffi": { "hashes": [ @@ -130,11 +130,12 @@ }, "channels": { "hashes": [ - "sha256:0ce53507a7da7b148eaa454526e0e05f7da5e5d1c23440e4886cf146981d8420", - "sha256:2253334ac76f67cba68c2072273f7e0e67dbdac77eeb7e318f511d2f9a53c5e4" + "sha256:a3c4419307f582c3f71d67bfb6eff748ae819c2f360b9b141694d84f242baa48", + "sha256:e0ed375719f5c1851861f05ed4ce78b0166f9245ca0ecd836cb77d4bb531489d" ], "index": "pypi", - "version": "==4.0.0" + "markers": "python_version >= '3.8'", + "version": "==4.1.0" }, "channels-redis": { "hashes": [ @@ -142,6 +143,7 @@ "sha256:2c5b944a39bd984b72aa8005a3ae11637bf29b5092adeb91c9aad4ab819a8ac4" ], "index": "pypi", + "markers": "python_version >= '3.8'", "version": "==4.2.0" }, "charset-normalizer": { @@ -250,57 +252,59 @@ }, "cryptography": { "hashes": [ - "sha256:01911714117642a3f1792c7f376db572aadadbafcd8d75bb527166009c9f1d1b", - "sha256:0e89f7b84f421c56e7ff69f11c441ebda73b8a8e6488d322ef71746224c20fce", - "sha256:12d341bd42cdb7d4937b0cabbdf2a94f949413ac4504904d0cdbdce4a22cbf88", - "sha256:15a1fb843c48b4a604663fa30af60818cd28f895572386e5f9b8a665874c26e7", - "sha256:1cdcdbd117681c88d717437ada72bdd5be9de117f96e3f4d50dab3f59fd9ab20", - "sha256:1df6fcbf60560d2113b5ed90f072dc0b108d64750d4cbd46a21ec882c7aefce9", - "sha256:3c6048f217533d89f2f8f4f0fe3044bf0b2090453b7b73d0b77db47b80af8dff", - "sha256:3e970a2119507d0b104f0a8e281521ad28fc26f2820687b3436b8c9a5fcf20d1", - "sha256:44a64043f743485925d3bcac548d05df0f9bb445c5fcca6681889c7c3ab12764", - "sha256:4e36685cb634af55e0677d435d425043967ac2f3790ec652b2b88ad03b85c27b", - "sha256:5f8907fcf57392cd917892ae83708761c6ff3c37a8e835d7246ff0ad251d9298", - "sha256:69b22ab6506a3fe483d67d1ed878e1602bdd5912a134e6202c1ec672233241c1", - "sha256:6bfadd884e7280df24d26f2186e4e07556a05d37393b0f220a840b083dc6a824", - "sha256:6d0fbe73728c44ca3a241eff9aefe6496ab2656d6e7a4ea2459865f2e8613257", - "sha256:6ffb03d419edcab93b4b19c22ee80c007fb2d708429cecebf1dd3258956a563a", - "sha256:810bcf151caefc03e51a3d61e53335cd5c7316c0a105cc695f0959f2c638b129", - "sha256:831a4b37accef30cccd34fcb916a5d7b5be3cbbe27268a02832c3e450aea39cb", - "sha256:887623fe0d70f48ab3f5e4dbf234986b1329a64c066d719432d0698522749929", - "sha256:a0298bdc6e98ca21382afe914c642620370ce0470a01e1bef6dd9b5354c36854", - "sha256:a1327f280c824ff7885bdeef8578f74690e9079267c1c8bd7dc5cc5aa065ae52", - "sha256:c1f25b252d2c87088abc8bbc4f1ecbf7c919e05508a7e8628e6875c40bc70923", - "sha256:c3a5cbc620e1e17009f30dd34cb0d85c987afd21c41a74352d1719be33380885", - "sha256:ce8613beaffc7c14f091497346ef117c1798c202b01153a8cc7b8e2ebaaf41c0", - "sha256:d2a27aca5597c8a71abbe10209184e1a8e91c1fd470b5070a2ea60cafec35bcd", - "sha256:dad9c385ba8ee025bb0d856714f71d7840020fe176ae0229de618f14dae7a6e2", - "sha256:db4b65b02f59035037fde0998974d84244a64c3265bdef32a827ab9b63d61b18", - "sha256:e09469a2cec88fb7b078e16d4adec594414397e8879a4341c6ace96013463d5b", - "sha256:e53dc41cda40b248ebc40b83b31516487f7db95ab8ceac1f042626bc43a2f992", - "sha256:f1e85a178384bf19e36779d91ff35c7617c885da487d689b05c1366f9933ad74", - "sha256:f47be41843200f7faec0683ad751e5ef11b9a56a220d57f300376cd8aba81660", - "sha256:fb0cef872d8193e487fc6bdb08559c3aa41b659a7d9be48b2e10747f47863925", - "sha256:ffc73996c4fca3d2b6c1c8c12bfd3ad00def8621da24f547626bf06441400449" + "sha256:013629ae70b40af70c9a7a5db40abe5d9054e6f4380e50ce769947b73bf3caad", + "sha256:2346b911eb349ab547076f47f2e035fc8ff2c02380a7cbbf8d87114fa0f1c583", + "sha256:2f66d9cd9147ee495a8374a45ca445819f8929a3efcd2e3df6428e46c3cbb10b", + "sha256:2f88d197e66c65be5e42cd72e5c18afbfae3f741742070e3019ac8f4ac57262c", + "sha256:31f721658a29331f895a5a54e7e82075554ccfb8b163a18719d342f5ffe5ecb1", + "sha256:343728aac38decfdeecf55ecab3264b015be68fc2816ca800db649607aeee648", + "sha256:5226d5d21ab681f432a9c1cf8b658c0cb02533eece706b155e5fbd8a0cdd3949", + "sha256:57080dee41209e556a9a4ce60d229244f7a66ef52750f813bfbe18959770cfba", + "sha256:5a94eccb2a81a309806027e1670a358b99b8fe8bfe9f8d329f27d72c094dde8c", + "sha256:6b7c4f03ce01afd3b76cf69a5455caa9cfa3de8c8f493e0d3ab7d20611c8dae9", + "sha256:7016f837e15b0a1c119d27ecd89b3515f01f90a8615ed5e9427e30d9cdbfed3d", + "sha256:81884c4d096c272f00aeb1f11cf62ccd39763581645b0812e99a91505fa48e0c", + "sha256:81d8a521705787afe7a18d5bfb47ea9d9cc068206270aad0b96a725022e18d2e", + "sha256:8d09d05439ce7baa8e9e95b07ec5b6c886f548deb7e0f69ef25f64b3bce842f2", + "sha256:961e61cefdcb06e0c6d7e3a1b22ebe8b996eb2bf50614e89384be54c48c6b63d", + "sha256:9c0c1716c8447ee7dbf08d6db2e5c41c688544c61074b54fc4564196f55c25a7", + "sha256:a0608251135d0e03111152e41f0cc2392d1e74e35703960d4190b2e0f4ca9c70", + "sha256:a0c5b2b0585b6af82d7e385f55a8bc568abff8923af147ee3c07bd8b42cda8b2", + "sha256:ad803773e9df0b92e0a817d22fd8a3675493f690b96130a5e24f1b8fabbea9c7", + "sha256:b297f90c5723d04bcc8265fc2a0f86d4ea2e0f7ab4b6994459548d3a6b992a14", + "sha256:ba4f0a211697362e89ad822e667d8d340b4d8d55fae72cdd619389fb5912eefe", + "sha256:c4783183f7cb757b73b2ae9aed6599b96338eb957233c58ca8f49a49cc32fd5e", + "sha256:c9bb2ae11bfbab395bdd072985abde58ea9860ed84e59dbc0463a5d0159f5b71", + "sha256:cafb92b2bc622cd1aa6a1dce4b93307792633f4c5fe1f46c6b97cf67073ec961", + "sha256:d45b940883a03e19e944456a558b67a41160e367a719833c53de6911cabba2b7", + "sha256:dc0fdf6787f37b1c6b08e6dfc892d9d068b5bdb671198c72072828b80bd5fe4c", + "sha256:dea567d1b0e8bc5764b9443858b673b734100c2871dc93163f58c46a97a83d28", + "sha256:dec9b018df185f08483f294cae6ccac29e7a6e0678996587363dc352dc65c842", + "sha256:e3ec3672626e1b9e55afd0df6d774ff0e953452886e06e0f1eb7eb0c832e8902", + "sha256:e599b53fd95357d92304510fb7bda8523ed1f79ca98dce2f43c115950aa78801", + "sha256:fa76fbb7596cc5839320000cdd5d0955313696d9511debab7ee7278fc8b5c84a", + "sha256:fff12c88a672ab9c9c1cf7b0c80e3ad9e2ebd9d828d955c126be4fd3e5578c9e" ], "markers": "python_version >= '3.7'", - "version": "==42.0.4" + "version": "==42.0.8" }, "daphne": { "hashes": [ - "sha256:7228cd6a3ca5a9b11c9a1c1c0414dab1bfb4ddc55ff234b545db8d71f6c24938", - "sha256:882fab39d0b90c6b2709b38116c95f660b6cf236600115dd7c13161fb98b3448" + "sha256:618d1322bb4d875342b99dd2a10da2d9aae7ee3645f765965fdc1e658ea5290a", + "sha256:fcbcace38eb86624ae247c7ffdc8ac12f155d7d19eafac4247381896d6f33761" ], "index": "pypi", - "version": "==4.1.0" + "markers": "python_version >= '3.8'", + "version": "==4.1.2" }, "django": { "hashes": [ - "sha256:56ab63a105e8bb06ee67381d7b65fe6774f057e41a8bab06c8020c8882d8ecd4", - "sha256:b5bb1d11b2518a5f91372a282f24662f58f66749666b0a286ab057029f728080" + "sha256:bd4505cae0b9bd642313e8fb71810893df5dc2ffcacaa67a33af2d5cd61888f2", + "sha256:f216510ace3de5de01329463a315a629f33480e893a9024fc93d8c32c22913da" ], "index": "pypi", - "version": "==5.0.2" + "markers": "python_version >= '3.10'", + "version": "==5.0.7" }, "django-apscheduler": { "hashes": [ @@ -312,19 +316,20 @@ }, "django-bootstrap5": { "hashes": [ - "sha256:5181bf1e97afae6211e963f28f48d4a90c937a3b036b3f752f52260f0029f3bc", - "sha256:fbf9942a17e1f48b4142e78df9e85afb65e4066a20e38ec7c497d36ae5ef7256" + "sha256:6a5d83e9ff1952f7c07c54cebcb76c85f09787b8b57eeb4ec07554cd583acc64", + "sha256:a3cee2b3d45745210c5b898af2917f310f44df746269fe09a93be28a0adc2a4b" ], "index": "pypi", - "version": "==23.4" + "markers": "python_version >= '3.8'", + "version": "==24.2" }, "django-hashid-field": { "hashes": [ - "sha256:9e06fd3b90274cb37750b1e9538ceab23d8de87a9b600530026d295fb0e23569", - "sha256:d8981e4506bd6d75bf1f9cc77360770991d77b19a2ef920a878ac85092e84810" + "sha256:2d072f4caf37f02941a772003c1884f4ae9b31a142e5f23e9eec583b0e981bd9", + "sha256:6ebb1ed7323f2465525b395ed26186cfc66cdec948178ec471ad9b1301073dc7" ], "index": "pypi", - "version": "==3.4.0" + "version": "==3.4.1" }, "django-tables2": { "hashes": [ @@ -336,11 +341,12 @@ }, "djangorestframework": { "hashes": [ - "sha256:579a333e6256b09489cbe0a067e66abe55c6595d8926be6b99423786334350c8", - "sha256:eb63f58c9f218e1a7d064d17a70751f528ed4e1d35547fdade9aaf4cd103fd08" + "sha256:2b8871b062ba1aefc2de01f773875441a961fefbf79f5eed1e32b2f096944b20", + "sha256:36fe88cd2d6c6bec23dca9804bab2ba5517a8bb9d8f47ebc68981b56840107ad" ], "index": "pypi", - "version": "==3.14.0" + "markers": "python_version >= '3.8'", + "version": "==3.15.2" }, "hashids": { "hashes": [ @@ -359,11 +365,11 @@ }, "idna": { "hashes": [ - "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca", - "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f" + "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc", + "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0" ], "markers": "python_version >= '3.5'", - "version": "==3.6" + "version": "==3.7" }, "incremental": { "hashes": [ @@ -377,6 +383,7 @@ "sha256:8440ffe49c4ae81a8df57c1ae1eb4b6bfa7acb830099bfb3e305b383005cc128" ], "index": "pypi", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1'", "version": "==1.3.5" }, "mod-wsgi-httpd": { @@ -390,69 +397,71 @@ "sha256:0a9e65773d6a794cd468c8f5f2e4ef92f1009f27dd12833049448b243539d0d8" ], "index": "pypi", + "markers": "python_version >= '3.8'", "version": "==5.0.0" }, "msgpack": { "hashes": [ - "sha256:04ad6069c86e531682f9e1e71b71c1c3937d6014a7c3e9edd2aa81ad58842862", - "sha256:0bfdd914e55e0d2c9e1526de210f6fe8ffe9705f2b1dfcc4aecc92a4cb4b533d", - "sha256:1dc93e8e4653bdb5910aed79f11e165c85732067614f180f70534f056da97db3", - "sha256:1e2d69948e4132813b8d1131f29f9101bc2c915f26089a6d632001a5c1349672", - "sha256:235a31ec7db685f5c82233bddf9858748b89b8119bf4538d514536c485c15fe0", - "sha256:27dcd6f46a21c18fa5e5deed92a43d4554e3df8d8ca5a47bf0615d6a5f39dbc9", - "sha256:28efb066cde83c479dfe5a48141a53bc7e5f13f785b92ddde336c716663039ee", - "sha256:3476fae43db72bd11f29a5147ae2f3cb22e2f1a91d575ef130d2bf49afd21c46", - "sha256:36e17c4592231a7dbd2ed09027823ab295d2791b3b1efb2aee874b10548b7524", - "sha256:384d779f0d6f1b110eae74cb0659d9aa6ff35aaf547b3955abf2ab4c901c4819", - "sha256:38949d30b11ae5f95c3c91917ee7a6b239f5ec276f271f28638dec9156f82cfc", - "sha256:3967e4ad1aa9da62fd53e346ed17d7b2e922cba5ab93bdd46febcac39be636fc", - "sha256:3e7bf4442b310ff154b7bb9d81eb2c016b7d597e364f97d72b1acc3817a0fdc1", - "sha256:3f0c8c6dfa6605ab8ff0611995ee30d4f9fcff89966cf562733b4008a3d60d82", - "sha256:484ae3240666ad34cfa31eea7b8c6cd2f1fdaae21d73ce2974211df099a95d81", - "sha256:4a7b4f35de6a304b5533c238bee86b670b75b03d31b7797929caa7a624b5dda6", - "sha256:4cb14ce54d9b857be9591ac364cb08dc2d6a5c4318c1182cb1d02274029d590d", - "sha256:4e71bc4416de195d6e9b4ee93ad3f2f6b2ce11d042b4d7a7ee00bbe0358bd0c2", - "sha256:52700dc63a4676669b341ba33520f4d6e43d3ca58d422e22ba66d1736b0a6e4c", - "sha256:572efc93db7a4d27e404501975ca6d2d9775705c2d922390d878fcf768d92c87", - "sha256:576eb384292b139821c41995523654ad82d1916da6a60cff129c715a6223ea84", - "sha256:5b0bf0effb196ed76b7ad883848143427a73c355ae8e569fa538365064188b8e", - "sha256:5b6ccc0c85916998d788b295765ea0e9cb9aac7e4a8ed71d12e7d8ac31c23c95", - "sha256:5ed82f5a7af3697b1c4786053736f24a0efd0a1b8a130d4c7bfee4b9ded0f08f", - "sha256:6d4c80667de2e36970ebf74f42d1088cc9ee7ef5f4e8c35eee1b40eafd33ca5b", - "sha256:730076207cb816138cf1af7f7237b208340a2c5e749707457d70705715c93b93", - "sha256:7687e22a31e976a0e7fc99c2f4d11ca45eff652a81eb8c8085e9609298916dcf", - "sha256:822ea70dc4018c7e6223f13affd1c5c30c0f5c12ac1f96cd8e9949acddb48a61", - "sha256:84b0daf226913133f899ea9b30618722d45feffa67e4fe867b0b5ae83a34060c", - "sha256:85765fdf4b27eb5086f05ac0491090fc76f4f2b28e09d9350c31aac25a5aaff8", - "sha256:8dd178c4c80706546702c59529ffc005681bd6dc2ea234c450661b205445a34d", - "sha256:8f5b234f567cf76ee489502ceb7165c2a5cecec081db2b37e35332b537f8157c", - "sha256:98bbd754a422a0b123c66a4c341de0474cad4a5c10c164ceed6ea090f3563db4", - "sha256:993584fc821c58d5993521bfdcd31a4adf025c7d745bbd4d12ccfecf695af5ba", - "sha256:a40821a89dc373d6427e2b44b572efc36a2778d3f543299e2f24eb1a5de65415", - "sha256:b291f0ee7961a597cbbcc77709374087fa2a9afe7bdb6a40dbbd9b127e79afee", - "sha256:b573a43ef7c368ba4ea06050a957c2a7550f729c31f11dd616d2ac4aba99888d", - "sha256:b610ff0f24e9f11c9ae653c67ff8cc03c075131401b3e5ef4b82570d1728f8a9", - "sha256:bdf38ba2d393c7911ae989c3bbba510ebbcdf4ecbdbfec36272abe350c454075", - "sha256:bfef2bb6ef068827bbd021017a107194956918ab43ce4d6dc945ffa13efbc25f", - "sha256:cab3db8bab4b7e635c1c97270d7a4b2a90c070b33cbc00c99ef3f9be03d3e1f7", - "sha256:cb70766519500281815dfd7a87d3a178acf7ce95390544b8c90587d76b227681", - "sha256:cca1b62fe70d761a282496b96a5e51c44c213e410a964bdffe0928e611368329", - "sha256:ccf9a39706b604d884d2cb1e27fe973bc55f2890c52f38df742bc1d79ab9f5e1", - "sha256:dc43f1ec66eb8440567186ae2f8c447d91e0372d793dfe8c222aec857b81a8cf", - "sha256:dd632777ff3beaaf629f1ab4396caf7ba0bdd075d948a69460d13d44357aca4c", - "sha256:e45ae4927759289c30ccba8d9fdce62bb414977ba158286b5ddaf8df2cddb5c5", - "sha256:e50ebce52f41370707f1e21a59514e3375e3edd6e1832f5e5235237db933c98b", - "sha256:ebbbba226f0a108a7366bf4b59bf0f30a12fd5e75100c630267d94d7f0ad20e5", - "sha256:ec79ff6159dffcc30853b2ad612ed572af86c92b5168aa3fc01a67b0fa40665e", - "sha256:f0936e08e0003f66bfd97e74ee530427707297b0d0361247e9b4f59ab78ddc8b", - "sha256:f26a07a6e877c76a88e3cecac8531908d980d3d5067ff69213653649ec0f60ad", - "sha256:f64e376cd20d3f030190e8c32e1c64582eba56ac6dc7d5b0b49a9d44021b52fd", - "sha256:f6ffbc252eb0d229aeb2f9ad051200668fc3a9aaa8994e49f0cb2ffe2b7867e7", - "sha256:f9a7c509542db4eceed3dcf21ee5267ab565a83555c9b88a8109dcecc4709002", - "sha256:ff1d0899f104f3921d94579a5638847f783c9b04f2d5f229392ca77fba5b82fc" + "sha256:00e073efcba9ea99db5acef3959efa45b52bc67b61b00823d2a1a6944bf45982", + "sha256:0726c282d188e204281ebd8de31724b7d749adebc086873a59efb8cf7ae27df3", + "sha256:0ceea77719d45c839fd73abcb190b8390412a890df2f83fb8cf49b2a4b5c2f40", + "sha256:114be227f5213ef8b215c22dde19532f5da9652e56e8ce969bf0a26d7c419fee", + "sha256:13577ec9e247f8741c84d06b9ece5f654920d8365a4b636ce0e44f15e07ec693", + "sha256:1876b0b653a808fcd50123b953af170c535027bf1d053b59790eebb0aeb38950", + "sha256:1ab0bbcd4d1f7b6991ee7c753655b481c50084294218de69365f8f1970d4c151", + "sha256:1cce488457370ffd1f953846f82323cb6b2ad2190987cd4d70b2713e17268d24", + "sha256:26ee97a8261e6e35885c2ecd2fd4a6d38252246f94a2aec23665a4e66d066305", + "sha256:3528807cbbb7f315bb81959d5961855e7ba52aa60a3097151cb21956fbc7502b", + "sha256:374a8e88ddab84b9ada695d255679fb99c53513c0a51778796fcf0944d6c789c", + "sha256:376081f471a2ef24828b83a641a02c575d6103a3ad7fd7dade5486cad10ea659", + "sha256:3923a1778f7e5ef31865893fdca12a8d7dc03a44b33e2a5f3295416314c09f5d", + "sha256:4916727e31c28be8beaf11cf117d6f6f188dcc36daae4e851fee88646f5b6b18", + "sha256:493c5c5e44b06d6c9268ce21b302c9ca055c1fd3484c25ba41d34476c76ee746", + "sha256:505fe3d03856ac7d215dbe005414bc28505d26f0c128906037e66d98c4e95868", + "sha256:5845fdf5e5d5b78a49b826fcdc0eb2e2aa7191980e3d2cfd2a30303a74f212e2", + "sha256:5c330eace3dd100bdb54b5653b966de7f51c26ec4a7d4e87132d9b4f738220ba", + "sha256:5dbf059fb4b7c240c873c1245ee112505be27497e90f7c6591261c7d3c3a8228", + "sha256:5e390971d082dba073c05dbd56322427d3280b7cc8b53484c9377adfbae67dc2", + "sha256:5fbb160554e319f7b22ecf530a80a3ff496d38e8e07ae763b9e82fadfe96f273", + "sha256:64d0fcd436c5683fdd7c907eeae5e2cbb5eb872fafbc03a43609d7941840995c", + "sha256:69284049d07fce531c17404fcba2bb1df472bc2dcdac642ae71a2d079d950653", + "sha256:6a0e76621f6e1f908ae52860bdcb58e1ca85231a9b0545e64509c931dd34275a", + "sha256:73ee792784d48aa338bba28063e19a27e8d989344f34aad14ea6e1b9bd83f596", + "sha256:74398a4cf19de42e1498368c36eed45d9528f5fd0155241e82c4082b7e16cffd", + "sha256:7938111ed1358f536daf311be244f34df7bf3cdedb3ed883787aca97778b28d8", + "sha256:82d92c773fbc6942a7a8b520d22c11cfc8fd83bba86116bfcf962c2f5c2ecdaa", + "sha256:83b5c044f3eff2a6534768ccfd50425939e7a8b5cf9a7261c385de1e20dcfc85", + "sha256:8db8e423192303ed77cff4dce3a4b88dbfaf43979d280181558af5e2c3c71afc", + "sha256:9517004e21664f2b5a5fd6333b0731b9cf0817403a941b393d89a2f1dc2bd836", + "sha256:95c02b0e27e706e48d0e5426d1710ca78e0f0628d6e89d5b5a5b91a5f12274f3", + "sha256:99881222f4a8c2f641f25703963a5cefb076adffd959e0558dc9f803a52d6a58", + "sha256:9ee32dcb8e531adae1f1ca568822e9b3a738369b3b686d1477cbc643c4a9c128", + "sha256:a22e47578b30a3e199ab067a4d43d790249b3c0587d9a771921f86250c8435db", + "sha256:b5505774ea2a73a86ea176e8a9a4a7c8bf5d521050f0f6f8426afe798689243f", + "sha256:bd739c9251d01e0279ce729e37b39d49a08c0420d3fee7f2a4968c0576678f77", + "sha256:d16a786905034e7e34098634b184a7d81f91d4c3d246edc6bd7aefb2fd8ea6ad", + "sha256:d3420522057ebab1728b21ad473aa950026d07cb09da41103f8e597dfbfaeb13", + "sha256:d56fd9f1f1cdc8227d7b7918f55091349741904d9520c65f0139a9755952c9e8", + "sha256:d661dc4785affa9d0edfdd1e59ec056a58b3dbb9f196fa43587f3ddac654ac7b", + "sha256:dfe1f0f0ed5785c187144c46a292b8c34c1295c01da12e10ccddfc16def4448a", + "sha256:e1dd7839443592d00e96db831eddb4111a2a81a46b028f0facd60a09ebbdd543", + "sha256:e2872993e209f7ed04d963e4b4fbae72d034844ec66bc4ca403329db2074377b", + "sha256:e2f879ab92ce502a1e65fce390eab619774dda6a6ff719718069ac94084098ce", + "sha256:e3aa7e51d738e0ec0afbed661261513b38b3014754c9459508399baf14ae0c9d", + "sha256:e532dbd6ddfe13946de050d7474e3f5fb6ec774fbb1a188aaf469b08cf04189a", + "sha256:e6b7842518a63a9f17107eb176320960ec095a8ee3b4420b5f688e24bf50c53c", + "sha256:e75753aeda0ddc4c28dce4c32ba2f6ec30b1b02f6c0b14e547841ba5b24f753f", + "sha256:eadb9f826c138e6cf3c49d6f8de88225a3c0ab181a9b4ba792e006e5292d150e", + "sha256:ed59dd52075f8fc91da6053b12e8c89e37aa043f8986efd89e61fae69dc1b011", + "sha256:ef254a06bcea461e65ff0373d8a0dd1ed3aa004af48839f002a0c994a6f72d04", + "sha256:f3709997b228685fe53e8c433e2df9f0cdb5f4542bd5114ed17ac3c0129b0480", + "sha256:f51bab98d52739c50c56658cc303f190785f9a2cd97b823357e7aeae54c8f68a", + "sha256:f9904e24646570539a8950400602d66d2b2c492b9010ea7e965025cb71d0c86d", + "sha256:f9af38a89b6a5c04b7d18c492c8ccf2aee7048aff1ce8437c4683bb5a1df893d" ], "index": "pypi", - "version": "==1.0.7" + "markers": "python_version >= '3.8'", + "version": "==1.0.8" }, "mysqlclient": { "hashes": [ @@ -467,59 +476,63 @@ "sha256:e1ebe3f41d152d7cb7c265349fdb7f1eca86ccb0ca24a90036cde48e00ceb2ab" ], "index": "pypi", + "markers": "python_version >= '3.8'", "version": "==2.2.4" }, "psutil": { "hashes": [ - "sha256:02615ed8c5ea222323408ceba16c60e99c3f91639b07da6373fb7e6539abc56d", - "sha256:05806de88103b25903dff19bb6692bd2e714ccf9e668d050d144012055cbca73", - "sha256:26bd09967ae00920df88e0352a91cff1a78f8d69b3ecabbfe733610c0af486c8", - "sha256:27cc40c3493bb10de1be4b3f07cae4c010ce715290a5be22b98493509c6299e2", - "sha256:36f435891adb138ed3c9e58c6af3e2e6ca9ac2f365efe1f9cfef2794e6c93b4e", - "sha256:50187900d73c1381ba1454cf40308c2bf6f34268518b3f36a9b663ca87e65e36", - "sha256:611052c4bc70432ec770d5d54f64206aa7203a101ec273a0cd82418c86503bb7", - "sha256:6be126e3225486dff286a8fb9a06246a5253f4c7c53b475ea5f5ac934e64194c", - "sha256:7d79560ad97af658a0f6adfef8b834b53f64746d45b403f225b85c5c2c140eee", - "sha256:8cb6403ce6d8e047495a701dc7c5bd788add903f8986d523e3e20b98b733e421", - "sha256:8db4c1b57507eef143a15a6884ca10f7c73876cdf5d51e713151c1236a0e68cf", - "sha256:aee678c8720623dc456fa20659af736241f575d79429a0e5e9cf88ae0605cc81", - "sha256:bc56c2a1b0d15aa3eaa5a60c9f3f8e3e565303b465dbf57a1b730e7a2b9844e0", - "sha256:bd1184ceb3f87651a67b2708d4c3338e9b10c5df903f2e3776b62303b26cb631", - "sha256:d06016f7f8625a1825ba3732081d77c94589dca78b7a3fc072194851e88461a4", - "sha256:d16bbddf0693323b8c6123dd804100241da461e41d6e332fb0ba6058f630f8c8" + "sha256:02b69001f44cc73c1c5279d02b30a817e339ceb258ad75997325e0e6169d8b35", + "sha256:1287c2b95f1c0a364d23bc6f2ea2365a8d4d9b726a3be7294296ff7ba97c17f0", + "sha256:1e7c870afcb7d91fdea2b37c24aeb08f98b6d67257a5cb0a8bc3ac68d0f1a68c", + "sha256:21f1fb635deccd510f69f485b87433460a603919b45e2a324ad65b0cc74f8fb1", + "sha256:33ea5e1c975250a720b3a6609c490db40dae5d83a4eb315170c4fe0d8b1f34b3", + "sha256:34859b8d8f423b86e4385ff3665d3f4d94be3cdf48221fbe476e883514fdb71c", + "sha256:5fd9a97c8e94059b0ef54a7d4baf13b405011176c3b6ff257c247cae0d560ecd", + "sha256:6ec7588fb3ddaec7344a825afe298db83fe01bfaaab39155fa84cf1c0d6b13c3", + "sha256:6ed2440ada7ef7d0d608f20ad89a04ec47d2d3ab7190896cd62ca5fc4fe08bf0", + "sha256:8faae4f310b6d969fa26ca0545338b21f73c6b15db7c4a8d934a5482faa818f2", + "sha256:a021da3e881cd935e64a3d0a20983bda0bb4cf80e4f74fa9bfcb1bc5785360c6", + "sha256:a495580d6bae27291324fe60cea0b5a7c23fa36a7cd35035a16d93bdcf076b9d", + "sha256:a9a3dbfb4de4f18174528d87cc352d1f788b7496991cca33c6996f40c9e3c92c", + "sha256:c588a7e9b1173b6e866756dde596fd4cad94f9399daf99ad8c3258b3cb2b47a0", + "sha256:e2e8d0054fc88153ca0544f5c4d554d42e33df2e009c4ff42284ac9ebdef4132", + "sha256:fc8c9510cde0146432bbdb433322861ee8c3efbf8589865c8bf8d21cb30c4d14", + "sha256:ffe7fc9b6b36beadc8c322f84e1caff51e8703b88eee1da46d1e3a6ae11b4fd0" ], "index": "pypi", - "version": "==5.9.8" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", + "version": "==6.0.0" }, "pyasn1": { "hashes": [ - "sha256:4439847c58d40b1d0a573d07e3856e95333f1976294494c325775aeca506eb58", - "sha256:6d391a96e59b23130a5cfa74d6fd7f388dbbe26cc8f1edf39fdddf08d9d6676c" + "sha256:3a35ab2c4b5ef98e17dfdec8ab074046fbda76e281c5a706ccd82328cfc8f64c", + "sha256:cca4bb0f2df5504f02f6f8a775b6e416ff9b0b3b16f7ee80b5a3153d9b804473" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", - "version": "==0.5.1" + "markers": "python_version >= '3.8'", + "version": "==0.6.0" }, "pyasn1-modules": { "hashes": [ - "sha256:5bd01446b736eb9d31512a30d46c1ac3395d676c6f3cafa4c03eb54b9925631c", - "sha256:d3ccd6ed470d9ffbc716be08bd90efbd44d0734bc9303818f7336070984a162d" + "sha256:831dbcea1b177b28c9baddf4c6d1013c24c3accd14a1873fffaa6a2e905f17b6", + "sha256:be04f15b66c206eed667e0bb5ab27e2b1855ea54a842e5037738099e8ca4ae0b" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", - "version": "==0.3.0" + "markers": "python_version >= '3.8'", + "version": "==0.4.0" }, "pycparser": { "hashes": [ - "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9", - "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206" + "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6", + "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc" ], - "version": "==2.21" + "markers": "python_version >= '3.8'", + "version": "==2.22" }, "pyopenssl": { "hashes": [ - "sha256:6aa33039a93fffa4563e655b61d11364d01264be8ccb49906101e02a334530bf", - "sha256:ba07553fb6fd6a7a2259adb9b84e12302a9a8a75c44046e8bb5d3e5ee887e3c3" + "sha256:17ed5be5936449c5418d1cd269a1a9e9081bc54c17aed272b45856a3d3dc86ad", + "sha256:cabed4bfaa5df9f1a16c0ef64a0cb65318b5cd077a7eda7d6970131ca2f41a6f" ], - "version": "==24.0.0" + "version": "==24.1.0" }, "python-dotenv": { "hashes": [ @@ -527,6 +540,7 @@ "sha256:f7b63ef50f1b690dddf550d03497b66d609393b40b564ed0d674909a68ebf16a" ], "index": "pypi", + "markers": "python_version >= '3.8'", "version": "==1.0.1" }, "pytz": { @@ -538,19 +552,20 @@ }, "redis": { "hashes": [ - "sha256:0dab495cd5753069d3bc650a0dde8a8f9edde16fc5691b689a566eda58100d0f", - "sha256:ed4802971884ae19d640775ba3b03aa2e7bd5e8fb8dfaed2decce4d0fc48391f" + "sha256:0e479e24da960c690be5d9b96d21f7b918a98c0cf49af3b6fafaa0753f93a0db", + "sha256:8f611490b93c8109b50adc317b31bfd84fff31def3475b92e7e80bf39f48175b" ], "markers": "python_version >= '3.7'", - "version": "==5.0.1" + "version": "==5.0.7" }, "requests": { "hashes": [ - "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f", - "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1" + "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760", + "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6" ], "index": "pypi", - "version": "==2.31.0" + "markers": "python_version >= '3.8'", + "version": "==2.32.3" }, "rx": { "hashes": [ @@ -558,6 +573,7 @@ "sha256:b657ca2b45aa485da2f7dcfd09fac2e554f7ac51ff3c2f8f2ff962ecd963d91c" ], "index": "pypi", + "markers": "python_full_version >= '3.6.0'", "version": "==3.2.0" }, "service-identity": { @@ -569,38 +585,38 @@ }, "setuptools": { "hashes": [ - "sha256:850894c4195f09c4ed30dba56213bf7c3f21d86ed6bdaafb5df5972593bfc401", - "sha256:c054629b81b946d63a9c6e732bc8b2513a7c3ea645f11d0139a2191d735c60c6" + "sha256:f171bab1dfbc86b132997f26a119f6056a57950d058587841a0082e8830f9dc5", + "sha256:fe384da74336c398e0d956d1cae0669bc02eed936cdb1d49b57de1990dc11ffc" ], "markers": "python_version >= '3.8'", - "version": "==69.1.0" + "version": "==70.3.0" }, "six": { "hashes": [ "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", "version": "==1.16.0" }, "sqlparse": { "hashes": [ - "sha256:5430a4fe2ac7d0f93e66f1efc6e1338a41884b7ddf2a350cedd20ccc4d9d28f3", - "sha256:d446183e84b8349fa3061f0fe7f06ca94ba65b426946ffebe6e3e8295332420c" + "sha256:714d0a4932c059d16189f58ef5411ec2287a4360f17cdd0edd2d09d4c5087c93", + "sha256:c204494cd97479d0e39f28c93d46c0b2d5959c7b9ab904762ea6c7af211c8663" ], - "markers": "python_version >= '3.5'", - "version": "==0.4.4" + "markers": "python_version >= '3.8'", + "version": "==0.5.0" }, "twisted": { "extras": [ "tls" ], "hashes": [ - "sha256:4ae8bce12999a35f7fe6443e7f1893e6fe09588c8d2bed9c35cdce8ff2d5b444", - "sha256:987847a0790a2c597197613686e2784fd54167df3a55d0fb17c8412305d76ce5" + "sha256:039f2e6a49ab5108abd94de187fa92377abe5985c7a72d68d0ad266ba19eae63", + "sha256:6b38b6ece7296b5e122c9eb17da2eeab3d98a198f50ca9efd00fb03e5b4fd4ae" ], "markers": "python_full_version >= '3.8.0'", - "version": "==23.10.0" + "version": "==24.3.0" }, "txaio": { "hashes": [ @@ -612,11 +628,11 @@ }, "typing-extensions": { "hashes": [ - "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783", - "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd" + "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", + "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" ], "markers": "python_version < '3.11'", - "version": "==4.9.0" + "version": "==4.12.2" }, "tzlocal": { "hashes": [ @@ -628,98 +644,102 @@ }, "urllib3": { "hashes": [ - "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d", - "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19" + "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472", + "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168" ], "markers": "python_version >= '3.8'", - "version": "==2.2.1" + "version": "==2.2.2" }, "watchdog": { "hashes": [ - "sha256:11e12fafb13372e18ca1bbf12d50f593e7280646687463dd47730fd4f4d5d257", - "sha256:2895bf0518361a9728773083908801a376743bcc37dfa252b801af8fd281b1ca", - "sha256:39cb34b1f1afbf23e9562501673e7146777efe95da24fab5707b88f7fb11649b", - "sha256:45cc09cc4c3b43fb10b59ef4d07318d9a3ecdbff03abd2e36e77b6dd9f9a5c85", - "sha256:4986db5e8880b0e6b7cd52ba36255d4793bf5cdc95bd6264806c233173b1ec0b", - "sha256:5369136a6474678e02426bd984466343924d1df8e2fd94a9b443cb7e3aa20d19", - "sha256:557ba04c816d23ce98a06e70af6abaa0485f6d94994ec78a42b05d1c03dcbd50", - "sha256:6a4db54edea37d1058b08947c789a2354ee02972ed5d1e0dca9b0b820f4c7f92", - "sha256:6a80d5cae8c265842c7419c560b9961561556c4361b297b4c431903f8c33b269", - "sha256:6a9c71a0b02985b4b0b6d14b875a6c86ddea2fdbebd0c9a720a806a8bbffc69f", - "sha256:6c47bdd680009b11c9ac382163e05ca43baf4127954c5f6d0250e7d772d2b80c", - "sha256:6e949a8a94186bced05b6508faa61b7adacc911115664ccb1923b9ad1f1ccf7b", - "sha256:73c7a935e62033bd5e8f0da33a4dcb763da2361921a69a5a95aaf6c93aa03a87", - "sha256:76ad8484379695f3fe46228962017a7e1337e9acadafed67eb20aabb175df98b", - "sha256:8350d4055505412a426b6ad8c521bc7d367d1637a762c70fdd93a3a0d595990b", - "sha256:87e9df830022488e235dd601478c15ad73a0389628588ba0b028cb74eb72fed8", - "sha256:8f9a542c979df62098ae9c58b19e03ad3df1c9d8c6895d96c0d51da17b243b1c", - "sha256:8fec441f5adcf81dd240a5fe78e3d83767999771630b5ddfc5867827a34fa3d3", - "sha256:9a03e16e55465177d416699331b0f3564138f1807ecc5f2de9d55d8f188d08c7", - "sha256:ba30a896166f0fee83183cec913298151b73164160d965af2e93a20bbd2ab605", - "sha256:c17d98799f32e3f55f181f19dd2021d762eb38fdd381b4a748b9f5a36738e935", - "sha256:c522392acc5e962bcac3b22b9592493ffd06d1fc5d755954e6be9f4990de932b", - "sha256:d0f9bd1fd919134d459d8abf954f63886745f4660ef66480b9d753a7c9d40927", - "sha256:d18d7f18a47de6863cd480734613502904611730f8def45fc52a5d97503e5101", - "sha256:d31481ccf4694a8416b681544c23bd271f5a123162ab603c7d7d2dd7dd901a07", - "sha256:e3e7065cbdabe6183ab82199d7a4f6b3ba0a438c5a512a68559846ccb76a78ec", - "sha256:eed82cdf79cd7f0232e2fdc1ad05b06a5e102a43e331f7d041e5f0e0a34a51c4", - "sha256:f970663fa4f7e80401a7b0cbeec00fa801bf0287d93d48368fc3e6fa32716245", - "sha256:f9b2fdca47dc855516b2d66eef3c39f2672cbf7e7a42e7e67ad2cbfcd6ba107d" + "sha256:0144c0ea9997b92615af1d94afc0c217e07ce2c14912c7b1a5731776329fcfc7", + "sha256:03e70d2df2258fb6cb0e95bbdbe06c16e608af94a3ffbd2b90c3f1e83eb10767", + "sha256:093b23e6906a8b97051191a4a0c73a77ecc958121d42346274c6af6520dec175", + "sha256:123587af84260c991dc5f62a6e7ef3d1c57dfddc99faacee508c71d287248459", + "sha256:17e32f147d8bf9657e0922c0940bcde863b894cd871dbb694beb6704cfbd2fb5", + "sha256:206afc3d964f9a233e6ad34618ec60b9837d0582b500b63687e34011e15bb429", + "sha256:4107ac5ab936a63952dea2a46a734a23230aa2f6f9db1291bf171dac3ebd53c6", + "sha256:4513ec234c68b14d4161440e07f995f231be21a09329051e67a2118a7a612d2d", + "sha256:611be3904f9843f0529c35a3ff3fd617449463cb4b73b1633950b3d97fa4bfb7", + "sha256:62c613ad689ddcb11707f030e722fa929f322ef7e4f18f5335d2b73c61a85c28", + "sha256:667f3c579e813fcbad1b784db7a1aaa96524bed53437e119f6a2f5de4db04235", + "sha256:6e8c70d2cd745daec2a08734d9f63092b793ad97612470a0ee4cbb8f5f705c57", + "sha256:7577b3c43e5909623149f76b099ac49a1a01ca4e167d1785c76eb52fa585745a", + "sha256:998d2be6976a0ee3a81fb8e2777900c28641fb5bfbd0c84717d89bca0addcdc5", + "sha256:a3c2c317a8fb53e5b3d25790553796105501a235343f5d2bf23bb8649c2c8709", + "sha256:ab998f567ebdf6b1da7dc1e5accfaa7c6992244629c0fdaef062f43249bd8dee", + "sha256:ac7041b385f04c047fcc2951dc001671dee1b7e0615cde772e84b01fbf68ee84", + "sha256:bca36be5707e81b9e6ce3208d92d95540d4ca244c006b61511753583c81c70dd", + "sha256:c9904904b6564d4ee8a1ed820db76185a3c96e05560c776c79a6ce5ab71888ba", + "sha256:cad0bbd66cd59fc474b4a4376bc5ac3fc698723510cbb64091c2a793b18654db", + "sha256:d10a681c9a1d5a77e75c48a3b8e1a9f2ae2928eda463e8d33660437705659682", + "sha256:d4925e4bf7b9bddd1c3de13c9b8a2cdb89a468f640e66fbfabaf735bd85b3e35", + "sha256:d7b9f5f3299e8dd230880b6c55504a1f69cf1e4316275d1b215ebdd8187ec88d", + "sha256:da2dfdaa8006eb6a71051795856bedd97e5b03e57da96f98e375682c48850645", + "sha256:dddba7ca1c807045323b6af4ff80f5ddc4d654c8bce8317dde1bd96b128ed253", + "sha256:e7921319fe4430b11278d924ef66d4daa469fafb1da679a2e48c935fa27af193", + "sha256:e93f451f2dfa433d97765ca2634628b789b49ba8b504fdde5837cdcf25fdb53b", + "sha256:eebaacf674fa25511e8867028d281e602ee6500045b57f43b08778082f7f8b44", + "sha256:ef0107bbb6a55f5be727cfc2ef945d5676b97bffb8425650dadbb184be9f9a2b", + "sha256:f0de0f284248ab40188f23380b03b59126d1479cd59940f2a34f8852db710625", + "sha256:f27279d060e2ab24c0aa98363ff906d2386aa6c4dc2f1a374655d4e02a6c5e5e", + "sha256:f8affdf3c0f0466e69f5b3917cdd042f89c8c63aebdb9f7c078996f607cdb0f5" ], "index": "pypi", - "version": "==4.0.0" + "markers": "python_version >= '3.8'", + "version": "==4.0.1" }, "zope-interface": { "hashes": [ - "sha256:02adbab560683c4eca3789cc0ac487dcc5f5a81cc48695ec247f00803cafe2fe", - "sha256:14e02a6fc1772b458ebb6be1c276528b362041217b9ca37e52ecea2cbdce9fac", - "sha256:25e0af9663eeac6b61b231b43c52293c2cb7f0c232d914bdcbfd3e3bd5c182ad", - "sha256:2606955a06c6852a6cff4abeca38346ed01e83f11e960caa9a821b3626a4467b", - "sha256:396f5c94654301819a7f3a702c5830f0ea7468d7b154d124ceac823e2419d000", - "sha256:3b240883fb43160574f8f738e6d09ddbdbf8fa3e8cea051603d9edfd947d9328", - "sha256:3b6c62813c63c543a06394a636978b22dffa8c5410affc9331ce6cdb5bfa8565", - "sha256:4ae9793f114cee5c464cc0b821ae4d36e1eba961542c6086f391a61aee167b6f", - "sha256:4bce517b85f5debe07b186fc7102b332676760f2e0c92b7185dd49c138734b70", - "sha256:4d45d2ba8195850e3e829f1f0016066a122bfa362cc9dc212527fc3d51369037", - "sha256:4dd374927c00764fcd6fe1046bea243ebdf403fba97a937493ae4be2c8912c2b", - "sha256:506f5410b36e5ba494136d9fa04c548eaf1a0d9c442b0b0e7a0944db7620e0ab", - "sha256:59f7374769b326a217d0b2366f1c176a45a4ff21e8f7cebb3b4a3537077eff85", - "sha256:5ee9789a20b0081dc469f65ff6c5007e67a940d5541419ca03ef20c6213dd099", - "sha256:6fc711acc4a1c702ca931fdbf7bf7c86f2a27d564c85c4964772dadf0e3c52f5", - "sha256:75d2ec3d9b401df759b87bc9e19d1b24db73083147089b43ae748aefa63067ef", - "sha256:76e0531d86523be7a46e15d379b0e975a9db84316617c0efe4af8338dc45b80c", - "sha256:8af82afc5998e1f307d5e72712526dba07403c73a9e287d906a8aa2b1f2e33dd", - "sha256:8f5d2c39f3283e461de3655e03faf10e4742bb87387113f787a7724f32db1e48", - "sha256:97785604824981ec8c81850dd25c8071d5ce04717a34296eeac771231fbdd5cd", - "sha256:a3046e8ab29b590d723821d0785598e0b2e32b636a0272a38409be43e3ae0550", - "sha256:abb0b3f2cb606981c7432f690db23506b1db5899620ad274e29dbbbdd740e797", - "sha256:ac7c2046d907e3b4e2605a130d162b1b783c170292a11216479bb1deb7cadebe", - "sha256:af27b3fe5b6bf9cd01b8e1c5ddea0a0d0a1b8c37dc1c7452f1e90bf817539c6d", - "sha256:b386b8b9d2b6a5e1e4eadd4e62335571244cb9193b7328c2b6e38b64cfda4f0e", - "sha256:b66335bbdbb4c004c25ae01cc4a54fd199afbc1fd164233813c6d3c2293bb7e1", - "sha256:d54f66c511ea01b9ef1d1a57420a93fbb9d48a08ec239f7d9c581092033156d0", - "sha256:de125151a53ecdb39df3cb3deb9951ed834dd6a110a9e795d985b10bb6db4532", - "sha256:de7916380abaef4bb4891740879b1afcba2045aee51799dfd6d6ca9bdc71f35f", - "sha256:e2fefad268ff5c5b314794e27e359e48aeb9c8bb2cbb5748a071757a56f6bb8f", - "sha256:e7b2bed4eea047a949296e618552d3fed00632dc1b795ee430289bdd0e3717f3", - "sha256:e87698e2fea5ca2f0a99dff0a64ce8110ea857b640de536c76d92aaa2a91ff3a", - "sha256:ede888382882f07b9e4cd942255921ffd9f2901684198b88e247c7eabd27a000", - "sha256:f444de0565db46d26c9fa931ca14f497900a295bd5eba480fc3fad25af8c763e", - "sha256:fa994e8937e8ccc7e87395b7b35092818905cf27c651e3ff3e7f29729f5ce3ce", - "sha256:febceb04ee7dd2aef08c2ff3d6f8a07de3052fc90137c507b0ede3ea80c21440" + "sha256:00b5c3e9744dcdc9e84c24ed6646d5cf0cf66551347b310b3ffd70f056535854", + "sha256:0e4fa5d34d7973e6b0efa46fe4405090f3b406f64b6290facbb19dcbf642ad6b", + "sha256:136cacdde1a2c5e5bc3d0b2a1beed733f97e2dad8c2ad3c2e17116f6590a3827", + "sha256:1730c93a38b5a18d24549bc81613223962a19d457cfda9bdc66e542f475a36f4", + "sha256:1a62fd6cd518693568e23e02f41816adedfca637f26716837681c90b36af3671", + "sha256:1c207e6f6dfd5749a26f5a5fd966602d6b824ec00d2df84a7e9a924e8933654e", + "sha256:2eccd5bef45883802848f821d940367c1d0ad588de71e5cabe3813175444202c", + "sha256:33ee982237cffaf946db365c3a6ebaa37855d8e3ca5800f6f48890209c1cfefc", + "sha256:3d136e5b8821073e1a09dde3eb076ea9988e7010c54ffe4d39701adf0c303438", + "sha256:47654177e675bafdf4e4738ce58cdc5c6d6ee2157ac0a78a3fa460942b9d64a8", + "sha256:47937cf2e7ed4e0e37f7851c76edeb8543ec9b0eae149b36ecd26176ff1ca874", + "sha256:4ac46298e0143d91e4644a27a769d1388d5d89e82ee0cf37bf2b0b001b9712a4", + "sha256:4c0b208a5d6c81434bdfa0f06d9b667e5de15af84d8cae5723c3a33ba6611b82", + "sha256:551db2fe892fcbefb38f6f81ffa62de11090c8119fd4e66a60f3adff70751ec7", + "sha256:599f3b07bde2627e163ce484d5497a54a0a8437779362395c6b25e68c6590ede", + "sha256:5ef8356f16b1a83609f7a992a6e33d792bb5eff2370712c9eaae0d02e1924341", + "sha256:5fe919027f29b12f7a2562ba0daf3e045cb388f844e022552a5674fcdf5d21f1", + "sha256:6f0a6be264afb094975b5ef55c911379d6989caa87c4e558814ec4f5125cfa2e", + "sha256:706efc19f9679a1b425d6fa2b4bc770d976d0984335eaea0869bd32f627591d2", + "sha256:73f9752cf3596771c7726f7eea5b9e634ad47c6d863043589a1c3bb31325c7eb", + "sha256:762e616199f6319bb98e7f4f27d254c84c5fb1c25c908c2a9d0f92b92fb27530", + "sha256:866a0f583be79f0def667a5d2c60b7b4cc68f0c0a470f227e1122691b443c934", + "sha256:86a94af4a88110ed4bb8961f5ac72edf782958e665d5bfceaab6bf388420a78b", + "sha256:8e0343a6e06d94f6b6ac52fbc75269b41dd3c57066541a6c76517f69fe67cb43", + "sha256:97e615eab34bd8477c3f34197a17ce08c648d38467489359cb9eb7394f1083f7", + "sha256:a96e6d4074db29b152222c34d7eec2e2db2f92638d2b2b2c704f9e8db3ae0edc", + "sha256:b912750b13d76af8aac45ddf4679535def304b2a48a07989ec736508d0bbfbde", + "sha256:bc2676312cc3468a25aac001ec727168994ea3b69b48914944a44c6a0b251e79", + "sha256:cebff2fe5dc82cb22122e4e1225e00a4a506b1a16fafa911142ee124febf2c9e", + "sha256:d22fce0b0f5715cdac082e35a9e735a1752dc8585f005d045abb1a7c20e197f9", + "sha256:d3f7e001328bd6466b3414215f66dde3c7c13d8025a9c160a75d7b2687090d15", + "sha256:d3fe667935e9562407c2511570dca14604a654988a13d8725667e95161d92e9b", + "sha256:dabb70a6e3d9c22df50e08dc55b14ca2a99da95a2d941954255ac76fd6982bc5", + "sha256:e2fb8e8158306567a3a9a41670c1ff99d0567d7fc96fa93b7abf8b519a46b250", + "sha256:e96ac6b3169940a8cd57b4f2b8edcad8f5213b60efcd197d59fbe52f0accd66e", + "sha256:fbf649bc77510ef2521cf797700b96167bb77838c40780da7ea3edd8b78044d1" ], "markers": "python_version >= '3.7'", - "version": "==6.2" + "version": "==6.4.post2" } }, "develop": { "astroid": { "hashes": [ - "sha256:4148645659b08b70d72460ed1921158027a9e53ae8b7234149b1400eddacbb93", - "sha256:92fcf218b89f449cdf9f7b39a269f8d5d617b27be68434912e11e79203963a17" + "sha256:8ead48e31b92b2e217b6c9733a21afafe479d52d6e164dd25fb1a770c7c3cf94", + "sha256:e8a0083b4bb28fcffb6207a3bfc9e5d0a68be951dd7e336d5dcf639c682388c0" ], "markers": "python_full_version >= '3.8.0'", - "version": "==3.0.3" + "version": "==3.2.2" }, "attrs": { "hashes": [ @@ -731,11 +751,11 @@ }, "certifi": { "hashes": [ - "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f", - "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1" + "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b", + "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90" ], "markers": "python_version >= '3.6'", - "version": "==2024.2.2" + "version": "==2024.7.4" }, "click": { "hashes": [ @@ -773,6 +793,7 @@ "sha256:db93fa008d19eaadb0454edf1704931d14469d48508daba2df9941111f408346" ], "index": "pypi", + "markers": "python_full_version >= '3.8.0' and python_full_version < '4.0.0'", "version": "==1.34.1" }, "editorconfig": { @@ -783,11 +804,11 @@ }, "exceptiongroup": { "hashes": [ - "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14", - "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68" + "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad", + "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16" ], "markers": "python_version < '3.11'", - "version": "==1.2.0" + "version": "==1.2.1" }, "h11": { "hashes": [ @@ -815,11 +836,11 @@ }, "idna": { "hashes": [ - "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca", - "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f" + "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc", + "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0" ], "markers": "python_version >= '3.5'", - "version": "==3.6" + "version": "==3.7" }, "isort": { "hashes": [ @@ -837,11 +858,11 @@ }, "json5": { "hashes": [ - "sha256:717d99d657fa71b7094877b1d921b1cce40ab444389f6d770302563bb7dfd9ae", - "sha256:f8ec1ecf985951d70f780f6f877c4baca6a47b6e61e02c4cd190138d10a7805a" + "sha256:34ed7d834b1341a86987ed52f3f76cd8ee184394906b6e22a1e0deb9ab294e8f", + "sha256:548e41b9be043f9426776f05df8635a00fe06104ea51ed24b67f908856e151ae" ], "markers": "python_version >= '3.8'", - "version": "==0.9.17" + "version": "==0.9.25" }, "mccabe": { "hashes": [ @@ -869,27 +890,28 @@ }, "platformdirs": { "hashes": [ - "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068", - "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768" + "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee", + "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3" ], "markers": "python_version >= '3.8'", - "version": "==4.2.0" + "version": "==4.2.2" }, "pycodestyle": { "hashes": [ - "sha256:41ba0e7afc9752dfb53ced5489e89f8186be00e599e712660695b7a75ff2663f", - "sha256:44fe31000b2d866f2e41841b18528a505fbd7fef9017b04eff4e2648a0fadc67" + "sha256:442f950141b4f43df752dd303511ffded3a04c2b6fb7f65980574f0c31e6e79c", + "sha256:949a39f6b86c3e1515ba1787c2022131d165a8ad271b11370a8819aa070269e4" ], "index": "pypi", - "version": "==2.11.1" + "markers": "python_version >= '3.8'", + "version": "==2.12.0" }, "pylint": { "hashes": [ - "sha256:58c2398b0301e049609a8429789ec6edf3aabe9b6c5fec916acd18639c16de8b", - "sha256:7a1585285aefc5165db81083c3e06363a27448f6b467b3b0f30dbd0ac1f73810" + "sha256:32cd6c042b5004b8e857d727708720c54a676d1e22917cf1a2df9b4d4868abd6", + "sha256:e9b7171e242dcc6ebd0aaa7540481d1a72860748a0a7816b8fe6cf6c80a6fe7e" ], "markers": "python_full_version >= '3.8.0'", - "version": "==3.0.3" + "version": "==3.2.5" }, "pylint-django": { "hashes": [ @@ -897,6 +919,7 @@ "sha256:5abd5c2228e0e5e2a4cb6d0b4fc1d1cef1e773d0be911412f4dd4fc1a1a440b7" ], "index": "pypi", + "markers": "python_version >= '3.7' and python_version < '4.0'", "version": "==2.5.5" }, "pylint-plugin-utils": { @@ -1073,27 +1096,28 @@ }, "selenium": { "hashes": [ - "sha256:a11f67afa8bfac6b77e148c987b33f6b14eb1cae4d352722a75de1f26e3f0ae2", - "sha256:b24a3cdd2d47c29832e81345bfcde0c12bb608738013e53c781b211b418df241" + "sha256:903c8c9d61b3eea6fcc9809dc7d9377e04e2ac87709876542cc8f863e482c4ce", + "sha256:e424991196e9857e19bf04fe5c1c0a4aac076794ff5e74615b1124e729d93104" ], "index": "pypi", - "version": "==4.18.1" + "markers": "python_version >= '3.8'", + "version": "==4.22.0" }, "six": { "hashes": [ "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", "version": "==1.16.0" }, "sniffio": { "hashes": [ - "sha256:e60305c5e5d314f5389259b7f22aaa33d8f7dee49763119234af3755c55b9101", - "sha256:eecefdce1e5bbfb7ad2eeaabf7c1eeb404d7757c379bd1f7e5cce9d8bf425384" + "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", + "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc" ], "markers": "python_version >= '3.7'", - "version": "==1.3.0" + "version": "==1.3.1" }, "sortedcontainers": { "hashes": [ @@ -1112,28 +1136,27 @@ }, "tomlkit": { "hashes": [ - "sha256:75baf5012d06501f07bee5bf8e801b9f343e7aac5a92581f20f80ce632e6b5a4", - "sha256:b0a645a9156dc7cb5d3a1f0d4bab66db287fcb8e0430bdd4664a095ea16414ba" + "sha256:08ad192699734149f5b97b45f1f18dad7eb1b6d16bc72ad0c2335772650d7b72", + "sha256:7075d3042d03b80f603482d69bf0c8f345c2b30e41699fd8883227f89972b264" ], - "markers": "python_version >= '3.7'", - "version": "==0.12.3" + "markers": "python_version >= '3.8'", + "version": "==0.13.0" }, "tqdm": { "hashes": [ - "sha256:23097a41eba115ba99ecae40d06444c15d1c0c698d527a01c6c8bd1c5d0647e5", - "sha256:4f41d54107ff9a223dca80b53efe4fb654c67efaba7f47bada3ee9d50e05bd53" + "sha256:b75ca56b413b030bc3f00af51fd2c1a1a5eac6a0c1cca83cbb37a5c52abce644", + "sha256:e4d936c9de8727928f3be6079590e97d9abfe8d39a590be678eb5919ffc186bb" ], - "index": "pypi", "markers": "python_version >= '3.7'", - "version": "==4.66.3" + "version": "==4.66.4" }, "trio": { "hashes": [ - "sha256:c3bd3a4e3e3025cd9a2241eae75637c43fe0b9e88b4c97b9161a55b9e54cd72c", - "sha256:ffa09a74a6bf81b84f8613909fb0beaee84757450183a7a2e0b47b455c0cac5d" + "sha256:67c5ec3265dd4abc7b1d1ab9ca4fe4c25b896f9c93dac73713778adab487f9c4", + "sha256:bb9c1b259591af941fccfbabbdc65bc7ed764bd2db76428454c894cd5e3d2032" ], "markers": "python_version >= '3.8'", - "version": "==0.24.0" + "version": "==0.26.0" }, "trio-websocket": { "hashes": [ @@ -1145,19 +1168,27 @@ }, "typing-extensions": { "hashes": [ - "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783", - "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd" + "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", + "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" ], "markers": "python_version < '3.11'", - "version": "==4.9.0" + "version": "==4.12.2" }, "urllib3": { "hashes": [ - "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d", - "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19" + "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472", + "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168" + ], + "markers": "python_version >= '3.8'", + "version": "==2.2.2" + }, + "websocket-client": { + "hashes": [ + "sha256:17b44cc997f5c498e809b22cdf2d9c7a9e71c02c8cc2b6c56e7c2d1239bfa526", + "sha256:3239df9f44da632f96012472805d40a23281a991027ce11d2f45a6f24ac4c3da" ], "markers": "python_version >= '3.8'", - "version": "==2.2.1" + "version": "==1.8.0" }, "wsproto": { "hashes": [ diff --git a/installer.sh b/installer.sh index 4bd39f6cd..9f72d44bd 100755 --- a/installer.sh +++ b/installer.sh @@ -429,10 +429,10 @@ install_embark_dev(){ # Set some globals echo "NO_UPDATE_CHECK=1" >> /etc/environment - #pipenv + # pipenv MYSQLCLIENT_LDFLAGS='-L/usr/mysql/lib -lmysqlclient -lssl -lcrypto -lresolv' MYSQLCLIENT_CFLAGS='-I/usr/include/mysql/' PIPENV_VENV_IN_PROJECT=1 pipenv install --dev - #Server-Dir + # Server-Dir if ! [[ -d media ]]; then mkdir media fi From 381389b9b985eb06f53ae8e3422de92e93630ec8 Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Wed, 10 Jul 2024 13:40:23 +0000 Subject: [PATCH 12/18] ch size of check div --- embark/templates/updater/progress.html | 6 +----- embark/updater/views.py | 4 ++-- embark/uploader/boundedexecutor.py | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/embark/templates/updater/progress.html b/embark/templates/updater/progress.html index 988e73e2b..8fdc55a8c 100644 --- a/embark/templates/updater/progress.html +++ b/embark/templates/updater/progress.html @@ -1,9 +1,5 @@ {% load django_bootstrap5 %} {% load static %}
    -
    -
    - {{ log_content|safe }} -
    -
    + {{ log_content|safe }}
    \ No newline at end of file diff --git a/embark/updater/views.py b/embark/updater/views.py index fdae5fdb0..a80ef0ff8 100644 --- a/embark/updater/views.py +++ b/embark/updater/views.py @@ -55,9 +55,9 @@ def check_update(request): if form.is_valid(): option = form.cleaned_data["option"] if option == 'BOTH': - check_option = '1' + check_option = 1 elif option == 'CONTAINER': - check_option = '2' + check_option = 2 logger.debug("Got option %d for emba dep check", check_option) # inject into bounded Executor if BoundedExecutor.submit_emba_check(option=check_option): diff --git a/embark/uploader/boundedexecutor.py b/embark/uploader/boundedexecutor.py index ca8ae15e3..52582efd2 100644 --- a/embark/uploader/boundedexecutor.py +++ b/embark/uploader/boundedexecutor.py @@ -373,7 +373,7 @@ def emba_check(cls, option): """ logger.debug("Checking EMBA with: %d", option) try: - cmd = f"{EMBA_SCRIPT_LOCATION} -d{option} | ansifilter -H -o {settings.EMBA_LOG_ROOT}/emba_check.html" + cmd = f"{EMBA_SCRIPT_LOCATION} -d{option} | ansifilter -H -o {settings.EMBA_LOG_ROOT}/emba_check.html -s 5pt" with open(f"{settings.EMBA_LOG_ROOT}/emba_check.log", "w+", encoding="utf-8") as file: # File should be empty proc = Popen(cmd, stdin=PIPE, stdout=file, stderr=file, shell=True) # nosec From 68a66536cac301cde6ea9986bbd18a87e6f36a16 Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Wed, 10 Jul 2024 13:40:46 +0000 Subject: [PATCH 13/18] ch version --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index d34a4e8fa..1bab282b4 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -0.1-1f652fc6 \ No newline at end of file +0.1-381389b9 \ No newline at end of file From 02a5f8d967ce24c82b2a5660a1f4b3af9b020f12 Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Wed, 10 Jul 2024 13:55:05 +0000 Subject: [PATCH 14/18] update --- VERSION.txt | 2 +- embark/embark/helper.py | 10 +++++----- embark/updater/admin.py | 3 --- embark/updater/tests.py | 3 --- embark/updater/views.py | 5 ----- embark/uploader/boundedexecutor.py | 4 ++-- 6 files changed, 8 insertions(+), 19 deletions(-) delete mode 100644 embark/updater/admin.py delete mode 100644 embark/updater/tests.py diff --git a/VERSION.txt b/VERSION.txt index 1bab282b4..8622d9a6d 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -0.1-381389b9 \ No newline at end of file +0.1-68a66536 \ No newline at end of file diff --git a/embark/embark/helper.py b/embark/embark/helper.py index 361e62b2e..aff2415ee 100644 --- a/embark/embark/helper.py +++ b/embark/embark/helper.py @@ -67,13 +67,13 @@ def get_version_strings(): # gets us the currently installed version if Path(EMBA_ROOT + "/external/onlinechecker").exists(): # get the latest version nnumbers - with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_VERSION.txt"),'r') as emba_version_file: + with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_VERSION.txt"),'r', 'UTF-8') as emba_version_file: stable_emba_version = emba_version_file.read().splitlines()[0] - with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_CONTAINER_HASH.txt"),'r') as container_version_file: + with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_CONTAINER_HASH.txt"),'r', 'UTF-8') as container_version_file: container_version = container_version_file.read().splitlines()[0] with open(Path(EMBA_ROOT + "/external/onlinechecker/NVD_HASH.txt"),'r') as nvd_version_file: nvd_version = nvd_version_file.read().splitlines()[0] - with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_GITHUB_HASH.txt"),'r') as emba_github_version_file: + with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_GITHUB_HASH.txt"),'r', 'UTF-8') as emba_github_version_file: github_emba_version = emba_github_version_file.read().splitlines()[0] else: stable_emba_version = "" @@ -82,13 +82,13 @@ def get_version_strings(): github_emba_version = "" if Path(EMBA_ROOT + "/config/VERSION.txt").exists(): - with open(Path(EMBA_ROOT + "/config/VERSION.txt"),'r') as emba_version_file: + with open(Path(EMBA_ROOT + "/config/VERSION.txt"),'r', 'UTF-8') as emba_version_file: emba_version = emba_version_file.read().splitlines()[0] else: emba_version = "" if Path("./VERSION.txt").exists(): - with open(Path("./VERSION.txt"),'r') as embark_version_file: + with open(Path("./VERSION.txt"),'r', 'UTF-8') as embark_version_file: embark_version = embark_version_file.read().splitlines()[0] else: embark_version = "" diff --git a/embark/updater/admin.py b/embark/updater/admin.py deleted file mode 100644 index 8c38f3f3d..000000000 --- a/embark/updater/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/embark/updater/tests.py b/embark/updater/tests.py deleted file mode 100644 index 7ce503c2d..000000000 --- a/embark/updater/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/embark/updater/views.py b/embark/updater/views.py index a80ef0ff8..1de1493fd 100644 --- a/embark/updater/views.py +++ b/embark/updater/views.py @@ -1,17 +1,12 @@ -import base64 import logging -import os -import re from django.conf import settings from django.shortcuts import render -from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseForbidden, HttpResponseServerError from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_http_methods from django.contrib import messages from django.shortcuts import redirect from django.views.decorators.csrf import csrf_protect -from embark.helper import get_version_strings from updater.forms import CheckForm, EmbaUpdateForm from uploader.boundedexecutor import BoundedExecutor diff --git a/embark/uploader/boundedexecutor.py b/embark/uploader/boundedexecutor.py index 52582efd2..6e6af4911 100644 --- a/embark/uploader/boundedexecutor.py +++ b/embark/uploader/boundedexecutor.py @@ -386,8 +386,8 @@ def emba_check(cls, option): raise BoundedException("EMBA has non zero exit-code") except (BaseException, BoundedException) as exce: logger.error("emba dep check error: %s", exce) - - room_group_name = f"versions" + + room_group_name = "versions" channel_layer = get_channel_layer() # send ws message async_to_sync(channel_layer.group_send)( From d7e5c04e5f2d96b9caf23dc1bc49134471cc8c8b Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Wed, 10 Jul 2024 13:58:09 +0000 Subject: [PATCH 15/18] update --- VERSION.txt | 2 +- embark/embark/helper.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 8622d9a6d..74d6185b3 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -0.1-68a66536 \ No newline at end of file +0.1-02a5f8d9 \ No newline at end of file diff --git a/embark/embark/helper.py b/embark/embark/helper.py index aff2415ee..be8a3fa8a 100644 --- a/embark/embark/helper.py +++ b/embark/embark/helper.py @@ -67,13 +67,13 @@ def get_version_strings(): # gets us the currently installed version if Path(EMBA_ROOT + "/external/onlinechecker").exists(): # get the latest version nnumbers - with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_VERSION.txt"),'r', 'UTF-8') as emba_version_file: + with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_VERSION.txt"),'r', encoding='UTF-8') as emba_version_file: stable_emba_version = emba_version_file.read().splitlines()[0] - with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_CONTAINER_HASH.txt"),'r', 'UTF-8') as container_version_file: + with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_CONTAINER_HASH.txt"),'r', encoding='UTF-8') as container_version_file: container_version = container_version_file.read().splitlines()[0] - with open(Path(EMBA_ROOT + "/external/onlinechecker/NVD_HASH.txt"),'r') as nvd_version_file: + with open(Path(EMBA_ROOT + "/external/onlinechecker/NVD_HASH.txt"),'r', encoding='UTF-8') as nvd_version_file: nvd_version = nvd_version_file.read().splitlines()[0] - with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_GITHUB_HASH.txt"),'r', 'UTF-8') as emba_github_version_file: + with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_GITHUB_HASH.txt"),'r', encoding='UTF-8') as emba_github_version_file: github_emba_version = emba_github_version_file.read().splitlines()[0] else: stable_emba_version = "" @@ -82,13 +82,13 @@ def get_version_strings(): github_emba_version = "" if Path(EMBA_ROOT + "/config/VERSION.txt").exists(): - with open(Path(EMBA_ROOT + "/config/VERSION.txt"),'r', 'UTF-8') as emba_version_file: + with open(Path(EMBA_ROOT + "/config/VERSION.txt"),'r', encoding='UTF-8') as emba_version_file: emba_version = emba_version_file.read().splitlines()[0] else: emba_version = "" if Path("./VERSION.txt").exists(): - with open(Path("./VERSION.txt"),'r', 'UTF-8') as embark_version_file: + with open(Path("./VERSION.txt"),'r', encoding='UTF-8') as embark_version_file: embark_version = embark_version_file.read().splitlines()[0] else: embark_version = "" From 80385a4c9cf90660bda0378631806ced7742762e Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Thu, 11 Jul 2024 04:57:12 +0000 Subject: [PATCH 16/18] linter --- embark/embark/context_processor.py | 1 + embark/embark/helper.py | 13 +++++++------ embark/embark/settings/dev.py | 2 +- embark/templates/updater/check.html | 3 --- embark/updater/models.py | 3 --- embark/updater/views.py | 6 ++++-- embark/uploader/boundedexecutor.py | 3 +-- 7 files changed, 14 insertions(+), 17 deletions(-) delete mode 100644 embark/updater/models.py diff --git a/embark/embark/context_processor.py b/embark/embark/context_processor.py index 735cf1e2e..b1a884534 100644 --- a/embark/embark/context_processor.py +++ b/embark/embark/context_processor.py @@ -1,4 +1,5 @@ from django.conf import settings + def embark_version(request): return {'EMBARK_VERSION': settings.VERSION[0], 'EMBA_VERSION': settings.VERSION[1]} diff --git a/embark/embark/helper.py b/embark/embark/helper.py index be8a3fa8a..0028b0de6 100644 --- a/embark/embark/helper.py +++ b/embark/embark/helper.py @@ -9,6 +9,7 @@ # from embark.settings.deploy import EMBA_ROOT EMBA_ROOT = os.path.join('/home/benedikt/embark', 'emba') + def rnd_rgb_color(): """ Used for html colors ONLY @@ -67,13 +68,13 @@ def get_version_strings(): # gets us the currently installed version if Path(EMBA_ROOT + "/external/onlinechecker").exists(): # get the latest version nnumbers - with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_VERSION.txt"),'r', encoding='UTF-8') as emba_version_file: + with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_VERSION.txt"), 'r', encoding='UTF-8') as emba_version_file: stable_emba_version = emba_version_file.read().splitlines()[0] - with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_CONTAINER_HASH.txt"),'r', encoding='UTF-8') as container_version_file: + with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_CONTAINER_HASH.txt"), 'r', encoding='UTF-8') as container_version_file: container_version = container_version_file.read().splitlines()[0] - with open(Path(EMBA_ROOT + "/external/onlinechecker/NVD_HASH.txt"),'r', encoding='UTF-8') as nvd_version_file: + with open(Path(EMBA_ROOT + "/external/onlinechecker/NVD_HASH.txt"), 'r', encoding='UTF-8') as nvd_version_file: nvd_version = nvd_version_file.read().splitlines()[0] - with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_GITHUB_HASH.txt"),'r', encoding='UTF-8') as emba_github_version_file: + with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_GITHUB_HASH.txt"), 'r', encoding='UTF-8') as emba_github_version_file: github_emba_version = emba_github_version_file.read().splitlines()[0] else: stable_emba_version = "" @@ -82,13 +83,13 @@ def get_version_strings(): github_emba_version = "" if Path(EMBA_ROOT + "/config/VERSION.txt").exists(): - with open(Path(EMBA_ROOT + "/config/VERSION.txt"),'r', encoding='UTF-8') as emba_version_file: + with open(Path(EMBA_ROOT + "/config/VERSION.txt"), 'r', encoding='UTF-8') as emba_version_file: emba_version = emba_version_file.read().splitlines()[0] else: emba_version = "" if Path("./VERSION.txt").exists(): - with open(Path("./VERSION.txt"),'r', encoding='UTF-8') as embark_version_file: + with open(Path("./VERSION.txt"), 'r', encoding='UTF-8') as embark_version_file: embark_version = embark_version_file.read().splitlines()[0] else: embark_version = "" diff --git a/embark/embark/settings/dev.py b/embark/embark/settings/dev.py index eecb9e06e..5395b3222 100644 --- a/embark/embark/settings/dev.py +++ b/embark/embark/settings/dev.py @@ -142,7 +142,7 @@ 'level': 'WARNING', 'handlers': ['info_handler', 'console_handler'], }, - 'updater': { + 'updater': { 'handlers': ['debug_handler', 'info_handler', 'console_handler'], 'level': 'DEBUG', }, diff --git a/embark/templates/updater/check.html b/embark/templates/updater/check.html index 5b3e2ddd1..2748adb15 100644 --- a/embark/templates/updater/check.html +++ b/embark/templates/updater/check.html @@ -1,8 +1,6 @@ {% load django_bootstrap5 %}
    - -
    {% csrf_token %}
    @@ -11,5 +9,4 @@
    -
    diff --git a/embark/updater/models.py b/embark/updater/models.py deleted file mode 100644 index 71a836239..000000000 --- a/embark/updater/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/embark/updater/views.py b/embark/updater/views.py index 1de1493fd..7c45c6393 100644 --- a/embark/updater/views.py +++ b/embark/updater/views.py @@ -24,7 +24,7 @@ def updater_home(request): emba_check_form = CheckForm() # get into the progress.html f"{settings.EMBA_LOG_ROOT}/emba_check.html" try: - with open(f"{settings.EMBA_LOG_ROOT}/emba_check.html", 'r') as in_file_: + with open(f"{settings.EMBA_LOG_ROOT}/emba_check.html", 'r', encoding='UTF-8') as in_file_: log_content = in_file_.read() except FileNotFoundError: logger.error('No dep check file exists yet') @@ -49,8 +49,9 @@ def check_update(request): form = CheckForm(request.POST) if form.is_valid(): option = form.cleaned_data["option"] + check_option = 1 if option == 'BOTH': - check_option = 1 + pass elif option == 'CONTAINER': check_option = 2 logger.debug("Got option %d for emba dep check", check_option) @@ -104,6 +105,7 @@ def progress(request): """ return render(request, 'updater/progress.html', {}) + @csrf_protect @require_http_methods(["GET"]) @login_required(login_url='/' + settings.LOGIN_URL) diff --git a/embark/uploader/boundedexecutor.py b/embark/uploader/boundedexecutor.py index 6e6af4911..d80f07645 100644 --- a/embark/uploader/boundedexecutor.py +++ b/embark/uploader/boundedexecutor.py @@ -375,7 +375,7 @@ def emba_check(cls, option): try: cmd = f"{EMBA_SCRIPT_LOCATION} -d{option} | ansifilter -H -o {settings.EMBA_LOG_ROOT}/emba_check.html -s 5pt" - with open(f"{settings.EMBA_LOG_ROOT}/emba_check.log", "w+", encoding="utf-8") as file: # File should be empty + with open(f"{settings.EMBA_LOG_ROOT}/emba_check.log", "w+", encoding="utf-8") as file: proc = Popen(cmd, stdin=PIPE, stdout=file, stderr=file, shell=True) # nosec # wait for completion proc.communicate() @@ -396,7 +396,6 @@ def emba_check(cls, option): "message": {f"EMBA dep check {option}": return_code} } ) - @classmethod def submit_zip(cls, uuid): From 745dbb4948546043db62dbefc0475d551431251c Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Thu, 11 Jul 2024 05:13:19 +0000 Subject: [PATCH 17/18] enable updater in prod --- embark/embark/settings/deploy.py | 11 ++++++++++- embark/embark/settings/dev.py | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/embark/embark/settings/deploy.py b/embark/embark/settings/deploy.py index fe84f1278..f2021c54b 100644 --- a/embark/embark/settings/deploy.py +++ b/embark/embark/settings/deploy.py @@ -12,6 +12,8 @@ from dotenv import load_dotenv +from embark.helper import get_version_strings + # load .env file load_dotenv() @@ -56,7 +58,8 @@ 'reporter', 'dashboard', 'tracker', - 'porter' + 'porter', + 'updater' ] AUTH_USER_MODEL = 'users.User' @@ -193,6 +196,10 @@ 'handlers': ['debug_handler', 'info_handler', 'console_handler'], 'level': 'INFO', }, + 'updater': { + 'handlers': ['debug_handler', 'info_handler', 'console_handler'], + 'level': 'DEBUG', + }, 'embark': { 'handlers': ['debug_handler', 'info_handler', 'console_handler'], 'level': 'INFO', @@ -325,3 +332,5 @@ def count_emba_modules(emba_dir_path): EMBA_P_MOD_CNT = 18 EMBA_F_MOD_CNT = 4 EMBA_L_MOD_CNT = 8 + +VERSION = get_version_strings() diff --git a/embark/embark/settings/dev.py b/embark/embark/settings/dev.py index 5395b3222..a9fd260b5 100644 --- a/embark/embark/settings/dev.py +++ b/embark/embark/settings/dev.py @@ -145,7 +145,7 @@ 'updater': { 'handlers': ['debug_handler', 'info_handler', 'console_handler'], 'level': 'DEBUG', - }, + }, 'uploader': { 'handlers': ['debug_handler', 'info_handler', 'console_handler'], 'level': 'DEBUG', From ce0132cb8eb1e13d1695e359831e40f4feeb96fa Mon Sep 17 00:00:00 2001 From: BenediktMKuehne Date: Thu, 11 Jul 2024 15:17:31 +0000 Subject: [PATCH 18/18] fix settings import --- embark/embark/helper.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/embark/embark/helper.py b/embark/embark/helper.py index 0028b0de6..872e05ed8 100644 --- a/embark/embark/helper.py +++ b/embark/embark/helper.py @@ -6,8 +6,7 @@ import os from pathlib import Path -# from embark.settings.deploy import EMBA_ROOT -EMBA_ROOT = os.path.join('/home/benedikt/embark', 'emba') +from django.conf import settings def rnd_rgb_color(): @@ -66,15 +65,15 @@ def cleanup_charfield(charfield) -> str: def get_version_strings(): # gets us the currently installed version - if Path(EMBA_ROOT + "/external/onlinechecker").exists(): + if Path(settings.EMBA_ROOT + "/external/onlinechecker").exists(): # get the latest version nnumbers - with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_VERSION.txt"), 'r', encoding='UTF-8') as emba_version_file: + with open(Path(settings.EMBA_ROOT + "/external/onlinechecker/EMBA_VERSION.txt"), 'r', encoding='UTF-8') as emba_version_file: stable_emba_version = emba_version_file.read().splitlines()[0] - with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_CONTAINER_HASH.txt"), 'r', encoding='UTF-8') as container_version_file: + with open(Path(settings.EMBA_ROOT + "/external/onlinechecker/EMBA_CONTAINER_HASH.txt"), 'r', encoding='UTF-8') as container_version_file: container_version = container_version_file.read().splitlines()[0] - with open(Path(EMBA_ROOT + "/external/onlinechecker/NVD_HASH.txt"), 'r', encoding='UTF-8') as nvd_version_file: + with open(Path(settings.EMBA_ROOT + "/external/onlinechecker/NVD_HASH.txt"), 'r', encoding='UTF-8') as nvd_version_file: nvd_version = nvd_version_file.read().splitlines()[0] - with open(Path(EMBA_ROOT + "/external/onlinechecker/EMBA_GITHUB_HASH.txt"), 'r', encoding='UTF-8') as emba_github_version_file: + with open(Path(settings.EMBA_ROOT + "/external/onlinechecker/EMBA_GITHUB_HASH.txt"), 'r', encoding='UTF-8') as emba_github_version_file: github_emba_version = emba_github_version_file.read().splitlines()[0] else: stable_emba_version = "" @@ -82,8 +81,8 @@ def get_version_strings(): nvd_version = "" github_emba_version = "" - if Path(EMBA_ROOT + "/config/VERSION.txt").exists(): - with open(Path(EMBA_ROOT + "/config/VERSION.txt"), 'r', encoding='UTF-8') as emba_version_file: + if Path(settings.EMBA_ROOT + "/config/VERSION.txt").exists(): + with open(Path(settings.EMBA_ROOT + "/config/VERSION.txt"), 'r', encoding='UTF-8') as emba_version_file: emba_version = emba_version_file.read().splitlines()[0] else: emba_version = ""