Codebase list powershell-empire / 589f13e
Refresh patches Sophie Brun 3 years ago
2 changed file(s) with 21 addition(s) and 20 deletion(s). Raw diff Collapse all Expand all
11 Date: Fri, 27 Dec 2019 09:25:49 +0100
22 Subject: change-database-location
33
4 Last-Update: 2020-06-10
45 ---
56 empire | 18 +++++++++++++++++-
67 lib/common/__init__.py | 4 +++-
1213 7 files changed, 47 insertions(+), 27 deletions(-)
1314
1415 diff --git a/empire b/empire
15 index 3fc5175..584669b 100755
16 index 4132fc0..b20fbe4 100755
1617 --- a/empire
1718 +++ b/empire
18 @@ -9,6 +9,22 @@ import hashlib
19 @@ -12,6 +12,22 @@ import hashlib
1920 from OpenSSL import SSL
2021 import ssl
2122 import ast
3839
3940 # Empire imports
4041 from lib.common import empire, helpers, users
41 @@ -45,7 +61,7 @@ def database_connect():
42 """
43 try:
42 @@ -76,7 +92,7 @@ def database_connect():
43 sqlite3.register_adapter(datetime, adapt_datetime)
44 sqlite3.register_converter("timestamp", convert_timestamp)
4445 # set the database connectiont to autocommit w/ isolation level
45 - conn = sqlite3.connect('./data/empire.db', check_same_thread=False)
46 + conn = sqlite3.connect(os.path.join(DB_PATH, 'empire.db'), check_same_thread=False)
46 - conn = sqlite3.connect('./data/empire.db', check_same_thread=False, detect_types=sqlite3.PARSE_DECLTYPES)
47 + conn = sqlite3.connect(os.path.join(DB_PATH, 'empire.db'), check_same_thread=False, detect_types=sqlite3.PARSE_DECLTYPES)
4748 conn.text_factory = str
4849 conn.isolation_level = None
4950 return conn
7071 conn.isolation_level = None
7172 return conn
7273 diff --git a/lib/common/agents.py b/lib/common/agents.py
73 index a104962..6e21b67 100644
74 index 700cfe9..9b29bb1 100644
7475 --- a/lib/common/agents.py
7576 +++ b/lib/common/agents.py
7677 @@ -87,6 +87,7 @@ class Agents(object):
144145 f.write(task)
145146 f.close()
146147 return pk
147 @@ -1952,8 +1953,8 @@ class Agents(object):
148 @@ -1951,8 +1952,8 @@ class Agents(object):
148149 elif responseName == "TASK_CMD_JOB":
149150 #check if this is the powershell keylogging task, if so, write output to file instead of screen
150151 if keyLogTaskID and keyLogTaskID == taskID:
156157 message = "[!] WARNING: agent {} attempted skywalker exploit!".format(self.sessionID)
157158 signal = json.dumps({
158159 diff --git a/lib/common/empire.py b/lib/common/empire.py
159 index d41e7e5..1aeb5d9 100644
160 index a7794a7..caef7e3 100755
160161 --- a/lib/common/empire.py
161162 +++ b/lib/common/empire.py
162 @@ -182,7 +182,7 @@ class MainMenu(cmd.Cmd):
163 @@ -187,7 +187,7 @@ class MainMenu(cmd.Cmd):
163164
164165 # if --debug X is passed, log out all dispatcher signals
165166 if self.args.debug:
168169 debug_file.write("%s %s : %s\n" % (helpers.get_datetime(), sender, signal))
169170
170171 if self.args.debug == '2':
171 @@ -316,7 +316,8 @@ class MainMenu(cmd.Cmd):
172 @@ -321,7 +321,8 @@ class MainMenu(cmd.Cmd):
172173 """
173174 try:
174175 # set the database connectiont to autocommit w/ isolation level
179180 self.conn.isolation_level = None
180181 return self.conn
181182 diff --git a/lib/common/helpers.py b/lib/common/helpers.py
182 index 6942283..9dc8058 100644
183 index 18ece4e..b227baa 100644
183184 --- a/lib/common/helpers.py
184185 +++ b/lib/common/helpers.py
185186 @@ -594,7 +594,7 @@ def get_config(fields):
248249 + rm -rf ~/.local/powershell-empire/downloads/
249250 fi
250251 diff --git a/setup/setup_database.py b/setup/setup_database.py
251 index 9453037..d8f62a4 100755
252 index 76091ca..44971b7 100755
252253 --- a/setup/setup_database.py
253254 +++ b/setup/setup_database.py
254255 @@ -60,7 +60,7 @@ OBFUSCATE_COMMAND = r'Token\All\1'
1919 from builtins import hex
2020 from builtins import object
2121 diff --git a/lib/modules/python/collection/osx/keychaindump_chainbreaker.py b/lib/modules/python/collection/osx/keychaindump_chainbreaker.py
22 index 13c00b0..c2838b7 100644
22 index 36a6368..e8959a5 100644
2323 --- a/lib/modules/python/collection/osx/keychaindump_chainbreaker.py
2424 +++ b/lib/modules/python/collection/osx/keychaindump_chainbreaker.py
25 @@ -1207,7 +1207,7 @@ def __profile__():
25 @@ -1211,7 +1211,7 @@ def __profile__():
2626
2727
2828
3131
3232 # A simple implementation of pbkdf2 using stock python modules. See RFC2898
3333 # for details. Basically, it derives a key from a password and salt.
34 @@ -1284,7 +1284,7 @@ def test():
34 @@ -1288,7 +1288,7 @@ def test():
3535
3636
3737
4141 # Author : n0fate
4242 # E-Mail [email protected], [email protected]
4343 diff --git a/lib/modules/python/collection/osx/sniffer.py b/lib/modules/python/collection/osx/sniffer.py
44 index c6c614c..369d19e 100644
44 index e04130c..2ecd531 100644
4545 --- a/lib/modules/python/collection/osx/sniffer.py
4646 +++ b/lib/modules/python/collection/osx/sniffer.py
4747 @@ -1,4 +1,4 @@
5050 from builtins import object
5151 class Module(object):
5252 def __init__(self, mainMenu, params=[]):
53 @@ -239,4 +239,4 @@ if not IN_MEMORY:
53 @@ -243,4 +243,4 @@ if not IN_MEMORY:
5454
5555 # add any arguments to the end exec
5656
5858 \ No newline at end of file
5959 + return script
6060 diff --git a/lib/modules/python/situational_awareness/host/osx/situational_awareness.py b/lib/modules/python/situational_awareness/host/osx/situational_awareness.py
61 index 9f7f8a4..8241891 100644
61 index 504dd9b..84407b6 100644
6262 --- a/lib/modules/python/situational_awareness/host/osx/situational_awareness.py
6363 +++ b/lib/modules/python/situational_awareness/host/osx/situational_awareness.py
6464 @@ -1,4 +1,4 @@