def initialize(self, options): self.options = options self.mass_poisoned_browsers = [] self.urlMonitor = URLMonitor.getInstance() try: self.config = options.configfile['AppCachePoison'] except Exception, e: sys.exit("[-] Error parsing config file for AppCachePoison: " + str(e))
def initialize(self, options): '''Called if plugin is enabled, passed the options namespace''' self.options = options self.config_file = "./config/app_cache_poison.cfg" self.config = None self.mass_poisoned_browsers = [] self.urlMonitor = URLMonitor.getInstance() print "[*] App Cache Poison plugin online" self.createTamperer(self.config_file)
def initialize(self, options): '''Called if plugin is enabled, passed the options namespace''' self.options = options self.mass_poisoned_browsers = [] self.urlMonitor = URLMonitor.getInstance() try: self.config = options.configfile['AppCachePoison'] except Exception, e: sys.exit("[-] Error parsing config file for AppCachePoison: " + str(e))
class HSTSbypass(Plugin): name = 'SSLstrip+' optname = 'hsts' desc = 'Enables SSLstrip+ for partial HSTS bypass' has_opts = False def initialize(self, options): self.options = options try: config = options.configfile['SSLstrip+'] except Exception, e: sys.exit("[-] Error parsing config for SSLstrip+: " + str(e)) print "[*] SSLstrip+ plugin online" URLMonitor.getInstance().setHstsBypass(config)
class HSTSbypass(Plugin): name = 'SSLstrip+' optname = 'hsts' desc = 'Enables SSLstrip+ for partial HSTS bypass' version = "0.2" has_opts = False req_root = False def initialize(self, options): self.options = options try: config = options.configfile['SSLstrip+'] except Exception, e: sys.exit("[-] Error parsing config for SSLstrip+: " + str(e)) print "| |_ SSLstrip+ by Leonardo Nve running" URLMonitor.getInstance().setHstsBypass(config)
if getattr(args, p.optname): p.initialize(args) load.append(p) except Exception, e: print "[-] Error loading plugin %s: %s" % (p.name, str(e)) #Plugins are ready to go, start MITMf if args.disproxy: ProxyPlugins.getInstance().setPlugins(load) else: from libs.sslstrip.StrippingProxy import StrippingProxy from libs.sslstrip.URLMonitor import URLMonitor URLMonitor.getInstance().setFaviconSpoofing(args.favicon) CookieCleaner.getInstance().setEnabled(args.killsessions) ProxyPlugins.getInstance().setPlugins(load) strippingFactory = http.HTTPFactory(timeout=10) strippingFactory.protocol = StrippingProxy reactor.listenTCP(args.listen, strippingFactory) #load custom reactor options for plugins that have the 'plugin_reactor' attribute for p in plugins: if getattr(args, p.optname): if hasattr(p, 'plugin_reactor'): p.plugin_reactor( strippingFactory ) #we pass the default strippingFactory, so the plugins can use it
for p in plugins: if getattr(args, p.optname): p.initialize(args) load.append(p) except NotImplementedError: print "Plugin %s lacked initialize function." % p.name #Plugins are ready to go, start MITMf if args.disproxy: ProxyPlugins.getInstance().setPlugins(load) else: from libs.sslstrip.StrippingProxy import StrippingProxy from libs.sslstrip.URLMonitor import URLMonitor URLMonitor.getInstance().setValues(args.favicon, args.hsts) CookieCleaner.getInstance().setEnabled(args.killsessions) ProxyPlugins.getInstance().setPlugins(load) strippingFactory = http.HTTPFactory(timeout=10) strippingFactory.protocol = StrippingProxy reactor.listenTCP(args.listen, strippingFactory) print "\n[*] sslstrip v%s by Moxie Marlinspike running..." % sslstrip_version if args.hsts: print "[*] sslstrip+ by Leonardo Nve running..." print "[*] sergio-proxy v%s online" % sergio_version reactor.run()
if getattr(args, p.optname): p.initialize(args) load.append(p) except Exception, e: print "[-] Error loading plugin %s: %s" % (p.name, str(e)) #Plugins are ready to go, start MITMf if args.disproxy: ProxyPlugins.getInstance().setPlugins(load) else: from libs.sslstrip.StrippingProxy import StrippingProxy from libs.sslstrip.URLMonitor import URLMonitor URLMonitor.getInstance().setFaviconSpoofing(args.favicon) CookieCleaner.getInstance().setEnabled(args.killsessions) ProxyPlugins.getInstance().setPlugins(load) strippingFactory = http.HTTPFactory(timeout=10) strippingFactory.protocol = StrippingProxy reactor.listenTCP(args.listen, strippingFactory) #load custom reactor options for plugins that have the 'plugin_reactor' attribute for p in plugins: if getattr(args, p.optname): if hasattr(p, 'plugin_reactor'): p.plugin_reactor(strippingFactory) #we pass the default strippingFactory, so the plugins can use it print "|"