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.214 vagrant/provisioners/openvas.sh
pwn-0.5.213 vagrant/provisioners/openvas.sh
pwn-0.5.212 vagrant/provisioners/openvas.sh
pwn-0.5.211 vagrant/provisioners/openvas.sh
pwn-0.5.210 vagrant/provisioners/openvas.sh
pwn-0.5.209 vagrant/provisioners/openvas.sh
pwn-0.5.207 vagrant/provisioners/openvas.sh
pwn-0.5.206 vagrant/provisioners/openvas.sh
pwn-0.5.205 vagrant/provisioners/openvas.sh
pwn-0.5.204 vagrant/provisioners/openvas.sh
pwn-0.5.203 vagrant/provisioners/openvas.sh
pwn-0.5.202 vagrant/provisioners/openvas.sh
pwn-0.5.201 vagrant/provisioners/openvas.sh
pwn-0.5.200 vagrant/provisioners/openvas.sh
pwn-0.5.199 vagrant/provisioners/openvas.sh
pwn-0.5.198 vagrant/provisioners/openvas.sh
pwn-0.5.197 vagrant/provisioners/openvas.sh
pwn-0.5.196 vagrant/provisioners/openvas.sh
pwn-0.5.195 vagrant/provisioners/openvas.sh
pwn-0.5.194 vagrant/provisioners/openvas.sh