added an option to parse creds from a pcap using NetCreds, removed mitmflib as a dep (was causing problems for travis)

This commit is contained in:
byt3bl33d3r 2015-08-11 17:11:44 +02:00
commit 1a50f000c1
9 changed files with 51 additions and 23 deletions

View file

@ -18,8 +18,8 @@
# USA
#
from mitmflib.watchdog.observers import Observer
from mitmflib.watchdog.events import FileSystemEventHandler
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
from configobj import ConfigObj
class ConfigWatcher(FileSystemEventHandler):

View file

@ -48,10 +48,15 @@ class NetCreds:
def sniffer(self, interface, ip):
sniff(iface=interface, prn=pkt_parser, filter="not host {}".format(ip), store=0)
def start(self, interface, ip):
t = threading.Thread(name='NetCreds', target=self.sniffer, args=(interface, ip,))
t.setDaemon(True)
t.start()
def start(self, interface, ip, pcap):
if pcap:
for pkt in PcapReader(pcap):
pkt_parser(pkt)
sys.exit()
else:
t = threading.Thread(name='NetCreds', target=self.sniffer, args=(interface, ip,))
t.setDaemon(True)
t.start()
def pkt_parser(pkt):
'''

View file

@ -149,7 +149,7 @@ class Settings(ConfigWatcher):
self.AnalyzeMode = options.analyze
#self.Upstream_Proxy = options.Upstream_Proxy
self.Verbose = False
self.Verbose = True
if options.log_level == 'debug':
self.Verbose = True

View file

@ -42,7 +42,7 @@ from core.configwatcher import ConfigWatcher
from core.utils import shutdown
from core.logger import logger
from mitmflib.dnslib import *
from dnslib import *
from IPy import IP
formatter = logging.Formatter("%(asctime)s %(clientip)s [DNS] %(message)s", datefmt="%Y-%m-%d %H:%M:%S")

View file

@ -25,7 +25,7 @@ import gzip
import StringIO
import sys
from mitmflib.user_agents import parse
from user_agents import parse
from twisted.web.http import HTTPClient
from URLMonitor import URLMonitor
from core.proxyplugins import ProxyPlugins