-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.sh
executable file
·116 lines (104 loc) · 4.71 KB
/
setup.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#!/bin/bash
# Title: Handy Hacks
# Version: 1.0
# Author: hwac121
# eMail: [email protected]
# URL: http://www.majikcat.com
# GitHub:
# Description:
# Just a handy collection of commands put together in this utility
# script I put together.
#=======================================================================
# FUNCTIONS
#=======================================================================
Splash(){
echo -e " "
echo -e "\e[32m ██░ ██ ▄▄▄ ███▄ █▓█████▓██ ██▓ ██░ ██ ▄▄▄ ▄████▄ ██ ▄█▀ ██████ \e[0m";
sleep 0.08
echo -e "\e[32m ▓██░ ██▒████▄ ██ ▀█ █▒██▀ ██▒██ ██▒ ▓██░ ██▒████▄ ▒██▀ ▀█ ██▄█▒▒██ ▒ \e[0m";
sleep 0.08
echo -e "\e[32m ▒██▀▀██▒██ ▀█▄ ▓██ ▀█ ██░██ █▌▒██ ██░ ▒██▀▀██▒██ ▀█▄ ▒▓█ ▄▓███▄░░ ▓██▄ \e[0m";
sleep 0.08
echo -e "\e[32m ░▓█ ░██░██▄▄▄▄██▓██▒ ▐▌██░▓█▄ ▌░ ▐██▓░ ░▓█ ░██░██▄▄▄▄██▒▓▓▄ ▄██▓██ █▄ ▒ ██▒\e[0m";
sleep 0.08
echo -e "\e[32m ░▓█▒░██▓▓█ ▓██▒██░ ▓██░▒████▓ ░ ██▒▓░ ░▓█▒░██▓▓█ ▓██▒ ▓███▀ ▒██▒ █▒██████▒▒\e[0m";
sleep 0.08
echo -e "\e[32m ▒ ░░▒░▒▒▒ ▓▒█░ ▒░ ▒ ▒ ▒▒▓ ▒ ██▒▒▒ ▒ ░░▒░▒▒▒ ▓▒█░ ░▒ ▒ ▒ ▒▒ ▓▒ ▒▓▒ ▒ ░\e[0m";
sleep 0.08
echo -e "\e[32m ▒ ░▒░ ░ ▒ ▒▒ ░ ░░ ░ ▒░░ ▒ ▒▓██ ░▒░ ▒ ░▒░ ░ ▒ ▒▒ ░ ░ ▒ ░ ░▒ ▒░ ░▒ ░ ░\e[0m";
sleep 0.08
echo -e "\e[32m ░ ░░ ░ ░ ▒ ░ ░ ░ ░ ░ ░▒ ▒ ░░ ░ ░░ ░ ░ ▒ ░ ░ ░░ ░░ ░ ░ \e[0m";
sleep 0.08
echo -e "\e[32m ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ \e[0m";
sleep 0.08
echo -e "\e[32m ░ ░ ░ ░ \e[0m";
sleep 0.08
echo " "
echo -e " ====== Version 1.0 ======"
}
#===================================================================#
# CHECK FOR DEPENDENCIES #
#===================================================================#
clear
Splash
echo " "
echo -e "HANDY HACKS v1.0 INSTALLATION..."
echo " "
echo -e "by Majik Cat Security"
sleep 2
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' mtr | grep "install ok installed")
echo Checking for mtr: $PKG_OK
if [ "" == "$PKG_OK" ]; then
echo "mtr not installed. Attempting to install mtr now..."
sleep 0.15
apt-get install mtr
fi
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' dstat | grep "install ok installed")
echo Checking for dstat: $PKG_OK
if [ "" == "$PKG_OK" ]; then
echo "dstat not installed. Attempting to install dstat now..."
sleep 0.15
apt-get install dstat
fi
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' htop | grep "install ok installed")
echo Checking for htop: $PKG_OK
if [ "" == "$PKG_OK" ]; then
echo "htop not installed. Attempting to install htop now..."
sleep 0.15
apt-get install htop
fi
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' zenmap | grep "install ok installed")
echo Checking for zenmap: $PKG_OK
if [ "" == "$PKG_OK" ]; then
echo "zenmap not installed. Attempting to install zenmap now..."
sleep 0.15
apt-get install zenmap
fi
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' dialog | grep "install ok installed")
echo Checking for dialog: $PKG_OK
if [ "" == "$PKG_OK" ]; then
echo "dialog not installed. Attempting to install dialog now..."
sleep 0.15
apt-get install dialog
fi
#===================================================================
# MAIN INSTALLATION
#===================================================================
echo -e " "
echo -e "Making Handy Hacks available globally..."
cp hhacks.sh /bin/hhacks
cp officetools.sh /bin/officetools
sleep 0.15
echo -e " "
echo -e "Copying files to correct positions..."
chmod +x /bin/hhacks
chmod +x /bin/officetools
sleep 0.15
echo -e " "
echo -e "Setting proper permissions..."
chmod +x hhacks.sh
chmod +x officetools.sh
sleep 0.15
echo -e " "
echo -e "Just type hhacks anywhere in terminal to use this utility."
sleep 0.15