-
Notifications
You must be signed in to change notification settings - Fork 0
/
hackDWUWiFiServer.sh
65 lines (57 loc) · 1.51 KB
/
hackDWUWiFiServer.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
#!/usr/bin/env bash
function xtitle() {
case "$TERM" in
*term* | rxvt)
echo -en "\e]0;$*\a" ;;
*) ;;
esac
}
xtitle The hell manual
is_mongo=1
[[ -z $(which mongo) ]] && { is_mongo=0; }
is_node=1
[[ -z $(which node ) ]] && { is_node=0; }
is_nodemon=1
[[ -z $(which nodemon) ]] && { is_nodemon=0; }
echo -e "
\e[0;31m !!! WARNING !!!\e[0m
\e[1;31m This script will hack into the DWU-Hotspot WiFi.\e[0m
"
echo "checking utils..."
if [[ $is_mongo == 0 ]]; then
echo -e "\e[0;33m Error: mongo is not installed!\e[0m"
pause
elif [[ $is_node == 0 ]]; then
echo -e "\e[0;33m Error: node is not installed!\e[0m"
pause
elif [[ $is_nodeomon ]]; then
echo -e "\e[0;33m Error: nodemon is not installed!\e[0m"
pause
else
echo "All utils present"
echo "Initializing utils..."
function start_mongo {
echo -e "Starting mongod";
# open cmd on another terminal console and start mongod
mongoDir='/c/Program Files/MongoDB/Server/3.2/bin/'
if [ -d $mongoDir ]; then
$(mongod --config '/c/Program Files/MongoDB/Server/3.2/bin/mongodb.config')
# if [[ $mongoDir -ge 11 ]]; then
# mongod --config mongodb.config
# fi
else
filename=start_mongod.bat
if [[ -e $filename ]]; then
cmd ${filename}
else
echo "File $filename not found."
fi
fi
echo -e "\nmongod started successfuly"
}
# start_mongo
cd ~/WebstormProjects/hacking-cracking-tools
echo -e "Initializing server...\n"
script="hackDWUWiFiServer.js"
nodemon ${script}
fi