mirror of
https://github.com/mvt-project/mvt.git
synced 2026-09-03 16:41:05 +02:00
Several MVT commands have nothing to do with the acquisition of one platform, yet they were reachable only through mvt-ios and mvt-android. Asking which version is installed or downloading the public indicators meant picking one of the two platform commands arbitrarily, and each of those tasks had to be written, documented and maintained twice. Add a third console script, mvt, hosting the commands which belong to no platform: version and download-iocs for now, with completion following in a later commit. Commands installed in the new mvt.cli_plugins entry-point group are registered on mvt, and on mvt only, so that a command package chooses the CLI each of its commands is added to: mvt.ios.cli_plugins for mvt-ios, mvt.android.cli_plugins for mvt-android and mvt.cli_plugins for mvt. A command wanted on both platform CLIs is registered in both platform groups; no group adds a command to every CLI. The MVT_CUSTOM_COMMANDS variable loads command files and folders into mvt the way the platform variables already do for mvt-ios and mvt-android. Run on its own, mvt prints the banner and its help instead of a usage error. The help text reminds that the forensic analysis of an acquisition runs through mvt-ios and mvt-android, so that the command which knows nothing about acquisitions says where they are analysed. version and download-iocs stay on mvt-ios and mvt-android for now, so that no documented invocation stops working. They are to be dropped from the platform CLIs in a later release, once mvt has been available long enough for the change to be announced. Unlike mvt-ios and mvt-android, which point at their subpackages, the console script points at mvt.cli:main and the mvt package re-exports nothing of it. Importing mvt has to stay cheap and free of side effects: it is the package plugins import from, and pulling in Click, the CLI and everything the commands import merely because something imported mvt would work against that. While here, give the version command of both platform CLIs the context settings every other command already has, so that "mvt-ios version -h" prints its help instead of failing on an unknown option.
126 lines
3.2 KiB
TOML
126 lines
3.2 KiB
TOML
[project]
|
|
name = "mvt"
|
|
dynamic = ["version"]
|
|
authors = [{ name = "Claudio Guarnieri", email = "nex@nex.sx" }]
|
|
maintainers = [
|
|
{ name = "Etienne Maynier", email = "tek@randhome.io" },
|
|
{ name = "Donncha Ó Cearbhaill", email = "donncha.ocearbhaill@amnesty.org" },
|
|
{ name = "Rory Flynn", email = "rory.flynn@amnesty.org" },
|
|
]
|
|
description = "Mobile Verification Toolkit"
|
|
readme = "README.md"
|
|
keywords = ["security", "mobile", "forensics", "malware"]
|
|
classifiers = [
|
|
"Development Status :: 5 - Production/Stable",
|
|
"Intended Audience :: Information Technology",
|
|
"Operating System :: OS Independent",
|
|
"Programming Language :: Python",
|
|
]
|
|
dependencies = [
|
|
"click==8.4.2",
|
|
"rich==15.0.0",
|
|
"tld==0.13.2",
|
|
"requests==2.34.2",
|
|
"simplejson==4.1.1",
|
|
"packaging==26.3",
|
|
"appdirs==1.4.4",
|
|
"iOSbackup==0.9.925",
|
|
"adb-shell[usb]==0.4.4",
|
|
"libusb1==3.4.0",
|
|
"cryptography==50.0.0",
|
|
"PyYAML>=6.0.2",
|
|
"pyahocorasick==2.3.1",
|
|
"betterproto2==0.10.0",
|
|
"pydantic==2.13.4",
|
|
"pydantic-settings==2.15.0",
|
|
"NSKeyedUnArchiver==1.5.2",
|
|
"python-dateutil==2.9.0.post0",
|
|
"tzdata==2026.3",
|
|
]
|
|
requires-python = ">= 3.10"
|
|
|
|
[project.urls]
|
|
homepage = "https://docs.mvt.re/en/latest/"
|
|
repository = "https://github.com/mvt-project/mvt"
|
|
|
|
[project.scripts]
|
|
mvt = "mvt.cli:main"
|
|
mvt-ios = "mvt.ios:main"
|
|
mvt-android = "mvt.android:main"
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"requests>=2.31.0",
|
|
"pytest>=7.4.3",
|
|
"pytest-cov>=4.1.0",
|
|
"pytest-github-actions-annotate-failures>=0.2.0",
|
|
"pytest-mock>=3.14.0",
|
|
"stix2>=3.0.1",
|
|
"ruff>=0.1.6",
|
|
"mypy>=1.7.1",
|
|
"betterproto2-compiler",
|
|
"types-PyYAML>=6.0.12.20250516",
|
|
"types-python-dateutil>=2.9.0.20250822",
|
|
"types-requests>=2.32.4.20250913",
|
|
]
|
|
docs = [
|
|
"mkdocs==1.6.1",
|
|
"mkdocs-autorefs==1.4.4",
|
|
"mkdocs-material==9.7.7",
|
|
"mkdocs-material-extensions==1.3.1",
|
|
"mkdocstrings==1.0.6",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=61.0"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.coverage.run]
|
|
omit = ["tests/*"]
|
|
|
|
[tool.coverage.html]
|
|
directory = "htmlcov"
|
|
|
|
[tool.mypy]
|
|
install_types = false
|
|
ignore_missing_imports = true
|
|
packages = "src"
|
|
|
|
[tool.pytest.ini_options]
|
|
addopts = "-ra -q --cov=mvt --cov-report html --junitxml=pytest.xml --cov-report=term-missing:skip-covered"
|
|
testpaths = ["tests"]
|
|
|
|
[tool.ruff]
|
|
lint.select = ["C90", "E", "F", "W"] # flake8 default set
|
|
lint.ignore = [
|
|
"E501", # don't enforce line length violations
|
|
"C901", # complex-structure
|
|
|
|
# These were previously ignored but don't seem to be required:
|
|
# "E265", # no-space-after-block-comment
|
|
# "F401", # unused-import
|
|
# "E127", # not included in ruff
|
|
# "W503", # not included in ruff
|
|
# "E226", # missing-whitespace-around-arithmetic-operator
|
|
# "E203", # whitespace-before-punctuation
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"__init__.py" = ["F401"] # unused-import
|
|
|
|
[tool.ruff.lint.mccabe]
|
|
max-complexity = 10
|
|
|
|
[tool.setuptools]
|
|
include-package-data = true
|
|
package-dir = { "" = "src" }
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["src"]
|
|
|
|
[tool.setuptools.package-data]
|
|
mvt = ["ios/data/*.json"]
|
|
|
|
[tool.setuptools.dynamic]
|
|
version = { attr = "mvt.common.version.MVT_VERSION" }
|