-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathquicksilver.sh
81 lines (77 loc) · 2.26 KB
/
quicksilver.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
#!/bin/bash
# Colour
g="\033[32m"
r="\033[31m"
b="\033[34m"
cr="\033[36m"
lrbg="\033[101m"
bbg="\033[44m"
n="\033[0m"
# Banner
echo -e "${cr}"
cat << "EOF"
_ _ _ _
(_) | | (_) |
__ _ _ _ _ ___| | __ ___ _| |_ _____ _ __
/ _` | | | | |/ __| |/ / / __| | \ \ / / _ \ '__|
| (_| | |_| | | (__| < \__ \ | |\ V / __/ |
\__, |\__,_|_|\___|_|\_\ |___/_|_| \_/ \___|_|
| | ______
|_| |______|
EOF
echo -e "${n}"
echo "[+] Algorithms"
echo "[+]" "MD5 |" "SHA1 |" "SHA-256 |" "SHA-384 |" "SHA-512"
echo
# Hash Check & Ensuring the userinput
while [ -z $hash ]; do
echo -n "Enter the hash value: "
read hash
done
count=$(echo -n $hash | wc -m)
# Working Area
hashfor=$(curl -s "http://hashtoolkit.com/reverse-hash/?hash=${hash}" | sed -n 219p | cut -d '>' -f 4 | cut -d "<" -f 1)
if [ "$count" -eq 32 ]; then
echo -e "It's a ${b}MD5${n} hash"
if [ -z $hashfor ]; then
echo -e "${r}But, no hash crack found!${n}"
else
echo -e "${g}Hash for:${n} $hashfor"
exit
fi
elif [ "$count" -eq 40 ]; then
echo -e "It's a ${b}SHA1${n} hash"
if [ -z $hashfor ]; then
echo -e "${r}But, no hash crack found!${n}"
else
echo -e "${g}Hash for:${n} $hashfor"
exit
fi
elif [ "$count" -eq 64 ]; then
echo -e "It's a ${b}SHA-256${n} hash"
if [ -z $hashfor ]; then
echo -e "${r}But, no hash crack found!${n}"
else
echo -e "${g}Hash for:${n} $hashfor"
exit
fi
elif [ "$count" -eq 96 ]; then
echo -e "It's a ${b}SHA-384${n} hash"
if [ -z $hashfor ]; then
echo -e "${r}But, no hash crack found!${n}"
else
echo -e "${g}Hash for:${n} $hashfor"
exit
fi
elif [ "$count" -eq 128 ]; then
echo -e "It's a ${b}SHA-512${n} hash"
if [ -z $hashfor ]; then
echo -e "${r}But, no hash crack found!${n}"
else
echo -e "${g}Hash for:${n} $hashfor"
exit
fi
else
echo -e "${lrbg}Hash Value Miss Match${n} || ${bbg}Unknown Algorithm ${n}"
exit
fi