mirror of https://github.com/n1nj4sec/pupy.git
travis: fix style
This commit is contained in:
parent
a35bd8f2ec
commit
211892aebf
|
@ -98,7 +98,6 @@ class http(PupyModule):
|
|||
self.log(result)
|
||||
|
||||
except Exception, e:
|
||||
raise
|
||||
if hasattr(e, 'reason'):
|
||||
message = '{} {} ({})'.format(e.code, e.reason, e.filename)
|
||||
if e.code / 100 < 4:
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
from pupylib.PupyModule import config, PupyModule, PupyArgumentParser
|
||||
from pupylib.PupyOutput import Table
|
||||
|
||||
|
||||
@config(cat='creds')
|
||||
class NetCreds(PupyModule):
|
||||
''' Manage saved authentication information '''
|
||||
|
||||
|
|
|
@ -112,32 +112,41 @@ class ProxyError(IOError):
|
|||
def __str__(self):
|
||||
return self.msg
|
||||
|
||||
|
||||
class GeneralProxyError(ProxyError):
|
||||
pass
|
||||
|
||||
|
||||
class ProxyConnectionError(ProxyError):
|
||||
pass
|
||||
|
||||
|
||||
class SOCKS5AuthError(ProxyError):
|
||||
pass
|
||||
|
||||
|
||||
class SOCKS5Error(ProxyError):
|
||||
pass
|
||||
|
||||
|
||||
class SOCKS4Error(ProxyError):
|
||||
pass
|
||||
|
||||
|
||||
class HTTPError(ProxyError):
|
||||
pass
|
||||
|
||||
|
||||
class AuthenticationRequired(ProxyError):
|
||||
__slots__ = ('methods',)
|
||||
|
||||
def __init__(self, methods):
|
||||
super(AuthenticationRequired, self).__init__(
|
||||
'Authentication required, supported methods: {}'.format(
|
||||
';'.join(methods)))
|
||||
self.methods = methods
|
||||
|
||||
|
||||
class AuthenticationImpossible(EOFError):
|
||||
pass
|
||||
|
||||
|
@ -1131,7 +1140,7 @@ class socksocket(_BaseSocket):
|
|||
try:
|
||||
self._connect(self, dest_pair)
|
||||
break
|
||||
except AuthenticationRequired as e:
|
||||
except AuthenticationRequired:
|
||||
_orig_socket.__init__(
|
||||
self, *self._orig_args, **self._orig_kwargs)
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ class HTTPContext(urllib2.BaseHandler):
|
|||
if host not in self.headers:
|
||||
self.headers[host] = {}
|
||||
|
||||
self.headers[host][header] = request.get_headers(header)
|
||||
self.headers[host][header] = headers.get(header)
|
||||
|
||||
https_request = http_request
|
||||
https_response = http_response
|
||||
|
|
Loading…
Reference in New Issue