ipsw-parser 1.8.0__tar.gz → 1.8.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/PKG-INFO +1 -1
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/_version.py +3 -3
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/build_identity.py +3 -1
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser.egg-info/PKG-INFO +1 -1
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser.egg-info/SOURCES.txt +2 -1
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser.egg-info/scm_file_list.json +2 -1
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser.egg-info/scm_version.json +2 -2
- ipsw_parser-1.8.1/tests/test_sandbox_profiles.py +49 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/.gitattributes +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/.github/workflows/codeql.yml +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/.github/workflows/python-app.yml +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/.github/workflows/python-publish.yml +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/.gitignore +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/.pre-commit-config.yaml +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/CODE_OF_CONDUCT.md +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/LICENSE +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/README.md +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/__init__.py +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/__main__.py +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/archive.py +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/build_manifest.py +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/component.py +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/dsc.py +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/exceptions.py +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/firmware.py +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/ipsw.py +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/process.py +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser.egg-info/dependency_links.txt +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser.egg-info/entry_points.txt +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser.egg-info/requires.txt +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser.egg-info/top_level.txt +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/pyproject.toml +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/pytest.ini +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/requirements.txt +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/setup.cfg +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/tests/test_archive_backends.py +0 -0
- {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/tests/test_process.py +0 -0
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '1.8.
|
|
22
|
-
__version_tuple__ = version_tuple = (1, 8,
|
|
21
|
+
__version__ = version = '1.8.1'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 8, 1)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'gaa9b8c1bd'
|
|
@@ -73,7 +73,9 @@ def _decode_sandbox_profiles(kernel_output: Path, output: Path, profile_type: Op
|
|
|
73
73
|
profile_names = run("ipsw", *args).splitlines()
|
|
74
74
|
|
|
75
75
|
def decode_worker(profile_name: str) -> None:
|
|
76
|
-
|
|
76
|
+
# Not with_suffix(): it would cut a dotted name short, and com.apple.cloudd would share
|
|
77
|
+
# com.apple.sb with every other com.apple.* profile
|
|
78
|
+
profile_path = output / f"{profile_name}.sb"
|
|
77
79
|
decode_args = ["sb", "dec", kernel_output, profile_name]
|
|
78
80
|
if profile_type is not None:
|
|
79
81
|
decode_args += ["--type", profile_type]
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
from ipsw_parser import build_identity
|
|
6
|
+
from ipsw_parser.process import ProcessExecutionError
|
|
7
|
+
|
|
8
|
+
PROFILES = ["baseline", "com.apple.cloudd", "com.apple.homed", "spotlightknowledged", "spotlightknowledged.updater"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _fake_ipsw(calls: list) -> object:
|
|
12
|
+
def run(tool: str, *args: object) -> str:
|
|
13
|
+
calls.append((tool, *map(str, args)))
|
|
14
|
+
assert tool == "ipsw"
|
|
15
|
+
if args[1] == "list":
|
|
16
|
+
return "\n".join(PROFILES) + "\n"
|
|
17
|
+
name = str(args[3])
|
|
18
|
+
if name == "com.apple.homed":
|
|
19
|
+
raise ProcessExecutionError(["ipsw", "sb", "dec"], 1, "", "cannot decode")
|
|
20
|
+
return f"(profile {name})\n"
|
|
21
|
+
|
|
22
|
+
return run
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def test_every_profile_gets_a_file_of_its_own(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
|
|
26
|
+
calls: list = []
|
|
27
|
+
monkeypatch.setattr(build_identity, "run", _fake_ipsw(calls))
|
|
28
|
+
output = tmp_path / "profiles"
|
|
29
|
+
|
|
30
|
+
build_identity._decode_sandbox_profiles(tmp_path / "kernelcache", output)
|
|
31
|
+
|
|
32
|
+
# A dotted name keeps all of its parts, and a profile that fails to decode is skipped
|
|
33
|
+
assert {path.name: path.read_text() for path in output.iterdir()} == {
|
|
34
|
+
"baseline.sb": "(profile baseline)\n",
|
|
35
|
+
"com.apple.cloudd.sb": "(profile com.apple.cloudd)\n",
|
|
36
|
+
"spotlightknowledged.sb": "(profile spotlightknowledged)\n",
|
|
37
|
+
"spotlightknowledged.updater.sb": "(profile spotlightknowledged.updater)\n",
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def test_profile_type_is_passed_to_list_and_decode(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
|
|
42
|
+
calls: list = []
|
|
43
|
+
monkeypatch.setattr(build_identity, "run", _fake_ipsw(calls))
|
|
44
|
+
kernel = tmp_path / "kernelcache"
|
|
45
|
+
|
|
46
|
+
build_identity._decode_sandbox_profiles(kernel, tmp_path / "protobox", profile_type="protobox")
|
|
47
|
+
|
|
48
|
+
assert calls[0] == ("ipsw", "sb", "list", str(kernel), "--type", "protobox")
|
|
49
|
+
assert ("ipsw", "sb", "dec", str(kernel), "spotlightknowledged.updater", "--type", "protobox") in calls
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|