Skip to content

Commit

Permalink
Merge pull request #117 from indera/develop
Browse files Browse the repository at this point in the history
prepare vagrant for OpenVAS scanning
  • Loading branch information
indera committed Sep 11, 2015
2 parents 0c5e6c8 + 87f6b1e commit 664bcd8
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 10 deletions.
1 change: 1 addition & 0 deletions vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.synced_folder "../app", "/var/www/dropper/app"
config.vm.network "forwarded_port", guest: 80, host: 8088
config.vm.network :forwarded_port, guest: 443, host: 7088
config.vm.network :forwarded_port, guest: 9392, host: 9392

config.vm.provision "shell" do |s|
s.path = "bootstrap.sh"
Expand Down
2 changes: 1 addition & 1 deletion vagrant/apache-ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

# Possible values: debug, info, notice, warn, error, crit, alert, emerg.
LogLevel debug
LogLevel warn

ServerAdmin webmaster@localhost
ErrorLog ${APACHE_LOG_DIR}/error.log
Expand Down
2 changes: 1 addition & 1 deletion vagrant/apache.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
LogLevel debug
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Expand Down
25 changes: 18 additions & 7 deletions vagrant/bootstrap_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,24 @@ function configure_base() {
}

function install_utils() {
cp $SHARED_FOLDER/aliases /home/vagrant/.bash_aliases
cp $SHARED_FOLDER/aliases /root/.bash_aliases
cp $SHARED_FOLDER/vimrc /home/vagrant/.vimrc
cp $SHARED_FOLDER/vimrc /root/.vimrc
apt-get install -y \
vim \
ack-grep
cp $SHARED_FOLDER/dot_files/aliases /home/vagrant/.bash_aliases
cp $SHARED_FOLDER/dot_files/aliases /root/.bash_aliases

cp $SHARED_FOLDER/dot_files/vimrc /home/vagrant/.vimrc
cp $SHARED_FOLDER/dot_files/vimrc /root/.vimrc

cp $SHARED_FOLDER/dot_files/sqliterc /home/vagrant/.sqliterc
cp $SHARED_FOLDER/dot_files/sqliterc /root/.sqliterc

apt-get install -y vim ack-grep
}

function install_redis() {

}

function install_openvas() {

}

function install_apache_for_python() {
Expand Down
10 changes: 9 additions & 1 deletion vagrant/aliases → vagrant/dot_files/aliases
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@

alias hist='history | less'
alias refresh='. ~/.bash_aliases'
alias refresh='. ~/.bashrc'
alias ali='vim ~/.bash_aliases'

alias ma='vim Makefile'
alias va='vim Vagrantfile'
alias re='vim README.md'
alias fa='vim fabric.py'
alias ba='vim ~/.bashrc'
alias steps='vim steps'
alias tree3='tree -L 3'

alias db=' mysql --prompt="(\u@\h) [\d]> " --pager="less -niSFX" -u ctsi_dropper_s -pinsecurepassword ctsi_dropper_s -h localhost'
alias db_root=' mysql --prompt="(\u@\h) [\d]> " --pager="less -niSFX" -u root ctsi_dropper_s -h localhost'
alias db_openvas='sqlite3 /usr/local/var/lib/openvas/mgr/tasks.db'
alias db_openvas_tables='sqlite3 /usr/local/var/lib/openvas/mgr/tasks.db ".tables" '

alias port_5000='sudo netstat -tulpn | grep :5000'
alias check_5000='curl -k https://localhost:5000 && echo'
Expand Down Expand Up @@ -48,6 +51,11 @@ alias dua='du -hcs'
alias duf="du -h --max-depth=1 ./ | sort -n -r"
alias cdd='cd ..'

alias big='du -hcs * | grep -E "M|G"'
alias big_find='find ./ -size +10000k | xargs ls -hsS'
alias big_10='ls -hsS | head -10'
alias fin='find . -iname'

alias gst='git status'
alias glog='git log'
alias gdiff='git diff'
Expand Down
3 changes: 3 additions & 0 deletions vagrant/dot_files/sqliterc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.mode column
.header on
.nullvalue NULL
File renamed without changes.

0 comments on commit 664bcd8

Please sign in to comment.