KasperskyLab / TinyCheck

TinyCheck allows you to easily capture network communications from a smartphone or any device which can be associated to a Wi-Fi access point in order to quickly analyze them. This can be used to check if any suspect or malicious communication is outgoing from a smartphone, by using heuristics or specific Indicators of Compromise (IoCs). In order to make it working, you need a computer with a Debian-like operating system and two Wi-Fi interfaces. The best choice is to use a Raspberry Pi (2+) a Wi-Fi dongle and a small touch screen. This tiny configuration (for less than $50) allows you to tap any Wi-Fi device, anywhere.
Apache License 2.0
3.08k stars 222 forks source link

Error 500 with backend and frontend after install: Vue.js don't build src files with Ubuntu 22.04 #114

Open jujax opened 1 year ago

jujax commented 1 year ago

Hello, I'm trying Tinycheck (commit 52a705e0c7747467970987ea7a15f0012ea446e4) on a computer running Ubuntu 22.04

I installed it with sudo bash install.sh command and after reboot both front and backend return error 500.

Journalctl return this error:

oct. 05 15:40:16 tinycheck python3[10275]: [2022-10-05 15:40:16,585] ERROR in app: Exception on / [GET] oct. 05 15:40:16 tinycheck python3[10275]: Traceback (most recent call last): oct. 05 15:40:16 tinycheck python3[10275]: File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 2525, in wsgi_app oct. 05 15:40:16 tinycheck python3[10275]: response = self.full_dispatch_request() oct. 05 15:40:16 tinycheck python3[10275]: File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1822, in full_dispatch_request oct. 05 15:40:16 tinycheck python3[10275]: rv = self.handle_user_exception(e) oct. 05 15:40:16 tinycheck python3[10275]: File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1820, in full_dispatch_request oct. 05 15:40:16 tinycheck python3[10275]: rv = self.dispatch_request() oct. 05 15:40:16 tinycheck python3[10275]: File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1796, in dispatch_request oct. 05 15:40:16 tinycheck python3[10275]: return self.ensure_sync(self.view_functions[rule.endpoint])(*view_args) oct. 05 15:40:16 tinycheck python3[10275]: File "/usr/local/lib/python3.10/dist-packages/flask_httpauth.py", line 172, in decorated oct. 05 15:40:16 tinycheck python3[10275]: return self.ensure_sync(f)(args, **kwargs) oct. 05 15:40:16 tinycheck python3[10275]: File "/usr/share/tinycheck/server/backend/main.py", line 27, in main oct. 05 15:40:16 tinycheck python3[10275]: return render_template("index.html") oct. 05 15:40:16 tinycheck python3[10275]: File "/usr/local/lib/python3.10/dist-packages/flask/templating.py", line 146, in render_template oct. 05 15:40:16 tinycheck python3[10275]: template = app.jinja_env.get_or_select_template(template_name_or_list) oct. 05 15:40:16 tinycheck python3[10275]: File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1068, in get_or_select_template oct. 05 15:40:16 tinycheck python3[10275]: return self.get_template(template_name_or_list, parent, globals) oct. 05 15:40:16 tinycheck python3[10275]: File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 997, in get_template oct. 05 15:40:16 tinycheck python3[10275]: return self._load_template(name, globals) oct. 05 15:40:16 tinycheck python3[10275]: File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 958, in _load_template oct. 05 15:40:16 tinycheck python3[10275]: template = self.loader.load(self, name, self.make_globals(globals)) oct. 05 15:40:16 tinycheck python3[10275]: File "/usr/lib/python3/dist-packages/jinja2/loaders.py", line 125, in load oct. 05 15:40:16 tinycheck python3[10275]: source, filename, uptodate = self.get_source(environment, name) oct. 05 15:40:16 tinycheck python3[10275]: File "/usr/local/lib/python3.10/dist-packages/flask/templating.py", line 62, in get_source oct. 05 15:40:16 tinycheck python3[10275]: return self._get_source_fast(environment, template) oct. 05 15:40:16 tinycheck python3[10275]: File "/usr/local/lib/python3.10/dist-packages/flask/templating.py", line 98, in _get_source_fast oct. 05 15:40:16 tinycheck python3[10275]: raise TemplateNotFound(template) oct. 05 15:40:16 tinycheck python3[10275]: jinja2.exceptions.TemplateNotFound: index.html oct. 05 15:40:16 tinycheck python3[10275]: 127.0.0.1 - - [05/Oct/2022 15:40:16] "GET / HTTP/1.1" 500 -

Files are not builded in app part I fix it by building files in /usr/share/tinycheck/app/backend and /usr/share/tinycheck/app/frontend with npm install && sudo npm run build and it's working well (I can't build without sudo)

ldina commented 1 year ago

I used your suggestion for a Debian based installation and it worked