mirror of
https://github.com/MobSF/Mobile-Security-Framework-MobSF.git
synced 2026-10-12 02:06:59 +00:00
post install check (#1541)
A check to verify that python requirements are installed after install. Exodus Tracker DB update
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ logger = logging.getLogger(__name__)
|
||||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
|
||||
MOBSF_VER = 'v3.1.4 Beta'
|
||||
MOBSF_VER = 'v3.1.5 Beta'
|
||||
|
||||
BANNER = """
|
||||
__ __ _ ____ _____ _____ _
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import platform
|
||||
|
||||
from pkg_resources import (
|
||||
DistributionNotFound,
|
||||
VersionConflict,
|
||||
require,
|
||||
)
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
plat = platform.system() != 'Windows'
|
||||
red = '\033[91m' if plat else ''
|
||||
end = '\033[0m' if plat else ''
|
||||
bold = '\033[1m' if plat else ''
|
||||
req = Path(__file__).resolve().parents[1] / 'requirements.txt'
|
||||
dependencies = req.read_text().splitlines()
|
||||
|
||||
try:
|
||||
require(dependencies)
|
||||
except VersionConflict:
|
||||
pass
|
||||
except DistributionNotFound as exp:
|
||||
print(f'{red}{bold}[ERROR] Installation Failed!{end}{red}\n'
|
||||
f'Please ensure that all the requirements '
|
||||
f'mentioned in documentation are installed '
|
||||
f'before you run setup script.\nScroll up to see any '
|
||||
f'installtion errors.\n\n{exp}{end}')
|
||||
exit(1)
|
||||
@@ -67,6 +67,7 @@ where python >nul 2>&1 && (
|
||||
python manage.py migrate
|
||||
echo Download and Install wkhtmltopdf for PDF Report Generation - https://wkhtmltopdf.org/downloads.html
|
||||
echo [INSTALL] Installation Complete
|
||||
python scripts/check_install.py
|
||||
) || (
|
||||
echo [ERROR] python3 is not installed
|
||||
)
|
||||
|
||||
@@ -87,3 +87,4 @@ if ! [ $? -eq 0 ]; then
|
||||
echo 'Download and Install wkhtmltopdf for PDF Report Generation - https://wkhtmltopdf.org/downloads.html'
|
||||
fi
|
||||
echo '[INSTALL] Installation Complete'
|
||||
python scripts/check_install.py
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user