From 22cc0d944a9c3ec984fc81d38e202fb7d2ee9c8c Mon Sep 17 00:00:00 2001 From: wchen-r7 Date: Fri, 7 Apr 2017 14:33:30 -0500 Subject: [PATCH] Add share from Linux --- Vagrantfile | 6 +++++- scripts/installs/setup_linux_share.bat | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 scripts/installs/setup_linux_share.bat diff --git a/Vagrantfile b/Vagrantfile index 40e554b..8cac5d7 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -126,6 +126,10 @@ Vagrant.configure("2") do |config| win2k8.vm.provision :shell, path: "scripts/installs/install_elasticsearch.bat" win2k8.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614 + # Insecure share from the Linux machine + win2k8.vm.provision :shell, path: "scripts/installs/setup_linux_share.bat" + win2k8.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614 + # Configure flags win2k8.vm.provision :shell, path: "scripts/installs/install_flags.bat" win2k8.vm.provision :shell, inline: "rm C:\\tmp\\vagrant-shell.bat" # Hack for this bug: https://github.com/mitchellh/vagrant/issues/7614a @@ -135,7 +139,7 @@ Vagrant.configure("2") do |config| trusty.vm.box = "rsginc/ubuntu64-14-04-1" trusty.vm.hostname = "metasploitableUB" - trusty.vm.network "private_network", type: "dhcp" + trusty.vm.network "private_network", ip: '172.28.128.3' trusty.vm.provider "virtualbox" do |v| v.name = "MetasploitableUB" diff --git a/scripts/installs/setup_linux_share.bat b/scripts/installs/setup_linux_share.bat new file mode 100644 index 0000000..16ea77b --- /dev/null +++ b/scripts/installs/setup_linux_share.bat @@ -0,0 +1,6 @@ +@echo off +ping -n 1 -4 172.28.128.3 | find /i "TTL=" > nul +IF ERRORLEVEL 1 (echo "Linux host not available.") ELSE ( + cmdkey /add:172.28.128.3 /user:chewbacca /pass:rwaaaaawr5 + net use W: \\172.28.128.3\public /savecred /p:yes +)