mirror of
https://github.com/mvt-project/mvt.git
synced 2026-10-31 02:06:34 +01:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1336b53f2 |
No files matched your search
@@ -5,7 +5,9 @@
|
|||||||
|
|
||||||
version: 2
|
version: 2
|
||||||
updates:
|
updates:
|
||||||
- package-ecosystem: "pip" # See documentation for possible values
|
- package-ecosystem: "uv" # See documentation for possible values
|
||||||
directory: "/" # Location of package manifests
|
directory: "/" # Location of package manifests
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
|
cooldown:
|
||||||
|
default-days: 7
|
||||||
@@ -12,11 +12,14 @@ jobs:
|
|||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: "3.10"
|
||||||
cache: 'pip'
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v7
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
pip install mypy
|
uv sync --locked --group dev
|
||||||
- name: mypy
|
- name: mypy
|
||||||
run: |
|
run: |
|
||||||
make mypy
|
make mypy
|
||||||
@@ -14,13 +14,16 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: "3.10"
|
||||||
cache: 'pip'
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v7
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
pip install ruff
|
uv sync --locked --group dev
|
||||||
- name: ruff
|
- name: ruff
|
||||||
run: |
|
run: |
|
||||||
make ruff
|
make ruff
|
||||||
@@ -16,14 +16,17 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v7
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: |
|
run: |
|
||||||
make install
|
uv sync --locked --group dev --python ${{ matrix.python-version }}
|
||||||
make test-requirements
|
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|||||||
+4
-1
@@ -86,6 +86,9 @@ ipython_config.py
|
|||||||
# pyenv
|
# pyenv
|
||||||
.python-version
|
.python-version
|
||||||
|
|
||||||
|
# uv project Python version
|
||||||
|
!.python-version
|
||||||
|
|
||||||
# pipenv
|
# pipenv
|
||||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||||
@@ -138,4 +141,4 @@ dmypy.json
|
|||||||
.idea
|
.idea
|
||||||
|
|
||||||
# Sublime Text project files
|
# Sublime Text project files
|
||||||
*.sublime*
|
*.sublime*
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
3.10
|
||||||
+6
-4
@@ -6,14 +6,16 @@
|
|||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
build:
|
build:
|
||||||
os: "ubuntu-22.04"
|
os: "ubuntu-24.04"
|
||||||
tools:
|
tools:
|
||||||
python: "3.11"
|
python: "3.11"
|
||||||
|
|
||||||
mkdocs:
|
mkdocs:
|
||||||
configuration: mkdocs.yml
|
configuration: mkdocs.yml
|
||||||
|
|
||||||
# Optionally set the version of Python and requirements required to build your docs
|
|
||||||
python:
|
python:
|
||||||
install:
|
install:
|
||||||
- requirements: docs/requirements.txt
|
- method: uv
|
||||||
|
command: sync
|
||||||
|
groups:
|
||||||
|
- docs
|
||||||
+3
-6
@@ -104,6 +104,7 @@ RUN git clone https://github.com/libimobiledevice/usbmuxd && cd usbmuxd \
|
|||||||
|
|
||||||
# Create main image
|
# Create main image
|
||||||
FROM ubuntu:24.04 AS main
|
FROM ubuntu:24.04 AS main
|
||||||
|
COPY --from=ghcr.io/astral-sh/uv:0.11.8 /uv /uvx /usr/local/bin/
|
||||||
|
|
||||||
LABEL org.opencontainers.image.url="https://mvt.re"
|
LABEL org.opencontainers.image.url="https://mvt.re"
|
||||||
LABEL org.opencontainers.image.documentation="https://docs.mvt.re"
|
LABEL org.opencontainers.image.documentation="https://docs.mvt.re"
|
||||||
@@ -133,12 +134,8 @@ COPY --from=build-usbmuxd /build /
|
|||||||
|
|
||||||
# Install mvt using the locally checked out source
|
# Install mvt using the locally checked out source
|
||||||
COPY . mvt/
|
COPY . mvt/
|
||||||
RUN apt-get update \
|
RUN uv pip install --system --break-system-packages --no-cache ./mvt \
|
||||||
&& apt-get install -y git python3-pip \
|
&& rm -rf mvt
|
||||||
&& PIP_NO_CACHE_DIR=1 pip3 install --break-system-packages ./mvt \
|
|
||||||
&& apt-get remove -y python3-pip git && apt-get autoremove -y \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& rm -rf mvt
|
|
||||||
|
|
||||||
# Installing ABE
|
# Installing ABE
|
||||||
ADD --checksum=sha256:a20e07f8b2ea47620aff0267f230c3f1f495f097081fd709eec51cf2a2e11632 \
|
ADD --checksum=sha256:a20e07f8b2ea47620aff0267f230c3f1f495f097081fd709eec51cf2a2e11632 \
|
||||||
|
|||||||
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
# Create main image
|
# Create main image
|
||||||
FROM python:3.10.14-alpine3.20 AS main
|
FROM python:3.10.14-alpine3.20 AS main
|
||||||
|
COPY --from=ghcr.io/astral-sh/uv:0.11.8 /uv /uvx /usr/local/bin/
|
||||||
|
|
||||||
LABEL org.opencontainers.image.url="https://mvt.re"
|
LABEL org.opencontainers.image.url="https://mvt.re"
|
||||||
LABEL org.opencontainers.image.documentation="https://docs.mvt.re"
|
LABEL org.opencontainers.image.documentation="https://docs.mvt.re"
|
||||||
@@ -20,7 +21,7 @@ RUN apk add --no-cache \
|
|||||||
# Install mvt
|
# Install mvt
|
||||||
COPY ./ mvt
|
COPY ./ mvt
|
||||||
RUN apk add --no-cache --virtual .build-deps gcc musl-dev \
|
RUN apk add --no-cache --virtual .build-deps gcc musl-dev \
|
||||||
&& PIP_NO_CACHE_DIR=1 pip3 install ./mvt \
|
&& uv pip install --system --no-cache ./mvt \
|
||||||
&& apk del .build-deps gcc musl-dev && rm -rf ./mvt
|
&& apk del .build-deps gcc musl-dev && rm -rf ./mvt
|
||||||
|
|
||||||
# Installing ABE
|
# Installing ABE
|
||||||
|
|||||||
+2
-1
@@ -105,6 +105,7 @@ RUN git clone https://github.com/libimobiledevice/usbmuxd && cd usbmuxd \
|
|||||||
# Main image
|
# Main image
|
||||||
# ----------
|
# ----------
|
||||||
FROM python:3.10.14-alpine3.20 AS main
|
FROM python:3.10.14-alpine3.20 AS main
|
||||||
|
COPY --from=ghcr.io/astral-sh/uv:0.11.8 /uv /uvx /usr/local/bin/
|
||||||
|
|
||||||
LABEL org.opencontainers.image.url="https://mvt.re"
|
LABEL org.opencontainers.image.url="https://mvt.re"
|
||||||
LABEL org.opencontainers.image.documentation="https://docs.mvt.re"
|
LABEL org.opencontainers.image.documentation="https://docs.mvt.re"
|
||||||
@@ -131,7 +132,7 @@ COPY --from=build-usbmuxd /build /
|
|||||||
# Install mvt using the locally checked out source
|
# Install mvt using the locally checked out source
|
||||||
COPY ./ mvt
|
COPY ./ mvt
|
||||||
RUN apk add --no-cache --virtual .build-deps git gcc musl-dev \
|
RUN apk add --no-cache --virtual .build-deps git gcc musl-dev \
|
||||||
&& PIP_NO_CACHE_DIR=1 pip3 install ./mvt \
|
&& uv pip install --system --no-cache ./mvt \
|
||||||
&& apk del .build-deps git gcc musl-dev && rm -rf ./mvt
|
&& apk del .build-deps git gcc musl-dev && rm -rf ./mvt
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/local/bin/mvt-ios" ]
|
ENTRYPOINT [ "/usr/local/bin/mvt-ios" ]
|
||||||
@@ -1,39 +1,39 @@
|
|||||||
PWD = $(shell pwd)
|
PWD = $(shell pwd)
|
||||||
|
UV ?= uv
|
||||||
|
|
||||||
check: ruff mypy
|
check: ruff mypy
|
||||||
|
|
||||||
ruff:
|
ruff:
|
||||||
ruff check .
|
$(UV) run ruff check .
|
||||||
|
|
||||||
mypy:
|
mypy:
|
||||||
mypy
|
$(UV) run mypy
|
||||||
|
|
||||||
test:
|
test:
|
||||||
python3 -m pytest
|
$(UV) run pytest
|
||||||
|
|
||||||
test-ci:
|
test-ci:
|
||||||
python3 -m pytest -v
|
$(UV) run pytest -v
|
||||||
|
|
||||||
install:
|
install:
|
||||||
python3 -m pip install --upgrade -e .
|
$(UV) sync
|
||||||
|
|
||||||
test-requirements:
|
test-requirements:
|
||||||
python3 -m pip install --upgrade --group dev
|
$(UV) sync --group dev
|
||||||
|
|
||||||
generate-proto-parsers:
|
generate-proto-parsers:
|
||||||
# Generate python parsers for protobuf files
|
# Generate python parsers for protobuf files
|
||||||
PROTO_FILES=$$(find src/mvt/android/parsers/proto/ -iname "*.proto"); \
|
PROTO_FILES=$$(find src/mvt/android/parsers/proto/ -iname "*.proto"); \
|
||||||
protoc -Isrc/mvt/android/parsers/proto/ --python_betterproto2_out=src/mvt/android/parsers/proto/ $$PROTO_FILES
|
$(UV) run protoc -Isrc/mvt/android/parsers/proto/ --python_betterproto2_out=src/mvt/android/parsers/proto/ $$PROTO_FILES
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(PWD)/build $(PWD)/dist $(PWD)/src/mvt.egg-info
|
rm -rf $(PWD)/build $(PWD)/dist $(PWD)/src/mvt.egg-info
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
python3 -m pip install --upgrade build
|
$(UV) build
|
||||||
python3 -m build
|
|
||||||
|
|
||||||
upload:
|
upload:
|
||||||
python3 -m twine upload dist/*
|
$(UV) tool run twine upload dist/*
|
||||||
|
|
||||||
test-upload:
|
test-upload:
|
||||||
python3 -m twine upload --repository testpypi dist/*
|
$(UV) tool run twine upload --repository testpypi dist/*
|
||||||
@@ -41,6 +41,18 @@ MVT can be installed from sources or from [PyPI](https://pypi.org/project/mvt/)
|
|||||||
pip3 install mvt
|
pip3 install mvt
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can also install MVT from PyPI with [uv](https://docs.astral.sh/uv/). First, install uv:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Then install MVT as a command-line tool:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
uv tool install mvt
|
||||||
|
```
|
||||||
|
|
||||||
For alternative installation options and known issues, please refer to the [documentation](https://docs.mvt.re/en/latest/install/) as well as [GitHub Issues](https://github.com/mvt-project/mvt/issues).
|
For alternative installation options and known issues, please refer to the [documentation](https://docs.mvt.re/en/latest/install/) as well as [GitHub Issues](https://github.com/mvt-project/mvt/issues).
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+10
-2
@@ -2,9 +2,17 @@
|
|||||||
|
|
||||||
The Mobile Verification Toolkit team welcomes contributions of new forensic modules or other contributions which help improve the software.
|
The Mobile Verification Toolkit team welcomes contributions of new forensic modules or other contributions which help improve the software.
|
||||||
|
|
||||||
|
## Local environment
|
||||||
|
|
||||||
|
MVT uses `uv` for dependency management. To install the project and development dependencies from the locked environment, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make install
|
||||||
|
```
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
MVT uses `pytest` for unit and integration tests. Code style consistency is maintained with `flake8`, `ruff` and `black`. All can
|
MVT uses `pytest` for unit and integration tests. Code style consistency is maintained with `ruff` and `mypy`. All can
|
||||||
be run automatically with:
|
be run automatically with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -24,4 +32,4 @@ MVT modules can be profiled with Python built-in `cProfile` by setting the `MVT_
|
|||||||
MVT_PROFILE=1 dev/mvt-ios check-backup test_backup
|
MVT_PROFILE=1 dev/mvt-ios check-backup test_backup
|
||||||
```
|
```
|
||||||
|
|
||||||
Open an issue or PR if you are encountering significant performance issues when analyzing a device with MVT.
|
Open an issue or PR if you are encountering significant performance issues when analyzing a device with MVT.
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
mkdocs==1.6.1
|
|
||||||
mkdocs-autorefs==1.4.4
|
|
||||||
mkdocs-material==9.7.6
|
|
||||||
mkdocs-material-extensions==1.3.1
|
|
||||||
mkdocstrings==1.0.4
|
|
||||||
+11
-2
@@ -58,6 +58,16 @@ dev = [
|
|||||||
"ruff>=0.1.6",
|
"ruff>=0.1.6",
|
||||||
"mypy>=1.7.1",
|
"mypy>=1.7.1",
|
||||||
"betterproto2-compiler",
|
"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.6",
|
||||||
|
"mkdocs-material-extensions==1.3.1",
|
||||||
|
"mkdocstrings==1.0.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
@@ -71,8 +81,7 @@ omit = ["tests/*"]
|
|||||||
directory = "htmlcov"
|
directory = "htmlcov"
|
||||||
|
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
install_types = true
|
install_types = false
|
||||||
non_interactive = true
|
|
||||||
ignore_missing_imports = true
|
ignore_missing_imports = true
|
||||||
packages = "src"
|
packages = "src"
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user