mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-16 10:03:52 -07:00
fixed some output
This commit is contained in:
parent
6121c67eaa
commit
88a4e15900
4 changed files with 9 additions and 6 deletions
|
@ -189,7 +189,7 @@ class ClientRequest(Request):
|
||||||
address = self.dnsCache.getCachedAddress(host)
|
address = self.dnsCache.getCachedAddress(host)
|
||||||
|
|
||||||
if address != None:
|
if address != None:
|
||||||
mitmf_logger.debug("[ClientRequest] Host cached: {} {}".format(host, str(address)))
|
mitmf_logger.debug("[ClientRequest] Host cached: {} {}".format(host, address))
|
||||||
return defer.succeed(address)
|
return defer.succeed(address)
|
||||||
else:
|
else:
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ class DnsCache:
|
||||||
def setCustomRes(self, host, ip_address=None):
|
def setCustomRes(self, host, ip_address=None):
|
||||||
if ip_address is not None:
|
if ip_address is not None:
|
||||||
self.cache[host] = ip_address
|
self.cache[host] = ip_address
|
||||||
mitmf_logger.debug("DNS entry set: %s -> %s" %(host, ip_address))
|
mitmf_logger.debug("[DNSCache] DNS entry set: %s -> %s" %(host, ip_address))
|
||||||
else:
|
else:
|
||||||
if self.customAddress is not None:
|
if self.customAddress is not None:
|
||||||
self.cache[host] = self.customAddress
|
self.cache[host] = self.customAddress
|
||||||
|
|
|
@ -75,6 +75,7 @@ class ServerConnection(HTTPClient):
|
||||||
self.clientInfo = "{} ".format(self.client.getClientIP())
|
self.clientInfo = "{} ".format(self.client.getClientIP())
|
||||||
|
|
||||||
mitmf_logger.info(self.clientInfo + "Sending Request: {}".format(self.headers['host']))
|
mitmf_logger.info(self.clientInfo + "Sending Request: {}".format(self.headers['host']))
|
||||||
|
mitmf_logger.debug("[ServerConnection] Full request: {}{}".format(self.headers['host'], self.uri))
|
||||||
|
|
||||||
self.plugins.hook()
|
self.plugins.hook()
|
||||||
self.sendCommand(self.command, self.uri)
|
self.sendCommand(self.command, self.uri)
|
||||||
|
@ -105,7 +106,7 @@ class ServerConnection(HTTPClient):
|
||||||
self.sendPostData()
|
self.sendPostData()
|
||||||
|
|
||||||
def handleStatus(self, version, code, message):
|
def handleStatus(self, version, code, message):
|
||||||
mitmf_logger.debug("[ServerConnection] Got server response: {0} {1} {2}".format(version, code, message))
|
mitmf_logger.debug("[ServerConnection] Server response: {0} {1} {2}".format(version, code, message))
|
||||||
self.client.setResponseCode(int(code), message)
|
self.client.setResponseCode(int(code), message)
|
||||||
|
|
||||||
def handleHeader(self, key, value):
|
def handleHeader(self, key, value):
|
||||||
|
@ -167,8 +168,10 @@ class ServerConnection(HTTPClient):
|
||||||
mitmf_logger.debug("[ServerConnection] Decompressing content...")
|
mitmf_logger.debug("[ServerConnection] Decompressing content...")
|
||||||
data = gzip.GzipFile('', 'rb', 9, StringIO.StringIO(data)).read()
|
data = gzip.GzipFile('', 'rb', 9, StringIO.StringIO(data)).read()
|
||||||
|
|
||||||
#mitmf_logger.debug("Read from server:\n" + data)
|
if len(data) < 1500:
|
||||||
mitmf_logger.debug("[ServerConnection] Read from server {} bytes of data".format(len(data)))
|
mitmf_logger.debug("[ServerConnection] Read from server {} bytes of data:\n{}".format(len(data), data))
|
||||||
|
else:
|
||||||
|
mitmf_logger.debug("[ServerConnection] Read from server {} bytes of data".format(len(data)))
|
||||||
|
|
||||||
data = self.replaceSecureLinks(data)
|
data = self.replaceSecureLinks(data)
|
||||||
res = self.plugins.hook()
|
res = self.plugins.hook()
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9707672de62bd42f651fabc6f9d368d7a67b4d99
|
Subproject commit d24a8c2237eaae372e60a47f175694e8afa07c32
|
Loading…
Add table
Add a link
Reference in a new issue