mirror of
https://github.com/MobSF/Mobile-Security-Framework-MobSF.git
synced 2026-10-11 22:50:09 +00:00
HOTFIX: win setup fail fast. Fixes #1352
This commit is contained in:
+11
-11
@@ -5,25 +5,25 @@ SET mypath=%~dp0
|
||||
echo %mypath:~0,-1%
|
||||
IF "%~1"=="y" (
|
||||
echo Deleting all Uploads
|
||||
rmdir "uploads" /q /s
|
||||
rmdir "uploads" /q /s >nul 2>&1
|
||||
echo Deleting all Downloads
|
||||
rmdir "downloads" /q /s
|
||||
rmdir "downloads" /q /s >nul 2>&1
|
||||
echo Deleting Static Analyzer Migrations
|
||||
rmdir "StaticAnalyzer\migrations" /q /s
|
||||
rmdir "StaticAnalyzer\migrations" /q /s >nul 2>&1
|
||||
echo Deleting Dynamic Analyzer Migrations
|
||||
rmdir "DynamicAnalyzer\migrations" /q /s
|
||||
rmdir "DynamicAnalyzer\migrations" /q /s >nul 2>&1
|
||||
echo Deleting MobSF Migrations
|
||||
rmdir "MobSF\migrations" /q /s
|
||||
rmdir "MobSF\migrations" /q /s >nul 2>&1
|
||||
echo Deleting temp and log files
|
||||
rmdir "logs" /q /s
|
||||
del /f "classes*""
|
||||
rmdir "logs" /q /s >nul 2>&1
|
||||
del /f "classes*" >nul 2>&1
|
||||
echo Deleting DB
|
||||
del /f "db.sqlite3"
|
||||
del /f "db.sqlite3" >nul 2>&1
|
||||
echo Deleting Secret File
|
||||
del /f "secret"
|
||||
del /f "secret" >nul 2>&1
|
||||
echo Deleting Previous Setup files
|
||||
rmdir "%UserProfile%\MobSF" /q /s
|
||||
del /f "setup_done.txt"
|
||||
rmdir "%UserProfile%\MobSF" /q /s >nul 2>&1
|
||||
del /f "setup_done.txt" >nul 2>&1
|
||||
echo Done
|
||||
) ELSE (
|
||||
echo Please run script from MobSF directory
|
||||
|
||||
@@ -30,19 +30,28 @@ where python >nul 2>&1 && (
|
||||
)
|
||||
|
||||
echo [INSTALL] Using venv
|
||||
rmdir "venv" /q /s
|
||||
rmdir "venv" /q /s >nul 2>&1
|
||||
python -m venv ./venv
|
||||
.\venv\Scripts\activate
|
||||
python -m pip install --upgrade pip
|
||||
|
||||
set LIB=C:\Program Files\OpenSSL-Win64\lib;%LIB%
|
||||
set INCLUDE=C:\Program Files\OpenSSL-Win64\include;%INCLUDE%
|
||||
|
||||
echo [INSTALL] Installing dex enabled yara-python
|
||||
pip install --upgrade wheel
|
||||
rmdir /q /s yara-python
|
||||
pip wheel --wheel-dir=yara-python --build-option="build" --build-option="--enable-dex" git+https://github.com/VirusTotal/[email protected]
|
||||
rmdir /q /s yara-python >nul 2>&1
|
||||
pip wheel --wheel-dir=yara-python --build-option="build" --build-option="--enable-dex" "git+https://github.com/VirusTotal/[email protected]"
|
||||
pip install --no-index --find-links=yara-python yara-python
|
||||
rmdir /q /s yara-python
|
||||
rmdir /q /s yara-python >nul 2>&1
|
||||
pip install apkid==2.1.0
|
||||
echo [INSTALL] Running APKiD Test
|
||||
apkid DynamicAnalyzer\tools\onDevice\mobsf_agents\ClipDump.apk
|
||||
if %errorlevel% neq 0 (
|
||||
echo [ERROR] APKiD installation failed. Have you installed Visual Studio BuildTools?
|
||||
pause
|
||||
exit /b %errorlevel%
|
||||
)
|
||||
|
||||
echo [INSTALL] Installing Requirements
|
||||
pip install -r requirements.txt
|
||||
|
||||
Reference in New Issue
Block a user