-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbugbounty-update.sh
More file actions
executable file
·31 lines (25 loc) · 911 Bytes
/
bugbounty-update.sh
File metadata and controls
executable file
·31 lines (25 loc) · 911 Bytes
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
#!/bin/bash
if [ -z $SUDO_USER ]; # if SUDO_USER is empty, user is root
then
USER_HOME=$HOME # USER_HOME="/root"
else
USER_HOME=$(eval echo ~${SUDO_USER}) # USER_HOME="/home/username"
fi
## NMAP ---------------
if [ ! -d "/usr/share/nmap/scripts/nmap-vulners" ]; # if NOT exists
then
sudo git clone https://github.com/vulnersCom/nmap-vulners.git /usr/share/nmap/scripts/nmap-vulners
sudo ln -s /usr/share/nmap/scripts/nmap-vulners/vulners.nse /usr/share/nmap/scripts/vulners.nse
else
cd /usr/share/nmap/scripts/nmap-vulners
git pull
fi
if [ ! -d "/usr/share/nmap/scripts/vulscan" ]; # if NOT exists
then
sudo git clone https://github.com/scipag/vulscan.git /usr/share/nmap/scripts/vulscan
sudo ln -s /usr/share/nmap/scripts/vulscan/vulscan.nse /usr/share/nmap/scripts/vulscan.nse
else
cd /usr/share/nmap/scripts/vulscan
sudo git pull
fi
sudo nmap --script-updatedb