forked from BC-SECURITY/Empire
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
185 lines (167 loc) · 5.55 KB
/
pyproject.toml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
[tool.poetry]
name = "empire-bc-security-fork"
version = "5.11.5"
description = ""
authors = ["BC Security <[email protected]>"]
readme = "README.md"
homepage = "https://github.com/BC-SECURITY/Empire"
repository = "https://github.com/BC-SECURITY/Empire.git"
packages = [
{ include = "empire.py" },
{ include = "empire/server/**/*.py" },
{ include = "empire/client/**/*.py" },
]
[tool.poetry.dependencies]
python = ">=3.10,<3.13"
urllib3 = "^2.2.0"
requests = "^2.31.0"
iptools = "^0.7.0"
macholib = "^1.16.3"
dropbox = "^11.36.2"
pyOpenSSL = "^24.0.0"
zlib_wrapper = "^0.1.3"
netifaces = "^0.11.0"
jinja2 = "^3.1.3"
xlutils = "^2.0.0"
pyparsing = "^3.1.1"
PyMySQL = "^1.1.0"
SQLAlchemy = "^2.0.27"
PyYAML = "^6.0.1"
SQLAlchemy-Utc = "^0.14.0"
prompt-toolkit = "^3.0.43"
terminaltables = "^3.1.10"
humanize = "^4.9.0"
pycryptodome = "^3.20.0"
cryptography = "^42.0.3"
fastapi = "^0.109.2"
uvicorn = "^0.27.1"
jq = "^1.6.0"
aiofiles = "^23.2.1"
python-multipart = "^0.0.9"
python-jose = {version = "^3.3.0", extras = ["cryptography"]}
passlib = {version = "^1.7.4", extras = ["bcrypt"]}
websockify = "^0.11.0"
websockets = "^12.0"
pyperclip = "^1.8.2"
pyvnc = {git = "https://github.com/BC-SECURITY/pyVNC.git"}
python-socketio = {extras = ["client"], version = "^5.11.1"}
Flask = "^3.0.2"
pysecretsocks = {git = "https://github.com/BC-SECURITY/PySecretSOCKS.git", rev = "da5be0e"}
donut-shellcode = { version = "^1.0.2", markers = "platform_machine == 'x86_64' or platform_machine == 'amd64'" }
python-obfuscator = "^0.0.2"
pyinstaller = "^6.4.0"
md2pdf = {git = "https://github.com/bc-security/md2pdf", rev = "48d5a46"}
tabulate = "^0.9.0"
stix2 = "^3.0.1"
docopt-ng = "^0.9.0"
packaging = "^23.2"
bcrypt = "4.0.1" # Locked to 4.0.1 due to passlib no longer being updated https://github.com/pyca/bcrypt/issues/684
[tool.poetry.group.dev.dependencies]
httpx = "^0.26.0" # For starlette TestClient
black = "^24.4.2"
pytest = "^8.0.1"
pytest-timeout = "^2.2.0"
ruff = "^0.5.3"
pytest-cov = "^4.1.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
extend-exclude = '''
(empire/server/data*)
| (empire/server/downloads*)
| (empire/client/generated-stagers*)
| (empire/client/downloads*)
'''
force-exclude = '''
(empire/server/data*)
| (empire/server/downloads*)
| (empire/client/generated-stagers*)
| (empire/client/downloads*)
'''
#include = '.*\.(plugin)$'
[tool.ruff]
extend-exclude = [
'empire/server/data',
'empire/server/downloads',
# This file is a pain to untangle for some of the linting rules
# it is from a 3rd party library, and its mostly untested.
'empire/server/common/pylnk.py',
'empire/server/common/malleable',
'empire/client/generated-stagers',
'empire/client/downloads',
'empire/server/plugins/Report-Generation-Plugin'
]
target-version = "py310"
[tool.ruff.lint]
# Will revisit line lengths later. Black won't format the strings and comments
# by default. And the experimental flag still has some issues.
# fixes right now: https://github.com/psf/black/issues/2188
extend-ignore = ["E501"]
select = [
"F", # pyflakes
"E", # pycodestyle
"W", # pycodestyle
# "C90", # mccabe
"I", # isort
"UP", # pyupgrade
# "S", # flake8-bandit
"B", # flake8-bugbear
"C4", # flake8-comprehensions
# "PT", # flake8-pytest-style
"RET", # flake8-return
"SLF", # flake8-self
"SIM", # flake8-simplify
# "TCH", # flake8-type-checking
# "ARG", # flake8-unused-arguments
# "PTH", # flake8-use-pathlib
# "ERA", # eradicate
"PLC", # pylint-convention
"PLE", # pylint-error
"PLW", # pylint-warning
"PLR", # pylint-refactor
# "TRY", # tryceratops
# "PERF", # perflint
"FURB", # refurb
"RUF", # ruff
]
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = ["fastapi.Depends", "fastapi.params.Depends", "fastapi.Query", "fastapi.params.Query", "fastapi.File"]
[tool.ruff.lint.per-file-ignores]
# client doesn't have tests and is not being actively developed,
# so I don't want to spend time on code quality and unintentionally
# breaking things.
"empire/client/*" = ["PLW", "PLR", "SLF001", "RET"]
# PLR, PLW: Each individual stager, listener, and module lacks tests, so it is not worth the
# risk to manually refactor them until there are tests in place for them.
"empire/server/listeners/*" = ["PLR0911", "PLR0912", "PLR0913", "PLR0915", "PLR2004", "PLW2901"]
"empire/server/stagers/*" = ["PLR0911", "PLR0912", "PLR0915"]
"empire/server/modules/*" = ["PLR0911", "PLR0912", "PLR0913", "PLR0915"]
# It's hard to limit arguments on the endpoint functions.
"empire/server/api/*" = ["PLR0913"]
"empire/server/listeners/http_malleable.py" = ["SLF"]
# Can't control how many fixtures are needed for the tests.
"empire/test/*" = ["PLR0913", "S", "SLF"]
"empire/server/modules/powershell/persistence/elevated/schtasks.py" = ["PLR2004"]
"empire/server/modules/powershell/persistence/elevated/wmi.py" = ["PLR2004"]
"empire/server/modules/powershell/persistence/elevated/wmi_updater.py" = ["PLR2004"]
"empire/server/plugins/reverseshell_stager_server/reverseshell_stager_server.py" = ["PLR2004"]
[tool.coverage.run]
omit = [
"empire/server/data/*",
]
[tool.coverage.report]
# https://coverage.readthedocs.io/en/latest/config.html
exclude_also = [
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
ignore_errors = true