mirror of
https://github.com/MobSF/Mobile-Security-Framework-MobSF.git
synced 2026-10-12 02:06:59 +00:00
35 lines
1.0 KiB
Bash
Executable File
35 lines
1.0 KiB
Bash
Executable File
echo
|
|
echo "=======================MobSF Clean Script for Unix======================="
|
|
echo "Running this script will delete the Scan database, all files uploaded and generated."
|
|
|
|
if [ "$1" != "" ]; then
|
|
VAL="$1"
|
|
else
|
|
read -p "Continue? (Y/N): " confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1
|
|
VAL=$confirm
|
|
fi
|
|
echo
|
|
if [[ $VAL =~ ^[Yy]$ ]]
|
|
then
|
|
echo "Deleting all Uploads"
|
|
rm -rf ../uploads/*
|
|
echo "Deleting all Downloads"
|
|
rm -rf ../downloads/*
|
|
echo "Deleting Static Analyzer Migrations"
|
|
rm -rf ../StaticAnalyzer/migrations/*
|
|
echo "Deleting Dynamic Analyzer Migrations"
|
|
rm -rf ../DynamicAnalyzer/migrations/*
|
|
echo "Deleting MobSF Migrations"
|
|
rm -rf ../MobSF/migrations/*
|
|
echo "Deleting python byte code files"
|
|
find ../ -name "*.pyc" -exec rm -rf {} \;
|
|
find ../ | grep -E "(__pycache__|\.pyo$)" | xargs rm -rf
|
|
echo "Deleting temp and log files"
|
|
rm -rf ../logs/*
|
|
rm -rf ../classes-error.zip
|
|
echo "Deleting DB"
|
|
rm -rf ../db.sqlite3
|
|
echo "Deleting Secret File"
|
|
rm -rf ../secret
|
|
echo "Done"
|
|
fi |