diff --git a/scripts/clean.bat b/scripts/clean.bat index 5cba4b74..cc94d8d4 100644 --- a/scripts/clean.bat +++ b/scripts/clean.bat @@ -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 diff --git a/setup.bat b/setup.bat index 84467917..4c19c7bd 100644 --- a/setup.bat +++ b/setup.bat @@ -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/yara-python.git@v3.11.0 + 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/yara-python.git@v3.11.0" 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