Files
Mobile-Security-Framework-M…/scripts/clean.bat
T
Ajin Abraham 76cd47d851 HOTFIX: Setup improvement (#2078)
* Improve setup scripts.
* Python support to 3.8 - 3.10
* Delete MobSF data directory on running setup.
* Bump applicable dependencies.
2022-11-22 16:01:34 -08:00

35 lines
1.2 KiB
Batchfile

@echo off
echo =======================MobSF Clean Script for Windows=======================
echo Running this script will delete the Scan database, all files uploaded and generated.
SET mobsf_home="%userprofile%\.MobSF"
SET mypath=%~dp0
echo %mypath:~0,-1%
IF "%~1"=="y" (
echo Deleting all uploads
rmdir "mobsf\uploads" /q /s >nul 2>&1
echo Deleting all downloads
rmdir "mobsf\downloads" /q /s >nul 2>&1
echo Deleting Static Analyzer migrations
rmdir "mobsf\StaticAnalyzer\migrations" /q /s >nul 2>&1
echo Deleting Dynamic Analyzer migrations
rmdir "mobsf\DynamicAnalyzer\migrations" /q /s >nul 2>&1
echo Deleting MobSF migrations
rmdir "mobsf\MobSF\migrations" /q /s >nul 2>&1
echo Deleting temp and log files
del /f "mobsf\debug.log" >nul 2>&1
del /f "classes*" >nul 2>&1
echo Deleting Scan database
del /f "mobsf\db.sqlite3" >nul 2>&1
echo Deleting Secret file
del /f "mobsf\secret" >nul 2>&1
echo Deleting Previous setup files
rmdir "%UserProfile%\MobSF" /q /s >nul 2>&1
del /f "mobsf\setup_done.txt" >nul 2>&1
echo Deleting MobSF data directory: %mobsf_home%
del /f "%mobsf_home%" /q /s >nul 2>&1
echo Done
) ELSE (
echo Please run script from mobsf.MobSF directory
echo 'scripts/clean.bat y
)