-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnuke.sh
50 lines (41 loc) · 1.91 KB
/
nuke.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
echo -e "\033[31m"
echo " ________ __ __________.__ _______ __ "
echo " \______ \ _____/ |\____ /|__|_____ \ \ __ __| | __ ____ "
echo " | | \ / _ \ __\/ / | \____ \ / | \| | \ |/ // __ \ "
echo " | | ( <_> ) | / /_ | | |_> > | \ | / <\ ___/ "
echo " /_______ /\____/|__|/_______ \|__| __/\____|__ /____/|__|_ \\\___ > "
echo " \/ \/ |__| \/ \/ \/ "
echo -e "\033[0m "
#!/bin/bash
if [ ! -d "/home/sscan" ]
then
mkdir /home/sscan
chmod 755 /home/sscan
fi
if [ ! -d "/home/sscan/backLogs" ]
then
mkdir /home/sscan/backLogs
chmod 755 /home/sscan/backLogs
fi
fileBackLog="$(date +%y%m%d%H%M)_backfind.log"
echo $fileBackLog
echo -e "\e[093;1mFinding Akeeba Backups...\e[0m"
find /home*/*/public_html/*/administrator/components/com_akeeba/backup/ -name '*.zip*' >> backupsfound.log
find /home*/*/public_html/administrator/components/com_akeeba/backup/ -name '*.zip*' >> backupsfound.log
echo -e "\e[092;1mFinished Akeeba Backups\e[0m"
echo -e "\e[093;1mFinding Backup Buddy Backups...\e[0m"
find /home*/*/public_html/*/wp-content/uploads/backupbuddy_backups/ -name '*.zip' >> backupsfound.log
find /home*/*/public_html/wp-content/uploads/backupbuddy_backups/ -name '*.zip' >> backupsfound.log
echo -e "\e[092;1mFinished Backup Buddy Backups\e[0m"
echo -e "\e[093;1mFinding Large Zip files. (DotZipNuke)...\e[0m"
find /home*/* -type f -name '*.zip*' -size +100M >> backupsfound.log
echo -e "\e[093;1mFinding Large error logs....\e[0m"
find /home*/* -type f -name 'error_log' -size +100M >> backupsfound.log
echo -e "\e[093;1mDone! Check backupsfound.log\e[0m"
for file in `cat backupsfound.log | cut -d":" -f1`
do
ls -lh $file | awk '{print $5,$9;}' >> /home/sscan/backLogs/$fileBackLog
done
echo "Results can be found in /home/sscan/backLogs/"$fileBackLog
echo "Done!"