second implementation of the HTTP server, you can now define shares for the SMB server in the config file, added an option to switch between the normal SMB server and the Karma version.

removed some useless code (left over from the responder plugin), serverResponseStatus hook now returns a dict (tuple was causing errors)
This commit is contained in:
byt3bl33d3r 2015-05-30 15:00:41 +02:00
parent e985d42a8a
commit 14580f1589
14 changed files with 806 additions and 920 deletions

View file

@ -72,7 +72,12 @@ class ServerConnection(HTTPClient):
def sendRequest(self):
if self.command == 'GET':
try:
mitmf_logger.info("{} [type:{} os:{}] Sending Request: {}".format(self.client.getClientIP(), self.clientInfo[1], self.clientInfo[0], self.headers['host']))
if ('Unknown' in self.clientInfo[0]) or ('Unknown' in self.clientInfo[1]):
mitmf_logger.info("{} Sending Request: {}".format(self.client.getClientIP(), self.headers['host']))
else:
mitmf_logger.info("{} [type:{} os:{}] Sending Request: {}".format(self.client.getClientIP(), self.clientInfo[1], self.clientInfo[0], self.headers['host']))
except Exception as e:
mitmf_logger.debug("[ServerConnection] Unable to parse UA: {}".format(e))
mitmf_logger.info("{} Sending Request: {}".format(self.client.getClientIP(), self.headers['host']))
@ -120,10 +125,12 @@ class ServerConnection(HTTPClient):
self.sendPostData()
def handleStatus(self, version, code, message):
try:
version, code, message = self.plugins.hook()
except ValueError:
pass
values = self.plugins.hook()
version = values['version']
code = values['code']
message = values['message']
mitmf_logger.debug("[ServerConnection] Server response: {} {} {}".format(version, code, message))
self.client.setResponseCode(int(code), message)