-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfigure
More file actions
71 lines (55 loc) · 1.59 KB
/
configure
File metadata and controls
71 lines (55 loc) · 1.59 KB
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
#!/bin/bash
# SAS
# Scan Analyser Set
# Configuration file
# License: GPL v3
# Author: Aurelien DESBRIERES - aurelien@hackers.camp
tput clear
echo "Welcome to Scan Analyser Set Configuration file"
echo "This program will install needed dependencies for SAS"
echo "You need root privileges to runit "
the_user=`whoami`
# request the user approbation
while true; do
read -p "Do you wish to install SAS $the_user? Y/n " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer Yes or no.";;
esac
done
# Vefify and install the dependencies if needed
printf "\nThe software will now install the needed dependencies on\nyour operating system $the_user\n\n"
# load installation of the dependencies
# verification of the package manager
command_exists () {
type "$1" &> /dev/null ;
}
# auto-selection of the package manager
# dnf - Fedora - fredora
if command_exists dnf ; then
sudo dnf install lm_sensors nmap iftop moreutils
else
# yum - RedHat - old fredora
sudo yum install lm_sensors nmap iftop moreutils
fi
# apt - Debian - Trisquel
if command_exists apt-get ; then
sudo apt-get install lm_sensors nmap iftop moreutils
fi
# pacman - Archlinux - Parabola
if command_exists pacman ; then
sudo pacman -Sy lm_sensors nmap iftop moreutils
fi
# apt - Rooted smartphone
if command_exists apt ; then
sudo apt install lm_sensors nmap iftop moreutils
fi
mkdir /home/$the_user/SAS/
cp sas ~/SAS/.
chmod u+x ~/SAS/sas
cd ~/SAS/
printf "If all dependencies installed correctly, SAS will be able to run\ncorrectly on your operating system $the_user\n"
sleep 5
. sas
sas