-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathuser_start_input.func
96 lines (91 loc) · 2.28 KB
/
user_start_input.func
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
#!/bin/bash
# ###########################################
# ########## ##########
# ########## SPLITTER ##########
# ########## Ver: 0.2.4 ##########
# ########## ##########
# ###########################################
#
# Created By: Rener Alberto (aka Gr1nch) - DcLabs Security Team
# E-Mail: [email protected]
# PGP Key ID: 0x65f912ed59949f8e
# PGP Key FingerPrint: 7B7A 8E83 82D3 DACD 4B3B CFE0 65F9 12ED 5994 9F8E
# PGP KEY Download: https://pgp.mit.edu/pks/lookup?op=get&search=0x65F912ED59949F8E
#
# BSD License - Do whatever you want with this script, but take the responsibility!
# You are responsible for your actions.
# The creator assume no liability and is not responsible for any misuse or damage.
#!/bin/bash
user_start_input () {
if [[ $# -eq 1 ]];then
help | more
echo " "
exit 1
fi
###########################
case $1 in
"-i")
TOR_INSTANCES="${2}"
shift ;;
"-c")
COUNTRIES="${2}"
shift ;;
"-re")
COUNTRY_LIST_CONTROLS="${2}"
shift ;;
"-h")
help | more
shift ;;
*)
if test "${1}" != "-i" || "${1}" != "-c" || "${1}" != "-re" || "${1}" != "-h"; then
help | more
echo " "
exit 1
fi
shift ;;
esac
###########################
case $2 in
"-i")
TOR_INSTANCES="${3}"
shift ;;
"-c")
COUNTRIES="${3}"
shift ;;
"-re")
COUNTRY_LIST_CONTROLS="${3}"
shift ;;
*)
if test "${2}" != "-i" || "${2}" != "-c" || "${2}" != "-re"; then
help | more
echo " "
exit 1
fi
shift ;;
esac
############################
case $3 in
"-i")
TOR_INSTANCES="${4}"
shift ;;
"-c")
COUNTRIES="${4}"
shift ;;
"-re")
COUNTRY_LIST_CONTROLS="${4}"
shift ;;
*)
if test "${3}" != "-i" || "${3}" != "-c" || "${3}" != "-re"; then
help | more
echo " "
exit 1
fi
shift ;;
esac
#Saving the inicial user settings.
echo "TOR_INSTANCES=\"${TOR_INSTANCES}\"
COUNTRIES=\"${COUNTRIES}\"
COUNTRY_LIST_CONTROLS=\"${COUNTRY_LIST_CONTROLS}\"
TOTAL_INSTANCES=$((${TOR_INSTANCES} * ${COUNTRIES}))
" > "/tmp/initial_user_settings.txt"
}