1 | 1 |
Date: Fri, 27 Dec 2019 09:25:49 +0100
|
2 | 2 |
Subject: change-database-location
|
3 | 3 |
|
4 | |
Last-Update: 2020-10-19
|
|
4 |
Last-Update: 2020-11-30
|
5 | 5 |
---
|
6 | |
empire | 18 +++++++++++++++++-
|
|
6 |
empire | 21 ++++++++++++++++++---
|
7 | 7 |
lib/common/__init__.py | 4 +++-
|
8 | 8 |
lib/common/agents.py | 21 +++++++++++----------
|
9 | 9 |
lib/common/empire.py | 9 +++++----
|
10 | 10 |
lib/common/helpers.py | 6 +++---
|
11 | 11 |
setup/reset.sh | 20 ++++++++++----------
|
12 | 12 |
setup/setup_database.py | 2 +-
|
13 | |
7 files changed, 50 insertions(+), 30 deletions(-)
|
|
13 |
7 files changed, 51 insertions(+), 32 deletions(-)
|
14 | 14 |
|
15 | 15 |
diff --git a/empire b/empire
|
16 | |
index 8178180..1245e29 100755
|
|
16 |
index c8cb21e..5eed7db 100755
|
17 | 17 |
--- a/empire
|
18 | 18 |
+++ b/empire
|
19 | |
@@ -22,6 +22,22 @@ from time import sleep
|
|
19 |
@@ -24,8 +24,23 @@ from time import sleep
|
|
20 |
|
20 | 21 |
from flask import Flask, request, jsonify, make_response, abort, url_for, g
|
21 | 22 |
from flask.json import JSONEncoder
|
22 | |
from flask_socketio import SocketIO, emit
|
|
23 |
-from flask_socketio import SocketIO, emit, join_room, leave_room, \
|
|
24 |
- close_room, rooms, disconnect
|
|
25 |
+from flask_socketio import SocketIO, emit
|
23 | 26 |
+import shutil
|
24 | 27 |
+
|
25 | 28 |
+# database old path
|
|
39 | 42 |
|
40 | 43 |
# Empire imports
|
41 | 44 |
from lib.common import empire, helpers, users
|
42 | |
@@ -87,7 +103,7 @@ def database_connect():
|
|
45 |
@@ -91,7 +106,7 @@ def database_connect():
|
43 | 46 |
sqlite3.register_adapter(datetime, adapt_datetime)
|
44 | 47 |
sqlite3.register_converter("timestamp", convert_timestamp)
|
45 | 48 |
# set the database connectiont to autocommit w/ isolation level
|
|
71 | 74 |
conn.isolation_level = None
|
72 | 75 |
return conn
|
73 | 76 |
diff --git a/lib/common/agents.py b/lib/common/agents.py
|
74 | |
index 829eab8..a57baa0 100644
|
|
77 |
index 9dd24c0..7b80c1e 100644
|
75 | 78 |
--- a/lib/common/agents.py
|
76 | 79 |
+++ b/lib/common/agents.py
|
77 | 80 |
@@ -89,6 +89,7 @@ class Agents(object):
|
|
157 | 160 |
message = "[!] WARNING: agent {} attempted skywalker exploit!".format(self.sessionID)
|
158 | 161 |
signal = json.dumps({
|
159 | 162 |
diff --git a/lib/common/empire.py b/lib/common/empire.py
|
160 | |
index 465519b..fef3bed 100755
|
|
163 |
index 2c7cac9..8bcde38 100755
|
161 | 164 |
--- a/lib/common/empire.py
|
162 | 165 |
+++ b/lib/common/empire.py
|
163 | 166 |
@@ -191,7 +191,7 @@ class MainMenu(cmd.Cmd):
|
|
186 | 189 |
self.conn.isolation_level = None
|
187 | 190 |
return self.conn
|
188 | 191 |
diff --git a/lib/common/helpers.py b/lib/common/helpers.py
|
189 | |
index f6bdb21..5d0349e 100644
|
|
192 |
index 7b5fd6d..81429ed 100644
|
190 | 193 |
--- a/lib/common/helpers.py
|
191 | 194 |
+++ b/lib/common/helpers.py
|
192 | 195 |
@@ -273,7 +273,7 @@ def strip_powershell_comments(data):
|
|
264 | 267 |
+ rm -rf ~/.local/powershell-empire/downloads/
|
265 | 268 |
fi
|
266 | 269 |
diff --git a/setup/setup_database.py b/setup/setup_database.py
|
267 | |
index 915abbb..025492f 100755
|
|
270 |
index ec88437..cb6151a 100755
|
268 | 271 |
--- a/setup/setup_database.py
|
269 | 272 |
+++ b/setup/setup_database.py
|
270 | 273 |
@@ -65,7 +65,7 @@ OBFUSCATE_COMMAND = r'Token\All\1'
|