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.
Files changed (39) hide show
  1. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/PKG-INFO +1 -1
  2. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/_version.py +3 -3
  3. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/build_identity.py +3 -1
  4. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser.egg-info/PKG-INFO +1 -1
  5. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser.egg-info/SOURCES.txt +2 -1
  6. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser.egg-info/scm_file_list.json +2 -1
  7. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser.egg-info/scm_version.json +2 -2
  8. ipsw_parser-1.8.1/tests/test_sandbox_profiles.py +49 -0
  9. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/.gitattributes +0 -0
  10. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  11. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  12. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/.github/workflows/codeql.yml +0 -0
  13. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/.github/workflows/python-app.yml +0 -0
  14. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/.github/workflows/python-publish.yml +0 -0
  15. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/.gitignore +0 -0
  16. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/.pre-commit-config.yaml +0 -0
  17. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/CODE_OF_CONDUCT.md +0 -0
  18. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/LICENSE +0 -0
  19. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/README.md +0 -0
  20. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/__init__.py +0 -0
  21. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/__main__.py +0 -0
  22. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/archive.py +0 -0
  23. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/build_manifest.py +0 -0
  24. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/component.py +0 -0
  25. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/dsc.py +0 -0
  26. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/exceptions.py +0 -0
  27. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/firmware.py +0 -0
  28. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/ipsw.py +0 -0
  29. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser/process.py +0 -0
  30. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser.egg-info/dependency_links.txt +0 -0
  31. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser.egg-info/entry_points.txt +0 -0
  32. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser.egg-info/requires.txt +0 -0
  33. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/ipsw_parser.egg-info/top_level.txt +0 -0
  34. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/pyproject.toml +0 -0
  35. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/pytest.ini +0 -0
  36. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/requirements.txt +0 -0
  37. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/setup.cfg +0 -0
  38. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/tests/test_archive_backends.py +0 -0
  39. {ipsw_parser-1.8.0 → ipsw_parser-1.8.1}/tests/test_process.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ipsw-parser
3
- Version: 1.8.0
3
+ Version: 1.8.1
4
4
  Summary: python3 utility for parsing and extracting data from IPSW
5
5
  Author-email: doronz88 <doron88@gmail.com>
6
6
  Maintainer-email: doronz88 <doron88@gmail.com>
@@ -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.0'
22
- __version_tuple__ = version_tuple = (1, 8, 0)
21
+ __version__ = version = '1.8.1'
22
+ __version_tuple__ = version_tuple = (1, 8, 1)
23
23
 
24
- __commit_id__ = commit_id = 'gfea62ccb1'
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
- profile_path = (output / profile_name).with_suffix(".sb")
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]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ipsw-parser
3
- Version: 1.8.0
3
+ Version: 1.8.1
4
4
  Summary: python3 utility for parsing and extracting data from IPSW
5
5
  Author-email: doronz88 <doron88@gmail.com>
6
6
  Maintainer-email: doronz88 <doron88@gmail.com>
@@ -33,4 +33,5 @@ ipsw_parser.egg-info/scm_file_list.json
33
33
  ipsw_parser.egg-info/scm_version.json
34
34
  ipsw_parser.egg-info/top_level.txt
35
35
  tests/test_archive_backends.py
36
- tests/test_process.py
36
+ tests/test_process.py
37
+ tests/test_sandbox_profiles.py
@@ -26,6 +26,7 @@
26
26
  "pytest.ini",
27
27
  "requirements.txt",
28
28
  "tests/test_archive_backends.py",
29
- "tests/test_process.py"
29
+ "tests/test_process.py",
30
+ "tests/test_sandbox_profiles.py"
30
31
  ]
31
32
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "tag": "1.8.0",
2
+ "tag": "1.8.1",
3
3
  "distance": 0,
4
- "node": "gfea62ccb12a1c3ea2004c6aae209a5fc767bc3ef",
4
+ "node": "gaa9b8c1bd4f082171d75db2cf05ae21f5a9548ea",
5
5
  "dirty": false,
6
6
  "branch": "HEAD",
7
7
  "node_date": "2026-10-11"
@@ -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