-
Notifications
You must be signed in to change notification settings - Fork 0
/
cipher-audition.sh
48 lines (44 loc) · 1.05 KB
/
cipher-audition.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
#!/bin/bash
Orange='\033[0;33m'
Yellow='\033[1;33m'
Red='\033[0;31m'
Green='\033[0;32m'
NC='\033[0m'
#echo -e $Orange"Powered By: BERGHEM - Smart Information Security"$NC
evall=$(file $1)
source helper.sh
if [[ "$evall" == *"No such file or directory"* ]];then
dots=$(echo $1 | grep -o "\." | wc -l)
if [[ $1 == http* ]];then
echo "[!]-Strip out the protocol \`http(s)://\`"
else
if [[ $dots -gt 1 ]];then
auditor $1
elif [[ $dots -eq 1 && $1 == *.com || $dots -eq 1 && $1 == *com.br ]];then
auditor $1
else
echo "[!]-That's not a valid target"
fi
fi
elif [[ "$evall == "*"ASCII"* ]];then
for x in $(cat $1);do
if [[ $x == http* ]];then
x=$(echo $x | awk -F '//' '{print $2}')
if [[ $x == */ ]];then
x=$(echo $x | sed 's/.$//g')
auditor $x
else
auditor $x
fi
elif [[ $x != http* ]];then
if [[ $x == */ ]];then
x=$(echo $x | sed 's/.$//g')
auditor $x
else
auditor $x
fi
fi
done
else
echo "[!]-Not implemented yet!"
fi