-
-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy pathpyproject.toml
More file actions
167 lines (152 loc) · 4.64 KB
/
Copy pathpyproject.toml
File metadata and controls
167 lines (152 loc) · 4.64 KB
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
[build-system]
requires = ["maturin>=1.9.4"]
build-backend = "maturin"
[project]
name = "lockknife"
version = "1.1.0"
description = "LockKnife: Android security research, forensics, and ethical hacking tool"
readme = "README.md"
requires-python = ">=3.12"
license = { text = "GPL-3.0-only" }
authors = [{ name = "ImKKingshuk" }]
urls = { Homepage = "https://github.com/ImKKingshuk/LockKnife", Documentation = "https://lockknife.vercel.app" }
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Topic :: Security",
]
dependencies = [
"click>=8.1",
"rich>=13.0",
"jinja2>=3.1",
"defusedxml>=0.7",
"pydantic>=2.0",
"pydantic-settings>=2.0",
"structlog>=23.0",
]
[project.optional-dependencies]
apk = ["androguard>=4.0"]
frida = ["frida-tools>=12.0"]
ml = ["scikit-learn>=1.3", "numpy>=1.24", "joblib>=1.3"]
yara = ["yara-python>=4.3"]
threat-intel = ["vt-py>=0.18", "OTXv2>=1.5"]
network = ["scapy>=2.5"]
# Exploitation framework dependencies (Linux-only, install manually)
# Note: UV's dependency resolver doesn't properly respect platform markers for these
# exploitation-core = ["bleak>=0.21.0; sys_platform == 'linux'", "impacket>=0.11.0"]
# exploitation-bluetooth = ["lockknife[exploitation-core]", "pybluez>=0.23; sys_platform == 'linux'"]
# exploitation = ["lockknife[exploitation-core,exploitation-bluetooth]; sys_platform == 'linux'"]
# Keep ML opt-in until joblib's unresolved PYSEC-2024-277 advisory has a fixed release.
full = ["lockknife[apk,frida,yara,threat-intel,network]"]
dev = [
"pytest>=8.0",
"pytest-mock>=3.12",
"pytest-cov>=5.0",
"bandit>=1.7",
"pip-audit>=2.7",
"ty>=0.0.29",
"ruff>=0.15.9",
"maturin>=1.9.4",
"hypothesis>=6.0",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-q"
pythonpath = ["."]
asyncio_mode = "auto"
[tool.coverage.run]
branch = true
source = ["lockknife", "lockknife_headless_cli"]
omit = [
"lockknife/__main__.py",
"lockknife_headless_cli/interactive.py",
]
[tool.coverage.report]
skip_covered = true
show_missing = true
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
]
[tool.ty]
[tool.ty.src]
include = ["lockknife", "lockknife_headless_cli"]
[tool.ty.analysis]
respect-type-ignore-comments = true
allowed-unresolved-imports = [
"OTXv2",
"androguard",
"androguard.core.bytecodes.apk",
"bleak",
"bluetooth",
"frida",
"joblib",
"numpy",
"scapy",
"sklearn",
"sklearn.ensemble",
"sklearn.neighbors",
"vt",
"weasyprint",
"xhtml2pdf",
"yara",
]
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"SIM", # flake8-simplify
]
ignore = [
"E501", # large existing corpus of long literals/messages
"B008", # existing API defaults use call expressions in places
"F841", # existing CLI/progress code keeps intentionally assigned values
"E402", # several modules intentionally stage imports around runtime setup
"SIM103", # style-only simplification across many existing helpers
"SIM105", # style-only conversion to contextlib.suppress
"SIM117", # style-only nested-with flattening
"SIM102", # style-only nested-if flattening
"SIM118", # style-only dict membership rewrite
"SIM108", # style-only ternary rewrites
"C401", # style-only comprehension rewrite
"UP042", # defer StrEnum migration for compatibility/readability reasons
"F401", # existing package/module exports rely on imported names
"SIM115", # style-only context-manager rewrites
"SIM116", # style-only dict-dispatch rewrites
"F601", # historical duplicate-key fixtures remain tolerated for now
"B905", # strict zip migration deferred across older call sites
]
[tool.ruff.lint.isort]
known-first-party = ["lockknife", "lockknife_headless_cli"]
[project.scripts]
lockknife = "lockknife_headless_cli.main:cli"
[tool.maturin]
manifest-path = "lockknife-core/Cargo.toml"
module-name = "lockknife.lockknife_core"
python-source = "."
python-packages = ["lockknife", "lockknife_headless_cli"]
include = [
{ path = "lockknife_headless_cli/**/*.py", format = ["sdist", "wheel"] },
]
[dependency-groups]
dev = [
"pytest-asyncio>=1.3.0",
"ruff>=0.15.9",
"ty>=0.0.29",
]