Merge branch 'master' of github.com:rapid7/metasploitable3

This commit is contained in:
James Barnett 2018-02-14 23:01:16 +00:00
commit 4d291c1613
3 changed files with 6 additions and 5 deletions

View File

@ -14,7 +14,7 @@ System Requirements:
Requirements:
* [Packer](https://www.packer.io/intro/getting-started/install.html)
* [Vagrant](https://www.vagrantup.com/docs/installation/) NOTE: Currently 1.9.1 is recommended as there are build issues with newer versions.
* [Vagrant](https://www.vagrantup.com/docs/installation/)
* [Vagrant Reload Plugin](https://github.com/aidanns/vagrant-reload#installation)
* [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
* Internet connection

View File

@ -4,6 +4,7 @@ $virtualBoxMinVersion = "5.1.10"
$packerMinVersion = "0.10.0"
$vagrantMinVersion = "1.9.0"
$vagrantreloadMinVersion = "0.0.1"
$packer = "packer"
function CompareVersions ($actualVersion, $expectedVersion, $exactMatch = $False) {
If ($exactMatch) {
@ -48,7 +49,7 @@ If (CompareVersions -actualVersion $vboxVersion -expectedVersion $virtualBoxMinV
exit
}
$packerVersion = cmd.exe /c "packer" -v
$packerVersion = cmd.exe /c $packer -v
If (CompareVersions -actualVersion $packerVersion -expectedVersion $packerMinVersion) {
Write-Host "Compatible version of packer found."
@ -99,7 +100,7 @@ If ($(Test-Path "windows_2008_r2_virtualbox.box") -eq $True) {
Write-Host "It looks like the Vagrant box already exists. Skipping the Packer build."
} else {
Write-Host "Building the Vagrant box..."
cmd.exe /c packer build --only=virtualbox-iso windows_2008_r2.json
cmd.exe /c $packer build --only=virtualbox-iso windows_2008_r2.json
if($?) {
Write-Host "Box successfully built by Packer."
@ -128,4 +129,4 @@ If ($vagrant_box_list -eq "metasploitable3") {
}
Write-Host "SUCCESS: Run 'vagrant up' to provision and start metasploitable3."
Write-Host "NOTE: The VM will need Internet access to provision properly."
Write-Host "NOTE: The VM will need Internet access to provision properly."

View File

@ -42,7 +42,7 @@ if [ $(uname) = "Darwin" ]; then
vagrant_exact_match=false
elif [ $(uname) = "Linux" ]; then
vagrant_exact_match=false
if (cat /etc/*-release | grep -q 'DISTRIB_ID=Arch')|(cat /etc/os-release | grep -q 'ID=arch'); then
if (cat /etc/*-release | grep -q 'DISTRIB_ID=Arch')|(cat /etc/os-release | grep -Pq 'ID=(arch|"antergos")'); then
packer_bin="packer-io"
fi
fi