main
Bob Mottram 2022-10-03 13:23:39 +01:00
parent 6e703f206c
commit e40ac467fd
1 changed files with 6 additions and 3 deletions

View File

@ -465,7 +465,8 @@ class PubServer(BaseHTTPRequestHandler):
for header_name in check_headers:
if self.headers.get(header_name):
if interloper in self.headers[header_name]:
print('MITM: ' + self.headers[header_name])
print('MITM: ' + header_name + ' = ' +
self.headers[header_name])
return True
# The presence of these headers on their own indicates a MiTM
mitm_headers = (
@ -474,10 +475,12 @@ class PubServer(BaseHTTPRequestHandler):
)
for header_name in mitm_headers:
if self.headers.get(header_name):
print('MITM: ' + self.headers[header_name])
print('MITM: ' + header_name + ' = ' +
self.headers[header_name])
return True
if self.headers.get(header_name.lower()):
print('MITM: ' + self.headers[header_name])
print('MITM: ' + header_name + ' = ' +
self.headers[header_name.lower()])
return True
return False