-
Notifications
You must be signed in to change notification settings - Fork 2
/
bulk-obf.sh
36 lines (31 loc) · 879 Bytes
/
bulk-obf.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
#!/bin/bash
echo "
____ _ _ _ _ __ ___ ____ _____
| __ )| | | | | | |/ / / _ \| __ )| ___|
| _ \| | | | | | ' /_____| | | | _ \| |_
| |_) | |_| | |___| . \_____| |_| | |_) | _|
|____/ \___/|_____|_|\_\ \___/|____/|_|
== Bulk malicious domain Obfuscation | De-obfuscation tool ==
By DeepZec | twitter.com/DeepZec | github.com/deepzec
"
filename="$1"
display_usage() {
echo -e "\nUsage:\n./bulk_obf.sh [input_file] [1: Obfuscation | 2: Deobfuscation] \n"
echo -e "\n Example:\n./bulk_obf.sh domains.txt 1 \n"
}
if [ $# -le 1 ];
then
display_usage
exit 1
fi
if [ "$2" == 2 ];
then
sed 's/\[.]/./g' $filename > de_$filename
echo "Output file : de_$filename"
elif [ "$2" == 1 ];
then
sed 's/\./[.]/g' $filename > obf_$filename
echo "Output file : obf_$filename"
else
echo "Invalid options"
fi