Sha256: ba4f5819731f9617bed6e25f9746cc60430313fa3232e19f4a79e50115ff4426

Contents?: true

Size: 1.13 KB

Versions: 792

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

792 entries across 792 versions & 1 rubygems

Version Path
pwn-0.5.152 vagrant/provisioners/openvas.sh
pwn-0.5.151 vagrant/provisioners/openvas.sh
pwn-0.5.150 vagrant/provisioners/openvas.sh
pwn-0.5.106 vagrant/provisioners/openvas.sh
pwn-0.5.105 vagrant/provisioners/openvas.sh
pwn-0.5.104 vagrant/provisioners/openvas.sh
pwn-0.5.103 vagrant/provisioners/openvas.sh
pwn-0.5.102 vagrant/provisioners/openvas.sh
pwn-0.5.101 vagrant/provisioners/openvas.sh
pwn-0.5.100 vagrant/provisioners/openvas.sh
pwn-0.5.99 vagrant/provisioners/openvas.sh
pwn-0.5.98 vagrant/provisioners/openvas.sh
pwn-0.5.97 vagrant/provisioners/openvas.sh
pwn-0.5.96 vagrant/provisioners/openvas.sh
pwn-0.5.95 vagrant/provisioners/openvas.sh
pwn-0.5.94 vagrant/provisioners/openvas.sh
pwn-0.5.93 vagrant/provisioners/openvas.sh
pwn-0.5.92 vagrant/provisioners/openvas.sh
pwn-0.5.91 vagrant/provisioners/openvas.sh
pwn-0.5.90 vagrant/provisioners/openvas.sh