예제 #1
0
def main(argv):
    (logFile, logLevel, listenPort, spoofFavicon, killSessions, tamperConfigFile, injectFile) = parseOptions(argv)

    logging.basicConfig(level=logLevel, format='%(asctime)s %(message)s',
                        filename=logFile, filemode='w')

    # Verify is inject option is enabled
    if (injectFile != False):
        try:
            with open(injectFile, 'r') as f:
                HTMLInjector.getInstance().setInjectionCode(f.read())
        except IOError as e:
            logging.warning("Couldn't read " + injectFile)

    URLMonitor.getInstance().setFaviconSpoofing(spoofFavicon)
    CookieCleaner.getInstance().setEnabled(killSessions)
    ResponseTampererFactory.buildTamperer(tamperConfigFile)
    strippingFactory              = http.HTTPFactory(timeout=10)
    strippingFactory.protocol     = StrippingProxy

    reactor.listenTCP(int(listenPort), strippingFactory)
                
    print "\nsslstrip " + gVersion + " by Moxie Marlinspike running..."

    reactor.run()
예제 #2
0
    def _start(configs):

        logFile = configs['log_file']
        listenPort = configs['listen_port']
        spoofFavicon = configs['spoof_favicon']
        killSessions = configs['kill_sessions']
        logLevel = logging.WARNING

        logging.basicConfig(level=logLevel,
                            format='%(asctime)s %(message)s',
                            filename=logFile,
                            filemode='w')

        URLMonitor.getInstance().setFaviconSpoofing(spoofFavicon)
        CookieCleaner.getInstance().setEnabled(killSessions)

        strippingFactory = http.HTTPFactory(timeout=10)
        strippingFactory.protocol = StrippingProxy

        reactor.listenTCP(int(listenPort), strippingFactory)

        print "\nsslstrip " + gVersion + " by Moxie Marlinspike running..."
        print "+ POC by Leonardo Nve"

        reactor.run()
예제 #3
0
def main(argv):
    (logFile, logLevel, listenPort, spoofFavicon, killSessions, loadPlugins) = parseOptions(argv)
        
    logging.basicConfig(level=logLevel, format='%(asctime)s %(message)s',
                        filename=logFile, filemode='w')

    URLMonitor.getInstance().setFaviconSpoofing(spoofFavicon)
    CookieCleaner.getInstance().setEnabled(killSessions)

    strippingFactory              = http.HTTPFactory(timeout=10)
    strippingFactory.protocol     = StrippingProxy

    reactor.listenTCP(int(listenPort), strippingFactory)
                
    print "\nsslstrip " + gVersion + " by Moxie Marlinspike running..."

	# ------ SizeOne Mod ---------------------------------------
	# import The event manager class if detected
    if(os.path.exists("s1plugin") and loadPlugins):
        from s1plugin.S1StrippingProxy import S1StrippingProxy
        #create replace normal classes
        strippingFactory.protocol = S1StrippingProxy
    # ----------------------------------------------------------

    reactor.run()
예제 #4
0
def main(argv):
    (logFile, logLevel, listenPort, spoofFavicon,
     killSessions) = parseOptions(argv)

    logging.basicConfig(level=logLevel,
                        format='%(asctime)s %(message)s',
                        filename=logFile,
                        filemode='w')

    try:
        # make the file a command line option?
        with open('injection.txt', 'r') as f:
            HTMLInjector.getInstance().setInjectionCode(f.read())
    except IOError as e:
        logging.warning("Couldn't read injection.txt")

    URLMonitor.getInstance().setFaviconSpoofing(spoofFavicon)
    CookieCleaner.getInstance().setEnabled(killSessions)

    strippingFactory = http.HTTPFactory(timeout=10)
    strippingFactory.protocol = StrippingProxy

    reactor.listenTCP(int(listenPort), strippingFactory)

    print "\nsslstrip " + gVersion + " by Moxie Marlinspike running..."

    reactor.run()
예제 #5
0
    def start(self, logFile, logLevel, listenPort, spoofFavicon, killSessions):

        logging.basicConfig(level=logLevel,
                            format='%(asctime)s %(message)s',
                            filename=logFile,
                            filemode='w')

        URLMonitor.getInstance().setFaviconSpoofing(spoofFavicon)
        CookieCleaner.getInstance().setEnabled(killSessions)

        strippingFactory = http.HTTPFactory(timeout=10)
        strippingFactory.protocol = StrippingProxy
        reactor.listenTCP(int(listenPort), strippingFactory)
        print("\nsslstrip " + gVersion + " by Moxie Marlinspike running...")
        reactor.run()
예제 #6
0
def main(argv):
    (logFile, logLevel, listenPort, spoofFavicon, killSessions) = parseOptions(argv)
        
    logging.basicConfig(level=logLevel, format='%(asctime)s %(message)s',
                        filename=logFile, filemode='w')

    CookieCleaner.getInstance().setEnabled(killSessions)

    strippingFactory              = http.HTTPFactory(timeout=10)
    strippingFactory.protocol     = StrippingProxy

    reactor.listenTCP(int(listenPort), strippingFactory)
                
    print "\nsslstrip " + gVersion + " by Moxie Marlinspike running..."

    reactor.run()
예제 #7
0
def main(argv):
    (logFile, logLevel, listenPort, spoofFavicon,
     killSessions) = parseOptions(argv)

    logging.basicConfig(level=logLevel,
                        format='%(asctime)s %(message)s',
                        filename=logFile,
                        filemode='w')

    CookieCleaner.getInstance().setEnabled(killSessions)

    strippingFactory = http.HTTPFactory(timeout=10)
    strippingFactory.protocol = StrippingProxy

    reactor.listenTCP(int(listenPort), strippingFactory)

    print "\nsslstrip " + gVersion + " by Moxie Marlinspike running..."

    reactor.run()
예제 #8
0
def main(argv):
    (logFile, logLevel, listenPort, spoofFavicon, killSessions) = parseOptions(argv)
        
    logging.basicConfig(level=logLevel, format='%(asctime)s %(message)s',
                        filename=logFile, filemode='w')

    URLMonitor.getInstance().setFaviconSpoofing(spoofFavicon)
    CookieCleaner.getInstance().setEnabled(killSessions)

    strippingFactory              = http.HTTPFactory(timeout=10)
    strippingFactory.protocol     = StrippingProxy

    endpoint = endpoints.TCP4ServerEndpoint(reactor, int(listenPort)).listen(strippingFactory)
    
    print("\nsslstrip " + gVersion + " by Moxie Marlinspike running...")
    print("+ POC by Leonardo Nve")
    print("+ Updated by Samega 7Cattac")

    reactor.run()
예제 #9
0
파일: sslstrip2.py 프로젝트: BwRy/mana
    def _start(configs):

        logFile = configs['log_file']
        listenPort = configs['listen_port']
        spoofFavicon = configs['spoof_favicon']
        killSessions = configs['kill_sessions']
        logLevel = logging.WARNING
    
        logging.basicConfig(level=logLevel, format='%(asctime)s %(message)s',
                            filename=logFile, filemode='w')
    
        URLMonitor.getInstance().setFaviconSpoofing(spoofFavicon)
        CookieCleaner.getInstance().setEnabled(killSessions)
    
        strippingFactory              = http.HTTPFactory(timeout=10)
        strippingFactory.protocol     = StrippingProxy
    
        reactor.listenTCP(int(listenPort), strippingFactory)
                    
        print "\nsslstrip " + gVersion + " by Moxie Marlinspike running..."
        print "+ POC by Leonardo Nve"
    
        reactor.run()
예제 #10
0
파일: mitmf.py 프로젝트: rthijssen/MITMf
    )

    # All our options should be loaded now, pass them onto plugins
    print "[*] MITMf v%s started... initializing plugins and modules" % mitmf_version
    load = []
    try:
        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 MITM
    URLMonitor.getInstance().setFaviconSpoofing(args.favicon)
    CookieCleaner.getInstance().setEnabled(args.killsessions)
    ResponseTampererFactory.buildTamperer(args.tamper)
    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
    print "[*] sergio-proxy v%s online" % sergio_version

    reactor.run()

    # cleanup on exit
    for p in load:
예제 #11
0
    try:
        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

    #this whole msf loading process sucks. need to improve
    if args.msf_rc != "/tmp/tmp.rc" or os.stat("/tmp/tmp.rc").st_size != 0:
        from plugins.StartMSF import launch_msf
        launch_msf(args.msf_path, args.msf_rc, args.msf_user)

    #plugins are ready to go, start MITM
    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)

    print "\nsslstrip " + sslstrip_version + " by Moxie Marlinspike running..."
    print "sergio-proxy v%s online" % sergio_version

    reactor.run()

    #cleanup on exit
    for p in load:
        p.finish()
예제 #12
0
 def __init__(self, channel, queued, reactor=reactor):
     Request.__init__(self, channel, queued)
     self.reactor = reactor
     self.urlMonitor = URLMonitor.getInstance()
     self.cookieCleaner = CookieCleaner.getInstance()
     self.dnsCache = DnsCache.getInstance()