cleanup string interpolations

master
Michele Guerini Rocco 2019-05-14 19:47:54 +02:00
parent abfb140dc8
commit 8533e24622
Signed by: rnhmjoj
GPG Key ID: 91BE884FBA4B591A
1 changed files with 5 additions and 5 deletions

View File

@ -98,7 +98,7 @@ class ProxyRequestHandler(BaseHTTPRequestHandler):
'''
# request line: CONNECT www.example.com:443 HTTP/1.1
self.host, self.port = self.path.split(':')
# SSL MITM
# TLS MITM
self.wfile.write(
('HTTP/1.1 200 Connection established\r\n'
+ f'Proxy-agent: {self.version_string()}\r\n'
@ -137,11 +137,11 @@ class ProxyRequestHandler(BaseHTTPRequestHandler):
if hasattr(self, 'url'):
# Happens after the tunnel is established
logger.warning(f'{self.reqNum:03d} "{e}" while operating'
f' on established local SSL tunnel for'
f' on established local TSL tunnel for'
f' [{self.url}]')
else:
logger.warning(f'{self.reqNum:03d} "{e}" while trying to'
' establish local SSL tunnel for'
' establish local TLS tunnel for'
f'[{self.path}]')
self.close_connection = 1
@ -205,7 +205,7 @@ class ProxyRequestHandler(BaseHTTPRequestHandler):
break
server_conn.setblocking(True)
if b'200' in datas and b'established' in datas.lower():
logger.info('{:03d} [P] SSL Pass-Thru: https://{}/'.format(
logger.info('{:03d} [P] TLS passthru: https://{}/'.format(
self.reqNum, self.path))
self.wfile.write(('HTTP/1.1 200 Connection established\r\n' +
'Proxy-agent: {}\r\n\r\n'.format(
@ -233,7 +233,7 @@ class ProxyRequestHandler(BaseHTTPRequestHandler):
'''
Tunnel traffic to remote host:port
'''
logger.info('{:03d} [D] SSL Pass-Thru: https://{}/'.format(
logger.info('{:03d} [D] TLS passthru: https://{}/'.format(
self.reqNum, self.path))
server_conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try: