Merge pull request #728 from dirkjanm/dev
Fixed custom proxy config in launcher codewebsockets-multiuser
commit
223079597c
|
@ -222,7 +222,7 @@ class Listener:
|
||||||
password = proxyCreds.split(':')[1]
|
password = proxyCreds.split(':')[1]
|
||||||
domain = username.split('\\')[0]
|
domain = username.split('\\')[0]
|
||||||
usr = username.split('\\')[1]
|
usr = username.split('\\')[1]
|
||||||
stager += "$netcred = New-Object System.Net.NetworkCredential("+usr+","+password+","+domain+");"
|
stager += "$netcred = New-Object System.Net.NetworkCredential('"+usr+"','"+password+"','"+domain+"');"
|
||||||
stager += helpers.randomize_capitalization("$wc.Proxy.Credentials = $netcred;")
|
stager += helpers.randomize_capitalization("$wc.Proxy.Credentials = $netcred;")
|
||||||
|
|
||||||
#save the proxy settings to use during the entire staging process and the agent
|
#save the proxy settings to use during the entire staging process and the agent
|
||||||
|
@ -307,7 +307,7 @@ class Listener:
|
||||||
launcherBase += "proxy_auth_handler = urllib2.ProxyBasicAuthHandler();\n"
|
launcherBase += "proxy_auth_handler = urllib2.ProxyBasicAuthHandler();\n"
|
||||||
username = proxyCreds.split(':')[0]
|
username = proxyCreds.split(':')[0]
|
||||||
password = proxyCreds.split(':')[1]
|
password = proxyCreds.split(':')[1]
|
||||||
launcherBase += "proxy_auth_handler.add_password(None,"+proxy+","+username+","+password+");\n"
|
launcherBase += "proxy_auth_handler.add_password(None,'"+proxy+"','"+username+"','"+password+"');\n"
|
||||||
launcherBase += "o = urllib2.build_opener(proxy, proxy_auth_handler);\n"
|
launcherBase += "o = urllib2.build_opener(proxy, proxy_auth_handler);\n"
|
||||||
else:
|
else:
|
||||||
launcherBase += "o = urllib2.build_opener(proxy);\n"
|
launcherBase += "o = urllib2.build_opener(proxy);\n"
|
||||||
|
|
|
@ -243,7 +243,7 @@ class Listener:
|
||||||
password = proxyCreds.split(':')[1]
|
password = proxyCreds.split(':')[1]
|
||||||
domain = username.split('\\')[0]
|
domain = username.split('\\')[0]
|
||||||
usr = username.split('\\')[1]
|
usr = username.split('\\')[1]
|
||||||
stager += "$netcred = New-Object System.Net.NetworkCredential("+usr+","+password+","+domain+");"
|
stager += "$netcred = New-Object System.Net.NetworkCredential('"+usr+"','"+password+"','"+domain+"');"
|
||||||
stager += helpers.randomize_capitalization("$wc.Proxy.Credentials = $netcred;")
|
stager += helpers.randomize_capitalization("$wc.Proxy.Credentials = $netcred;")
|
||||||
|
|
||||||
#save the proxy settings to use during the entire staging process and the agent
|
#save the proxy settings to use during the entire staging process and the agent
|
||||||
|
@ -367,7 +367,7 @@ class Listener:
|
||||||
launcherBase += "proxy_auth_handler = urllib2.ProxyBasicAuthHandler();\n"
|
launcherBase += "proxy_auth_handler = urllib2.ProxyBasicAuthHandler();\n"
|
||||||
username = proxyCreds.split(':')[0]
|
username = proxyCreds.split(':')[0]
|
||||||
password = proxyCreds.split(':')[1]
|
password = proxyCreds.split(':')[1]
|
||||||
launcherBase += "proxy_auth_handler.add_password(None,"+proxy+","+username+","+password+");\n"
|
launcherBase += "proxy_auth_handler.add_password(None,'"+proxy+"','"+username+"','"+password+"');\n"
|
||||||
launcherBase += "o = urllib2.build_opener(proxy, proxy_auth_handler);\n"
|
launcherBase += "o = urllib2.build_opener(proxy, proxy_auth_handler);\n"
|
||||||
else:
|
else:
|
||||||
launcherBase += "o = urllib2.build_opener(proxy);\n"
|
launcherBase += "o = urllib2.build_opener(proxy);\n"
|
||||||
|
|
|
@ -198,7 +198,7 @@ class Listener:
|
||||||
password = proxyCreds.split(':')[1]
|
password = proxyCreds.split(':')[1]
|
||||||
domain = username.split('\\')[0]
|
domain = username.split('\\')[0]
|
||||||
usr = username.split('\\')[1]
|
usr = username.split('\\')[1]
|
||||||
stager += "$netcred = New-Object System.Net.NetworkCredential("+usr+","+password+","+domain+");"
|
stager += "$netcred = New-Object System.Net.NetworkCredential('"+usr+"','"+password+"','"+domain+"');"
|
||||||
stager += helpers.randomize_capitalization("$wc.Proxy.Credentials = $netcred;")
|
stager += helpers.randomize_capitalization("$wc.Proxy.Credentials = $netcred;")
|
||||||
|
|
||||||
# TODO: reimplement stager retries?
|
# TODO: reimplement stager retries?
|
||||||
|
@ -294,7 +294,7 @@ class Listener:
|
||||||
launcherBase += "proxy_auth_handler = urllib2.ProxyBasicAuthHandler();\n"
|
launcherBase += "proxy_auth_handler = urllib2.ProxyBasicAuthHandler();\n"
|
||||||
username = proxyCreds.split(':')[0]
|
username = proxyCreds.split(':')[0]
|
||||||
password = proxyCreds.split(':')[1]
|
password = proxyCreds.split(':')[1]
|
||||||
launcherBase += "proxy_auth_handler.add_password(None,"+proxy+","+username+","+password+");\n"
|
launcherBase += "proxy_auth_handler.add_password(None,'"+proxy+"','"+username+"','"+password+"');\n"
|
||||||
launcherBase += "o = urllib2.build_opener(proxy, proxy_auth_handler);\n"
|
launcherBase += "o = urllib2.build_opener(proxy, proxy_auth_handler);\n"
|
||||||
else:
|
else:
|
||||||
launcherBase += "o = urllib2.build_opener(proxy);\n"
|
launcherBase += "o = urllib2.build_opener(proxy);\n"
|
||||||
|
|
|
@ -176,7 +176,7 @@ class Listener:
|
||||||
password = proxyCreds.split(':')[1]
|
password = proxyCreds.split(':')[1]
|
||||||
domain = username.split('\\')[0]
|
domain = username.split('\\')[0]
|
||||||
usr = username.split('\\')[1]
|
usr = username.split('\\')[1]
|
||||||
stager += "$netcred = New-Object System.Net.NetworkCredential("+usr+","+password+","+domain+");"
|
stager += "$netcred = New-Object System.Net.NetworkCredential('"+usr+"','"+password+"','"+domain+"');"
|
||||||
stager += helpers.randomize_capitalization("$wc.Proxy.Credentials = $netcred;")
|
stager += helpers.randomize_capitalization("$wc.Proxy.Credentials = $netcred;")
|
||||||
|
|
||||||
# TODO: reimplement stager retries?
|
# TODO: reimplement stager retries?
|
||||||
|
@ -262,7 +262,7 @@ class Listener:
|
||||||
launcherBase += "proxy_auth_handler = urllib2.ProxyBasicAuthHandler();\n"
|
launcherBase += "proxy_auth_handler = urllib2.ProxyBasicAuthHandler();\n"
|
||||||
username = proxyCreds.split(':')[0]
|
username = proxyCreds.split(':')[0]
|
||||||
password = proxyCreds.split(':')[1]
|
password = proxyCreds.split(':')[1]
|
||||||
launcherBase += "proxy_auth_handler.add_password(None,"+proxy+","+username+","+password+");\n"
|
launcherBase += "proxy_auth_handler.add_password(None,'"+proxy+"','"+username+"','"+password+"');\n"
|
||||||
launcherBase += "o = urllib2.build_opener(proxy, proxy_auth_handler);\n"
|
launcherBase += "o = urllib2.build_opener(proxy, proxy_auth_handler);\n"
|
||||||
else:
|
else:
|
||||||
launcherBase += "o = urllib2.build_opener(proxy);\n"
|
launcherBase += "o = urllib2.build_opener(proxy);\n"
|
||||||
|
|
Loading…
Reference in New Issue