-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdecryptHash_v2.sh
141 lines (130 loc) · 2.7 KB
/
decryptHash_v2.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
#!/bin/bash
BLUE="\033[0;34m"
GREEN="\033[0;32m"
RED="\033[0;31m"
PURPLE="\033[0;35m"
YELLOW="\033[1;33m"
NC="\033[0m"
wordList=""
hash=""
typeHash=""
setWordList() {
local selectWordList="0"
#wordList=""
echo -e "$YELLOW[*] Use our wordList or yours:"
echo -e "$PURPLE [+] 1 - Our WordList"
echo -e " [+] 2 - Your WordList"
read -p "$(echo -e -n "$NC Select Option: ")" resp
case $resp in
"2")
read -p "$(echo -e -n "$YELLOW[+] Set your WordList: ")" answer
#read answer
wordList="$answer"
;;
"1")
echo -e "$GREEN[+] WordList select: $PURPLE 10M_password.txt"
wordList="10M_password.txt"
;;
*)
echo -e "$RED[-] Choose only one of the options above"
echo -e "$YELLOW bye!"
exit 0
;;
esac
}
main() {
#ARRAY=()
stop="1"
count=0
while [ $stop -eq "1" ]
do
if [ $count == 0 ]
then
echo -e "$BLUE============================"
echo -e "$PURPLE[*] Decrypt Password Hash"
echo -e "$PURPLE[*] by: Gabriel"
echo -e "$BLUE============================"
echo -e ""
echo -e ""
else
echo -e ""
fi
echo -e "$BLUE============================"
echo -e "$YELLOW[*] OPTIONS:"
if [ "$wordList" == "" ]
then
echo -e "$PURPLE [+] 1 - Set wordlist"
else
echo -e "$PURPLE [+] 1 - Set wordlist: $wordList"
fi
if [ "$hash" == "" ]
then
echo -e " [+] 2 - Set Hash"
else
echo -e " [+] 2 - Set Hash: $hash"
fi
if [ "$typeHash" == "" ]
then
echo -e " [+] 3 - Set type Hash"
else
echo -e " [+] 3 - Set type Hash: $typeHash"
fi
echo -e " [+] 4 - Help"
echo -e " [+] 5 - Exit"
echo -e "$BLUE============================"
read -p "$( echo -e -n "$NC Select Option: ")" returnUser
case $returnUser in
"1")
setWordList
#echo "$wordList"
;;
"2")
read -p "$( echo -e -n "$NC Set Hash: ")" returnHash
hash=$returnHash
;;
"3")
read -p "$( echo -e -n "$NC Set type Hash: ")" returnTypeHash
typeHash=$returnTypeHash
;;
"4")
echo -n "Help"
;;
"5")
echo -n "$PURPLEbye!"
exit 0
;;
*)
echo -e "$REDJust choose the options above"
echo -e "$PURPLE bye!"
exit 0
;;
esac # FIm do switch case
if [ "$wordList" != "" ] && [ "$hash" != "" ] && [ "$typeHash" != "" ];
then
stop="0"
findPassw="0"
echo -e "$PURPLE [+] Processing...."
for i in $(cat $wordList);
do
passwdHash=$(echo -n "$i" | $typeHash | cut -d " " -f 1)
#echo "$passwdHash"
if [ "$passwdHash" == "$hash" ]
then
findPassw="1"
echo -e "$PURPLE [+] Password found: $GREEN $i"
echo -e "$GREEN [+] Thank you for using this tool, bye <3"
break
fi
done
if [ "$findPassw" == "0" ]
then
echo -e "$RED [-] Could not find password with requested hash"
fi
exit 0
#echo "$passwd"
fi
let count++
done # Fim do loop while
}
main
#echo "$?"