forked from rohsec/LEAKEY
-
Notifications
You must be signed in to change notification settings - Fork 0
/
leakey.sh
executable file
·85 lines (79 loc) · 4.12 KB
/
leakey.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
#!/bin/bash
#########################################################
# CONSTANTS #
#########################################################
bred='\033[1;31m'
bblue='\033[1;34m'
bgreen='\033[1;32m'
yellow='\033[0;33m'
red='\033[0;31m'
blue='\033[0;34m'
green='\033[0;32m'
reset='\033[0m'
sign_dir=~/.leakey/signatures.json
#########################################################
# Logo #
#########################################################
logo(){
printf """
██╗ ███████╗ █████╗ ██╗ ██╗███████╗██╗ ██╗
██║ ██╔════╝██╔══██╗██║ ██╔╝██╔════╝╚██╗ ██╔╝
██║ █████╗ ███████║█████╔╝ █████╗ ╚████╔╝
██║ ██╔══╝ ██╔══██║██╔═██╗ ██╔══╝ ╚██╔╝
███████╗███████╗██║ ██║██║ ██╗███████╗ ██║
╚══════╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═╝ $bblue v1.0$reset
═══════ 🔑 Check for the leaked credentials 🔑 ═══════
╔═════════════════════════════════════════════════════╗
Developed BY: 𝝘𝝝𝝜𝗦𝝨𝗖 (https://twitter.com/rohsec)
╚═════════════════════════════════════════════════════╝
"""
}
#########################################################
# Engine Core Logic #
#########################################################
main(){
if [ -f $sign_dir ]
then
declare -A x1=()
printf "\n$bblue═════════$bred Leaks Menu$bblue ═════════\n$reset"
cat $sign_dir|jq -r '.[] | "\(.id) - \(.name)"'
printf "\n${bblue}Enter Choice :$bred"
read choice
printf "$blue═══════════════════════════════════════"
if [[ $choice != "" ]] && [[ $choice =~ ^[-+]?[0-9]+$ ]] && [ $choice -lt $(cat $sign_dir|jq length) ]
then
select_choice=$(cat $sign_dir|jq -r --arg choice1 "$choice" '.['$choice']|.name')
printf "\n${bblue}Selected Leaks : $bred $select_choice $reset\n\n"
for i in $(cat $sign_dir|jq -r --arg choice1 "$choice" '.['$choice']|.args[]')
do
read -rep "[ + ] Enter $i : " zz
x1[$i]+=$zz
done
cmd=$(cat $sign_dir|jq -r --arg choice1 "$choice" '.['$choice'] |.command')
printf "$blue═══════════════════════════════════════\n"
for i in ${!x1[@]}
do
printf "$bgreen[ ✔ ] $bblue$i $yellow=> $bred${x1[$i]}$reset\n"
cmd=$(echo $cmd|sed "s|\$$i|${x1[$i]}|g")
done
printf "$bgreen[ ✔ ]$bblue Generating POC request...$reset"
printf "\n$bgreen[ ✔ ]$bblue Performing request...$reset\n"
sleep 2
printf "\n${yellow}Request:$blue\n═══════════════════════════════════════$reset"
printf "\n$cmd"
resp=$(eval "$cmd")
printf "\n\n${yellow}Response:$blue\n═══════════════════════════════════════$reset"
printf "\n$resp"
else
printf "\n${yellow}Invalid Input!!"
fi
else
printf "\n$bred[ ! ]$yellow No valid signatures found!! Please run installer command first$reset\n\thttps://github.com/rohsec/LEAKY"
fi
}
#########################################################
# Main Script #
# #
#########################################################
logo
main