View Issue Details

IDProjectCategoryView StatusLast Update
0002272Kali LinuxKali Package Improvementpublic2015-07-28 11:54
Reporterg0tmi1k Assigned Torhertzog  
PrioritynormalSeveritytweakReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version2.0 
Fixed in Version2.0 
Summary0002272: OpenVAS 8 - More verbose during setup
Description

During the OpenVAS setup it will take 'a while' to complete, depending on the speed of the computer & the end users Internet connection.
We could be more verbose with the progress of the setup.

The current setup file for OpenVAS is as follows:

root@kali ~/Desktop/openvas-8.0$ cat openvas-setup
#!/bin/bash
test -e /var/lib/openvas/CA/cacert.pem  || openvas-mkcert -q
if (openssl verify -CAfile /var/lib/openvas/CA/cacert.pem \
    /var/lib/openvas/CA/servercert.pem |grep -q ^error); then
    openvas-mkcert -q -f
fi
openvas-nvt-sync
openvas-scapdata-sync
openvas-certdata-sync
if ! test -e /var/lib/openvas/CA/clientcert.pem || \
    ! test -e /var/lib/openvas/private/CA/clientkey.pem; then
    openvas-mkcert-client -n -i
fi
if (openssl verify -CAfile /var/lib/openvas/CA/cacert.pem \
    /var/lib/openvas/CA/clientcert.pem |grep -q ^error); then
    openvas-mkcert-client -n -i
fi

service openvas-manager stop 
service openvas-scanner stop 
openvassd
openvasmd --migrate
openvasmd --rebuild
killall openvassd
sleep 15
service openvas-scanner start
service openvas-manager start
service greenbone-security-assistant restart
if ! openvasmd --get-users | grep -q ^admin$ ; then
    openvasmd --create-user=admin
fi
root@kali ~/Desktop/openvas-8.0$

openvasmd has the following command line arguments:

$ openvasmd -h                                                                                                                            
Usage:
  openvasmd [OPTION...] - Manager of the Open Vulnerability Assessment System

...SNIP...
  --progress                                   Display progress during --rebuild and --update.
  --rebuild                                    Rebuild the NVT cache and exit.
  --role=<role>                                Role for --create-user and --get-users.
  -u, --update                                 Update the NVT cache and exit.
 ...SNIP...
  -v, --verbose                                Print tracing messages.
  --version                                    Print version and exit.

$

I suggest that we replace line 20 in openvas-setup:

openvasmd --rebuild

to be:

openvasmd --progress --rebuild
Additional Information

We can go one step further and use '-v' (--verbose) on some of the other commands - however, this may be 'overkill'.

Attached Files
openvas-setup (941 bytes)   
#!/bin/bash
test -e /var/lib/openvas/CA/cacert.pem  || openvas-mkcert -q
if (openssl verify -CAfile /var/lib/openvas/CA/cacert.pem \
    /var/lib/openvas/CA/servercert.pem |grep -q ^error); then
    openvas-mkcert -q -f
fi
openvas-nvt-sync
openvas-scapdata-sync
openvas-certdata-sync
if ! test -e /var/lib/openvas/CA/clientcert.pem || \
    ! test -e /var/lib/openvas/private/CA/clientkey.pem; then
    openvas-mkcert-client -n -i
fi
if (openssl verify -CAfile /var/lib/openvas/CA/cacert.pem \
    /var/lib/openvas/CA/clientcert.pem |grep -q ^error); then
    openvas-mkcert-client -n -i
fi

service openvas-manager stop 
service openvas-scanner stop 

openvassd
openvasmd --migrate
openvasmd --progress --rebuild

killall -w openvassd
sleep 15

service openvas-scanner start
service openvas-manager start
service greenbone-security-assistant restart

if ! openvasmd --get-users | grep -q ^admin$ ; then
    openvasmd --create-user=admin
fi
openvas-setup (941 bytes)   

Activities

rhertzog

rhertzog

2015-07-28 11:54

administrator   ~0003606

Fixed in openvas_8.0+kali1.dsc uploaded to kali-dev and sana.

Issue History

Date Modified Username Field Change
2015-05-12 12:38 g0tmi1k New Issue
2015-05-12 12:40 g0tmi1k Description Updated
2015-05-12 12:43 g0tmi1k Additional Information Updated
2015-07-22 18:35 rhertzog Assigned To => rhertzog
2015-07-22 18:35 rhertzog Status new => assigned
2015-07-27 10:06 g0tmi1k File Added: openvas-setup
2015-07-27 10:06 g0tmi1k Product Version => 2.0
2015-07-28 11:54 rhertzog Note Added: 0003606
2015-07-28 11:54 rhertzog Status assigned => resolved
2015-07-28 11:54 rhertzog Fixed in Version => 2.0
2015-07-28 11:54 rhertzog Resolution open => fixed