mirror of https://github.com/n1nj4sec/pupy.git
PAC: omit invalid proxy statements
This commit is contained in:
parent
81ae67a476
commit
25e96ca739
|
@ -214,11 +214,19 @@ class PACPlayer(object):
|
|||
return
|
||||
|
||||
for proxy in (x.strip() for x in proxies.split(';')):
|
||||
if proxy == 'DIRECT':
|
||||
if not proxy:
|
||||
continue
|
||||
|
||||
elif proxy == 'DIRECT':
|
||||
yield Proxy('DIRECT', None, None, None)
|
||||
continue
|
||||
|
||||
proto, addr = proxy.split()
|
||||
try:
|
||||
proto, addr = proxy.split()
|
||||
except ValueError:
|
||||
logger.info('Invalid proxy spec: %s', proxy)
|
||||
continue
|
||||
|
||||
if proto == 'PROXY':
|
||||
proto = 'HTTP'
|
||||
elif proto == 'SOCKS':
|
||||
|
|
Loading…
Reference in New Issue