File tree 1 file changed +35
-0
lines changed
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ version=" 1.0"
4
+
5
+ # root init vasctl
6
+ if [ " $EUID " != " 0" ]; then
7
+ echo " [INFO] Please run as root"
8
+ exit
9
+ fi
10
+
11
+
12
+ echo " Welcome to vasctl version $version "
13
+ echo " " > /etc/redis.vasctl.bk
14
+ echo $( cat /etc/redis.conf) >> /etc/redis.vasctl.bk
15
+ echo " unixsocket /var/lib/redis/redis.sock" > /etc/redis.conf
16
+ echo " unixsocketperm 700" >> /etc/redis.conf
17
+ echo " port 0" >> /etc/redis.conf
18
+ echo " timeout 0" >> /etc/redis.conf
19
+ echo " databases 128" >> /etc/redis.conf
20
+ echo " kb_location = /var/lib/redis/redis.sock" > /etc/openvas/openvassd.conf
21
+ systemctl start redis.service
22
+ openvas-manage-certs -a
23
+ greenbone-nvt-sync
24
+ greenbone-scapdata-sync
25
+ greenbone-certdata-sync
26
+ systemctl start openvas-scanner.service
27
+ openvasmd --rebuild --progress
28
+ echo " [INFO] Setting up user stuff ..."
29
+ openvasmd --create-user=admin --role=Admin
30
+ echo " [INFO] Generating random password for session ..."
31
+ randompass=" $( head /dev/urandom | tr -dc A-Za-z0-9 | head -c 13 ; echo ' ' ) "
32
+ openvasmd --user=admin --new-password=$randompass
33
+ systemctl start openvasmd.service
34
+ openvasmd -p 9390 -a 127.0.0.1
35
+ gsad -f --listen=127.0.0.1 --mlisten=127.0.0.1 --mport=9390
You can’t perform that action at this time.
0 commit comments