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.89 vagrant/provisioners/openvas.sh
pwn-0.5.88 vagrant/provisioners/openvas.sh
pwn-0.5.87 vagrant/provisioners/openvas.sh
pwn-0.5.86 vagrant/provisioners/openvas.sh
pwn-0.5.85 vagrant/provisioners/openvas.sh
pwn-0.5.84 vagrant/provisioners/openvas.sh
pwn-0.5.83 vagrant/provisioners/openvas.sh
pwn-0.5.81 vagrant/provisioners/openvas.sh
pwn-0.5.80 vagrant/provisioners/openvas.sh
pwn-0.5.79 vagrant/provisioners/openvas.sh
pwn-0.5.78 vagrant/provisioners/openvas.sh
pwn-0.5.77 vagrant/provisioners/openvas.sh
pwn-0.5.76 vagrant/provisioners/openvas.sh
pwn-0.5.75 vagrant/provisioners/openvas.sh
pwn-0.5.74 vagrant/provisioners/openvas.sh
pwn-0.5.73 vagrant/provisioners/openvas.sh
pwn-0.5.72 vagrant/provisioners/openvas.sh
pwn-0.5.71 vagrant/provisioners/openvas.sh
pwn-0.5.70 vagrant/provisioners/openvas.sh
pwn-0.5.69 vagrant/provisioners/openvas.sh