-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·58 lines (53 loc) · 1.66 KB
/
install.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
#!/bin/bash
mdf_installed=$(grep "~/MacDefender/macdefender.sh" ~/.zshrc)
if grep -q "~/MacDefender/macdefender.sh" ~/.zshrc; then
echo "MacDefender is already installed."
exit 1
else
mkdir ~/MacDefender
curl https://raw.githubusercontent.com/Moewenmann/42MacDefender/main/macdefender.sh > ~/MacDefender/macdefender.sh
curl https://raw.githubusercontent.com/Moewenmann/42MacDefender/main/configshield.sh > ~/MacDefender/configshield.sh
#cp macdefender.sh ~/MacDefender/macdefender.sh
#cp configshield.sh ~/MacDefender/configshield.sh
chmod +x ~/MacDefender/macdefender.sh
chmod +x ~/MacDefender/configshield.sh
fi
if [ ! -f "$mdf_installed" ]; then
cat <<EOT >> ~/.zshrc
### ### ### MacDefender | MDf v2 | github.com/Moewenmann ### ### ###
MACDEFENDER="active"
MDFPASS="92cfceb39d57d914ed8b14d0e37643de0797ae56 -"
alias lock="~/MacDefender/macdefender.sh"
alias lll="~/MacDefender/macdefender.sh"
alias mdf="~/MacDefender/macdefender.sh"
alias macdefender="~/MacDefender/macdefender.sh"
alias MacDefender="~/MacDefender/macdefender.sh"
EOT
zshrc_file="$HOME/.zshrc"
echo "~/MacDefender/configshield.sh" | cat - "$zshrc_file" > tmp && mv tmp "$zshrc_file"
echo "~/MacDefender/macdefender.sh" | cat - "$zshrc_file" > tmp && mv tmp "$zshrc_file"
if grep -q "MACDEFENDER" ~/.zshrc; then
echo "MacDefender installed successfully."
else
echo "MacDefender installation failed."
fi
if [ ! -f "$config_file" ]; then
touch ~/MacDefender/config.scanlist
cat <<EOT >> ~/MacDefender/config.scanlist
masterplan.sh
install.sh
parrot.live
ascii.live
alias rm=
alias cd=
alias ls=
alias nano=
alias cat=
alias .=
alias ./=
EOT
echo "Scanlist created."
fi
else
echo "install failed."
fi