forked from screetsec/TheFatRat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update
112 lines (111 loc) · 3.83 KB
/
update
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/bin/bash
clear
cyan='\e[0;36m'
green='\e[0;32m'
lightgreen='\e[1;32m'
white='\e[1;37m'
red='\e[1;31m'
yellow='\e[1;33m'
blue='\e[1;34m'
purple='\e[1;35m'
path=`pwd`
function chknet() {
echo -e $red "[X] Your Internet is not working correctly!"
sleep 1
echo -e $cyan "[*] Checking ...."
ping -c 1 8.8.4.4 > /dev/null 2>&1
png="$?"
if [ $png == "0" ]
then
echo -e $red "[X] Your linux OS is not able to resolve"
echo -e $red "hostnames over terminal using ping !!"
echo ""
echo -e $yellow "Search on the web : (unable to resolve hostnames ping) to find a solution"
echo ""
echo -e $green "Update will continue , but is not garantee that cloud work properly."
echo ""
echo -e $cyan "Update will continue because :"
echo -e $green "Ping google.com =$red Failed"
echo -e $green "Ping google DNS = Success"
echo ""
echo -e $green "Press [ENTER] key to continue"
read continue
sleep 1
elif [ $png == "1" ]
then
echo -e $yellow "You are connected to your local network but not to the web ."
echo -e $yellow "Check if your router/modem gateway is connected to the web ."
echo ""
echo -e $green "Update will not continue , you are only connected to your local lan."
echo ""
echo -e $cyan "Update will stop because :"
echo -e $green "Ping google.com =$red Failed"
echo -e $green "Ping google DNS =$red Failed"
echo ""
echo -e $green "Press [ENTER] key to continue"
read continue
exit 1
sleep 1
elif [ $png == "2" ]
then
echo -e $red "You are not connected to any network ."
echo ""
echo -e $cyan "Update will stop because :"
echo -e $green "Ping google.com =$red Failed"
echo -e $green "Ping google DNS =$red Failed"
echo ""
echo -e $green "Press [ENTER] key to continue"
read continue
exit 1
sleep 1
fi
}
ping -c 1 google.com > /dev/null 2>&1
png="$?"
if [ $png != 0 ]
then
chknet
fi
sleep 1
find . -type f -name "*.md" -exec rm -f {} \; > /dev/null 2>&1
rm -f $path/temp/* >/dev/null 2>&1
mkdir /tmp/frupdate > /dev/null 2>&1
mkdir /tmp/frupdate/autorun > /dev/null 2>&1
mkdir /tmp/frupdate/backdoored > /dev/null 2>&1
mkdir /tmp/frupdate/backdoored/output > /dev/null 2>&1
mkdir /tmp/frupdate/config > /dev/null 2>&1
mkdir /tmp/frupdate/config/listeners > /dev/null 2>&1
mkdir /tmp/frupdate/logs > /dev/null 2>&1
mkdir /tmp/frupdate/output > /dev/null 2>&1
mv $path/autorun/* /tmp/frupdate/autorun/ >/dev/null 2>&1
mv $path/backdoored/* /tmp/frupdate/backdoored/ >/dev/null 2>&1
mv $path/backdoored/output/* /tmp/frupdate/backdoored/output/ >/dev/null 2>&1
mv $path/config/config.path /tmp/frupdate/config/ >/dev/null 2>&1
mv $path/config/grab.conf /tmp/frupdate/config/ >/dev/null 2>&1
mv $path/config/listeners/* /tmp/frupdate/config/listeners/ >/dev/null 2>&1
mv $path/logs/* /tmp/frupdate/logs/ >/dev/null 2>&1
mv $path/output/* /tmp/frupdate/output/ >/dev/null 2>&1
echo -e $cyan "************************************"
echo -e $cyan "** $green Updating Fatrat from Github $cyan **"
echo -e $cyan "************************************"
sleep 3
git reset HEAD --hard
git pull origin master
mv /tmp/frupdate/autorun/* $path/autorun/ >/dev/null 2>&1
mv /tmp/frupdate/backdoored/* $path/backdoored/ >/dev/null 2>&1
mv /tmp/frupdate/backdoored/output/* $path/backdoored/output/ >/dev/null 2>&1
mv /tmp/frupdate/config/config.path $path/config/ >/dev/null 2>&1
mv /tmp/frupdate/config/grab.conf $path/config/ >/dev/null 2>&1
mv /tmp/frupdate/config/listeners/* $path/config/listeners/ >/dev/null 2>&1
mv /tmp/frupdate/logs/* $path/logs/ >/dev/null 2>&1
mv /tmp/frupdate/output/* $path/output/ >/dev/null 2>&1
rm -fr /tmp/frupdate >/dev/null 2>&1
chmod +x fatrat >/dev/null 2>&1
chmod +x setup.sh >/dev/null 2>&1
chmod +x powerfull.sh >/dev/null 2>&1
chmod +x grab.sh >/dev/null 2>&1
chmod +x update >/dev/null 2>&1
chmod +x backdoor_apk >/dev/null 2>&1
echo -e $cyan "*************************"
echo -e $cyan "** $green Update Completed $cyan **"
echo -e $cyan "*************************"