forked from infobyte/faraday
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsession.py
32 lines (25 loc) · 897 Bytes
/
session.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
'''
Faraday Penetration Test IDE
Copyright (C) 2013 Infobyte LLC (http://www.infobytesec.com/)
See the file 'doc/LICENSE' for the license information
'''
import time
import datetime
import hashlib
class Session(object):
"""
It will handle a Faraday session, that contains:
- current user logged in
- session start time
- duration
- workspace history (?...here?)
- current workspace (?...here?)
"""
def __init__(self, user):
self.logged_user = user
self.start_time = datetime.datetime.now()
self.workspace_history = []
self.current_workspace = None
self.__token = hashlib.sha224("%s_%s" % (self.logged_user, self.start_time)).hexdigest()
def get_token():
return self.__token