-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathrun-ikeforce-auto
executable file
·65 lines (60 loc) · 1.4 KB
/
run-ikeforce-auto
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
#!/bin/bash
# https://github.com/jnqpblc/Randomness/blob/master/3.mapping/automated-va/run-auto-ikeforce.sh
IFS=$'\n';
for line in $(grep -H 'Auth=PSK' ikescan-*-aggressive-mode.txt); do
IP=$(echo $line|egrep -o '([0-9]{1,3}\.){3}([0-9]{1,3})');
ENC=$(echo $line|egrep -o 'Enc=[^ ]+');
HASH=$(echo $line|egrep -o 'Hash=[^ ]+');
GROUP=$(echo $line|egrep -o 'Group=[0-9]');
if [ $ENC == 'Enc=3DES' ]; then
CRYPTO='5'
elif [ $ENC == 'Enc=AES' ]; then
CRYPTO='7'
elif [ $ENC == 'Enc=DES' ]; then
CRYPTO='1'
else
printf '\nDammit Bobby. Wrong crypto.\n'
exit 0
fi
if [ $HASH == 'Hash=MD5' ]; then
HMAC='1'
elif [ $HASH == 'Hash=SHA1' ]; then
HMAC='2'
elif [ $HASH == 'Hash=SHA2-256' ]; then
HMAC='4'
elif [ $HASH == 'Hash=SHA2-384' ]; then
HMAC='5'
elif [ $HASH == 'Hash=SHA2-512' ]; then
HMAC='6'
else
printf '\nDammit Bobby. Wrong hmac.\n';
exit 0;
fi
if [ $GROUP == 'Group=1' ]; then
DH='1'
elif [ $GROUP == 'Group=2' ]; then
DH='2'
elif [ $GROUP == 'Group=5' ]; then
DH='5'
else
printf '\nDammit Bobby. Wrong group.\n';
exit 0;
fi
if [ -z $CRYPTO ];then
printf '\nDammit Bobby. Empty crypto\n';
exit 0;
else
if [ -z $HASH ];then
printf '\nDammit Bobby. Empty hash\n';
exit 0;
else
if [ -z $DH ];then
printf '\nDammit Bobby. Empty dh\n';
exit 0
else
bash run-ikeforce $IP $CRYPTO $HMAC 1 $DH;
echo
fi
fi
fi
done