-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
executable file
·82 lines (78 loc) · 2.99 KB
/
start.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
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
#!/bin/bash
if [[ $1 == "-g" ]]; then
yad --splash --center --image="./assets/bcsplash.png" --no-buttons --width=800 --height=500 --timeout=2
curUser=$(whoami)
if [[ $curUser != "root" ]]; then
yad --title="Blue Crescent | Root Warning" --window-icon="./assets/bcicon.png" --width=500 --text="This script has not been run as root. Non-root mode should only be used for development or debugging purposes only."
if [[ $? == "1" ]]; then
exit
fi
fi
scriptOptions=$(yad --list --print-column=2 --center --window-icon="./assets/bcicon.png" --image="./assets/bc.png" --image-on-top --title="Blue Crescent Graphical" --text="Please select what you want to do.\n\nBlue Crescent v0.2.1-rc3, Installer script is version 1.2.1.\n\nProgram and scripts written by BurningInfern0." --width="700" --height="500" --checklist --column="Check" --column="Script" --column="Description" --column="Version" --column="External" \
false ForkBombs "Prevents fork bombs." 1.1 "" \
false RKHunter "Performs a rootkit scan with RootkitHunter." 1.0 "rkhunter" \
false BPF "Enables the Berkely Packet Finder." 1.0 "" \
false RandMem "Enables Memory Randomization." 1.0 "" \
false UFW "Enables the Uncomplicated Firewall." 1.0 "ufw" \
false ClamAV "Performs a malware scan with ClamAV." 1.0 "clamav" \
false ICMPEcho "Disables the ICMP Echo Reply function." 1.0 "" \
false DisRoot "Disables root access via tty." 1.0 "" \
false DisSSHRoot "Disables root access via SSH." 1.0 "openssh-server" \
false DisGuest "Disables the guest account in Debian/Ubuntu systems." 1.0 "" \
false Cron "Gathers information about currently installed crontabs." 1.0 "" \
false Symlinks "Removes broken symlinks." 1.0 "symlinks")
# puts yad items into array
# cleans item string
itemString=$(echo $scriptOptions | sed 's/|//g')
# puts the items into an array
IFS=' ' read -r -a itemArray <<< "$itemString"
for script in ${itemArray[@]}; do
case $script in
ForkBombs)
./scripts/forkbombs.sh
;;
RKHunter)
./scripts/rootkit-scan.sh
;;
BPF)
./scripts/berkelypacketfinder.sh
;;
RandMem)
./scripts/memoryrandomization.sh
;;
UFW)
./scripts/ufw.sh
;;
ClamAV)
./scripts/clamav.sh
;;
ICMPEcho)
./scripts/disablepingreply.sh
;;
DisRoot)
./scripts/disablerootaccess.sh
;;
DisSSHRoot)
./scripts/disablesshrootaccess.sh
;;
DisGuest)
./scripts/disableguest.sh
;;
HideProcID)
./scripts/hideprocid.sh
;;
Cron)
./scripts/cron.sh
;;
Symlinks)
./scripts/symlinks.sh
;;
esac
done
exit 0
fi
if [[ $1 == "-c" ]]; then
echo "command line mode is currently not complete at this time, please use graphical mode."
exit 0
fi
echo -e "usage: ./start.sh [MODE]\nModes:\n-g enables the graphical interface.\n-c enables the command interface."