Sha256: ba4f5819731f9617bed6e25f9746cc60430313fa3232e19f4a79e50115ff4426

Contents?: true

Size: 1.13 KB

Versions: 813

Compression:

Stored size: 1.13 KB

Contents

#!/bin/bash
# Update user/pass based on UserLand Configs
if [[ $PWN_ROOT == '' ]]; then
  if [[ ! -d '/pwn' ]]; then
    pwn_root=$(pwd)
  else
    pwn_root='/pwn'
  fi
else
  pwn_root="${PWN_ROOT}"
fi

pwn_provider=`echo $PWN_PROVIDER`
openvas_vagrant_yaml="${pwn_root}/etc/userland/${pwn_provider}/openvas/vagrant.yaml"
apache_vagrant_yaml="${pwn_root}/etc/userland/${pwn_provider}/apache2/vagrant.yaml"
user=`ruby -e "require 'yaml'; print YAML.load_file('${openvas_vagrant_yaml}')['user']"`
pass=`ruby -e "require 'yaml'; print YAML.load_file('${openvas_vagrant_yaml}')['pass']"`
fqdn=`ruby -e "require 'yaml'; print YAML.load_file('${apache_vagrant_yaml}')['common_name_fqdn']"`
sudo /bin/bash --login -c "openvasmd --create-user ${user}"
sudo /bin/bash --login -c "openvasmd --user=${user} --new-password=${pass}"
sudo sed -i "9s/.*/ExecStart=\/usr\/sbin\/gsad --foreground --listen=127\.0\.0\.1 --port=9392 --mlisten=127\.0\.0\.1 --mport=9390 --http-only --no-redirect --allow-header-host openvas.${fqdn}/" /lib/systemd/system/greenbone-security-assistant.service
sudo systemctl daemon-reload
sudo systemctl restart greenbone-security-assistant

Version data entries

813 entries across 813 versions & 1 rubygems

Version Path
pwn-0.5.236 vagrant/provisioners/openvas.sh
pwn-0.5.235 vagrant/provisioners/openvas.sh
pwn-0.5.234 vagrant/provisioners/openvas.sh
pwn-0.5.233 vagrant/provisioners/openvas.sh
pwn-0.5.232 vagrant/provisioners/openvas.sh
pwn-0.5.231 vagrant/provisioners/openvas.sh
pwn-0.5.230 vagrant/provisioners/openvas.sh
pwn-0.5.229 vagrant/provisioners/openvas.sh
pwn-0.5.228 vagrant/provisioners/openvas.sh
pwn-0.5.227 vagrant/provisioners/openvas.sh
pwn-0.5.226 vagrant/provisioners/openvas.sh
pwn-0.5.225 vagrant/provisioners/openvas.sh
pwn-0.5.224 vagrant/provisioners/openvas.sh
pwn-0.5.223 vagrant/provisioners/openvas.sh
pwn-0.5.222 vagrant/provisioners/openvas.sh
pwn-0.5.221 vagrant/provisioners/openvas.sh
pwn-0.5.220 vagrant/provisioners/openvas.sh
pwn-0.5.219 vagrant/provisioners/openvas.sh
pwn-0.5.217 vagrant/provisioners/openvas.sh
pwn-0.5.216 vagrant/provisioners/openvas.sh