mirror of
https://github.com/rapid7/metasploitable3.git
synced 2024-07-05 11:12:25 +02:00
Added windows-shell provisioning along with inline powershell for choco and some restarts
This commit is contained in:
parent
d9d622ed1c
commit
1db87e68d0
@ -256,7 +256,7 @@
|
|||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<SynchronousCommand wcm:action="add">
|
<SynchronousCommand wcm:action="add">
|
||||||
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\install_netfx.ps1 -AutoStart</CommandLine>
|
<CommandLine>cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File a:\install_netfx.ps1 -AutoStart</CommandLine>
|
||||||
<Description>Install dotNet 4.0 and Chocolatey. This allows the environment to be reloaded after reboot.</Description>
|
<Description>Install .NET 4.0</Description>
|
||||||
<Order>27</Order>
|
<Order>27</Order>
|
||||||
</SynchronousCommand>
|
</SynchronousCommand>
|
||||||
<!-- WITHOUT WINDOWS UPDATES -->
|
<!-- WITHOUT WINDOWS UPDATES -->
|
||||||
|
@ -1,14 +1,7 @@
|
|||||||
# setup dotnetfx4
|
# setup dotnetfx4
|
||||||
$netfx_url = "https://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe"
|
$netfx_url = "https://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe"
|
||||||
|
|
||||||
|
|
||||||
Write-Output "Downloading $netfx_url"
|
Write-Output "Downloading $netfx_url"
|
||||||
(New-Object System.Net.WebClient).DownloadFile($netfx_url, "C:\Windows\Temp\dotNetFx40_Full_x86_x64.exe")
|
(New-Object System.Net.WebClient).DownloadFile($netfx_url, "C:\Windows\Temp\dotNetFx40_Full_x86_x64.exe")
|
||||||
Write-Output "Starting Install of dotNetFx40_Full_x86_x64.exe"
|
Write-Output "Starting Install of dotNetFx40_Full_x86_x64.exe"
|
||||||
Start-Process "C:\Windows\Temp\dotNetFx40_Full_x86_x64.exe" "/q /norestart" -Wait
|
Start-Process "C:\Windows\Temp\dotNetFx40_Full_x86_x64.exe" "/q /norestart" -Wait
|
||||||
|
|
||||||
$ChocoInstallPath = "$env:SystemDrive\ProgramData\Chocolatey\bin"
|
|
||||||
|
|
||||||
if (!(Test-Path $ChocoInstallPath)) {
|
|
||||||
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
start /w PKGMGR.EXE /iu:SNMP
|
start /w PKGMGR.EXE /quiet /norestart /iu:SNMP
|
||||||
reg delete HKLM\SYSTEM\ControlSet001\services\SNMP\Parameters\PermittedManagers /va /f
|
reg delete HKLM\SYSTEM\ControlSet001\services\SNMP\Parameters\PermittedManagers /va /f
|
||||||
reg add HKLM\SYSTEM\ControlSet001\services\SNMP\Parameters /v EnableAuthenticationTraps /t REG_DWORD /d 0 /f
|
reg add HKLM\SYSTEM\ControlSet001\services\SNMP\Parameters /v EnableAuthenticationTraps /t REG_DWORD /d 0 /f
|
||||||
reg add HKLM\SYSTEM\ControlSet001\services\SNMP\Parameters\ValidCommunities /v public /t REG_DWORD /d 4 /f
|
reg add HKLM\SYSTEM\ControlSet001\services\SNMP\Parameters\ValidCommunities /v public /t REG_DWORD /d 4 /f
|
||||||
|
@ -103,7 +103,16 @@
|
|||||||
"destination": "C:/vagrant"
|
"destination": "C:/vagrant"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type":"powershell",
|
||||||
|
"inline": [
|
||||||
|
"iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "windows-restart"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "windows-shell",
|
||||||
"remote_path": "C:/Windows/Temp/script.bat",
|
"remote_path": "C:/Windows/Temp/script.bat",
|
||||||
"execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat",
|
"execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat",
|
||||||
"scripts": [
|
"scripts": [
|
||||||
@ -131,7 +140,17 @@
|
|||||||
"scripts/installs/install_openjdk6.bat",
|
"scripts/installs/install_openjdk6.bat",
|
||||||
"scripts/installs/setup_jmx.bat",
|
"scripts/installs/setup_jmx.bat",
|
||||||
"scripts/installs/install_ruby.bat",
|
"scripts/installs/install_ruby.bat",
|
||||||
"scripts/installs/install_devkit.bat",
|
"scripts/installs/install_devkit.bat"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "windows-restart"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "windows-shell",
|
||||||
|
"remote_path": "C:/Windows/Temp/script.bat",
|
||||||
|
"execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat",
|
||||||
|
"scripts": [
|
||||||
"scripts/installs/install_rails_server.bat",
|
"scripts/installs/install_rails_server.bat",
|
||||||
"scripts/installs/setup_rails_server.bat",
|
"scripts/installs/setup_rails_server.bat",
|
||||||
"scripts/installs/install_rails_service.bat",
|
"scripts/installs/install_rails_service.bat",
|
||||||
|
Loading…
Reference in New Issue
Block a user