fridaforge 0.3.1__tar.gz → 0.3.2__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 (43) hide show
  1. {fridaforge-0.3.1 → fridaforge-0.3.2}/PKG-INFO +2 -2
  2. {fridaforge-0.3.1 → fridaforge-0.3.2}/README.md +1 -1
  3. fridaforge-0.3.2/fridaforge/_version.py +1 -0
  4. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge.egg-info/PKG-INFO +2 -2
  5. {fridaforge-0.3.1 → fridaforge-0.3.2}/tests/test_binja_entry.py +8 -22
  6. {fridaforge-0.3.1 → fridaforge-0.3.2}/tests/test_binja_manifest.py +12 -5
  7. {fridaforge-0.3.1 → fridaforge-0.3.2}/tests/test_build.py +2 -1
  8. {fridaforge-0.3.1 → fridaforge-0.3.2}/tests/test_bump_version.py +11 -8
  9. fridaforge-0.3.1/fridaforge/_version.py +0 -1
  10. {fridaforge-0.3.1 → fridaforge-0.3.2}/LICENSE +0 -0
  11. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/__init__.py +0 -0
  12. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/backend.py +0 -0
  13. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/commands/__init__.py +0 -0
  14. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/commands/base.py +0 -0
  15. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/commands/hook_dlopen_functions.py +0 -0
  16. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/commands/hook_function.py +0 -0
  17. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/commands/modify_section_protection.py +0 -0
  18. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/commands/negate_cond_branch_arm64.py +0 -0
  19. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/commands/negate_cond_branch_x86.py +0 -0
  20. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/core/__init__.py +0 -0
  21. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/core/hook_dlopen_functions.py +0 -0
  22. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/core/hook_function.py +0 -0
  23. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/core/modify_section_protection.py +0 -0
  24. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/core/negate_cond_branch_arm64.py +0 -0
  25. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/core/negate_cond_branch_x86.py +0 -0
  26. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/core/utils.py +0 -0
  27. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/templates/hook_dlopen_functions.js +0 -0
  28. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/templates/hook_function.js +0 -0
  29. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/templates/modify_section_protection.js +0 -0
  30. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/templates/negate_cond_branch_arm64.js +0 -0
  31. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge/templates/negate_cond_branch_x86.js +0 -0
  32. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge.egg-info/SOURCES.txt +0 -0
  33. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge.egg-info/dependency_links.txt +0 -0
  34. {fridaforge-0.3.1 → fridaforge-0.3.2}/fridaforge.egg-info/top_level.txt +0 -0
  35. {fridaforge-0.3.1 → fridaforge-0.3.2}/pyproject.toml +0 -0
  36. {fridaforge-0.3.1 → fridaforge-0.3.2}/setup.cfg +0 -0
  37. {fridaforge-0.3.1 → fridaforge-0.3.2}/tests/test_backend.py +0 -0
  38. {fridaforge-0.3.1 → fridaforge-0.3.2}/tests/test_backend_ghidra.py +0 -0
  39. {fridaforge-0.3.1 → fridaforge-0.3.2}/tests/test_check_wheel.py +0 -0
  40. {fridaforge-0.3.1 → fridaforge-0.3.2}/tests/test_commands.py +0 -0
  41. {fridaforge-0.3.1 → fridaforge-0.3.2}/tests/test_generators.py +0 -0
  42. {fridaforge-0.3.1 → fridaforge-0.3.2}/tests/test_ghidra_scripts.py +0 -0
  43. {fridaforge-0.3.1 → fridaforge-0.3.2}/tests/test_readme.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fridaforge
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Generate Frida scripts from IDA Pro, Binary Ninja, and Ghidra
5
5
  Author: noobexon1
6
6
  License-Expression: MIT
@@ -81,7 +81,7 @@ Right-click (or hit a hotkey) in your disassembler to generate ready-to-use Frid
81
81
 
82
82
  Each feature follows a simple pipeline: a **Frida template** (`fridaforge/templates/`) provides the JavaScript skeleton with placeholders, a **command** (`fridaforge/commands/`) gathers context through a host-agnostic **Backend**, and a **generator** (`fridaforge/core/`) fills the template to produce the final script.
83
83
 
84
- The shared core knows nothing about IDA, Binary Ninja, or Ghidra. Each host lives in `hosts/` and provides a thin **adapter** that implements the `Backend` interface (data extraction, clipboard, menu + hotkey registration). Add a feature once and it works in all three. The root `plugin.json` and `__init__.py` exist only so Binary Ninja's Extension Manager can find the plugin, which lives in `hosts/binja/`.
84
+ The shared core knows nothing about IDA, Binary Ninja, or Ghidra. Each host lives in `hosts/` and provides a thin **adapter** that implements the `Backend` interface (data extraction, clipboard, menu + hotkey registration). Add a feature once and it works in all three.
85
85
 
86
86
  ## 📦 Installation
87
87
 
@@ -63,7 +63,7 @@ Right-click (or hit a hotkey) in your disassembler to generate ready-to-use Frid
63
63
 
64
64
  Each feature follows a simple pipeline: a **Frida template** (`fridaforge/templates/`) provides the JavaScript skeleton with placeholders, a **command** (`fridaforge/commands/`) gathers context through a host-agnostic **Backend**, and a **generator** (`fridaforge/core/`) fills the template to produce the final script.
65
65
 
66
- The shared core knows nothing about IDA, Binary Ninja, or Ghidra. Each host lives in `hosts/` and provides a thin **adapter** that implements the `Backend` interface (data extraction, clipboard, menu + hotkey registration). Add a feature once and it works in all three. The root `plugin.json` and `__init__.py` exist only so Binary Ninja's Extension Manager can find the plugin, which lives in `hosts/binja/`.
66
+ The shared core knows nothing about IDA, Binary Ninja, or Ghidra. Each host lives in `hosts/` and provides a thin **adapter** that implements the `Backend` interface (data extraction, clipboard, menu + hotkey registration). Add a feature once and it works in all three.
67
67
 
68
68
  ## 📦 Installation
69
69
 
@@ -0,0 +1 @@
1
+ __version__ = "0.3.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fridaforge
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Generate Frida scripts from IDA Pro, Binary Ninja, and Ghidra
5
5
  Author: noobexon1
6
6
  License-Expression: MIT
@@ -81,7 +81,7 @@ Right-click (or hit a hotkey) in your disassembler to generate ready-to-use Frid
81
81
 
82
82
  Each feature follows a simple pipeline: a **Frida template** (`fridaforge/templates/`) provides the JavaScript skeleton with placeholders, a **command** (`fridaforge/commands/`) gathers context through a host-agnostic **Backend**, and a **generator** (`fridaforge/core/`) fills the template to produce the final script.
83
83
 
84
- The shared core knows nothing about IDA, Binary Ninja, or Ghidra. Each host lives in `hosts/` and provides a thin **adapter** that implements the `Backend` interface (data extraction, clipboard, menu + hotkey registration). Add a feature once and it works in all three. The root `plugin.json` and `__init__.py` exist only so Binary Ninja's Extension Manager can find the plugin, which lives in `hosts/binja/`.
84
+ The shared core knows nothing about IDA, Binary Ninja, or Ghidra. Each host lives in `hosts/` and provides a thin **adapter** that implements the `Backend` interface (data extraction, clipboard, menu + hotkey registration). Add a feature once and it works in all three.
85
85
 
86
86
  ## 📦 Installation
87
87
 
@@ -7,10 +7,8 @@ import pytest
7
7
 
8
8
  from fridaforge.commands import ALL_COMMANDS
9
9
 
10
- ROOT = Path(__file__).resolve().parent.parent
11
- BINJA_DIR = ROOT / "hosts" / "binja"
10
+ BINJA_DIR = Path(__file__).resolve().parent.parent / "hosts" / "binja"
12
11
  ENTRY_NAME = "ff_binja_entry_under_test"
13
- REPO_PLUGIN_NAME = "ff_repo_plugin_under_test"
14
12
 
15
13
 
16
14
  def _fake_binaryninja() -> types.ModuleType:
@@ -46,26 +44,22 @@ def fake_bn(monkeypatch):
46
44
  monkeypatch.setitem(sys.modules, "PySide6", types.ModuleType("PySide6"))
47
45
  monkeypatch.setitem(sys.modules, "PySide6.QtWidgets", qt_widgets)
48
46
  yield bn
49
- for key in [k for k in sys.modules if k.startswith((ENTRY_NAME, REPO_PLUGIN_NAME))]:
47
+ for key in [k for k in sys.modules if k.startswith(ENTRY_NAME)]:
50
48
  del sys.modules[key]
51
49
 
52
50
 
53
- def _load_package(name: str, folder: Path):
51
+ def _load_entry():
54
52
  spec = importlib.util.spec_from_file_location(
55
- name,
56
- folder / "__init__.py",
57
- submodule_search_locations=[str(folder)],
53
+ ENTRY_NAME,
54
+ BINJA_DIR / "__init__.py",
55
+ submodule_search_locations=[str(BINJA_DIR)],
58
56
  )
59
57
  module = importlib.util.module_from_spec(spec)
60
- sys.modules[name] = module
58
+ sys.modules[ENTRY_NAME] = module
61
59
  spec.loader.exec_module(module)
62
60
  return module
63
61
 
64
62
 
65
- def _load_entry():
66
- return _load_package(ENTRY_NAME, BINJA_DIR)
67
-
68
-
69
63
  def _hide_core(monkeypatch):
70
64
  for key in [k for k in sys.modules if k == "fridaforge" or k.startswith("fridaforge.")]:
71
65
  monkeypatch.delitem(sys.modules, key)
@@ -86,12 +80,4 @@ def test_missing_core_logs_one_error_and_registers_nothing(fake_bn, monkeypatch)
86
80
  assert fake_bn.registered == []
87
81
  assert len(fake_bn.errors) == 1
88
82
  assert "pip install fridaforge==" in fake_bn.errors[0]
89
- assert "Extension Manager" in fake_bn.errors[0]
90
-
91
-
92
- def test_repo_root_loads_binja_plugin(fake_bn):
93
- _load_package(REPO_PLUGIN_NAME, ROOT)
94
- entry = sys.modules[f"{REPO_PLUGIN_NAME}.hosts.binja"]
95
- assert entry._CORE_AVAILABLE is True
96
- assert len(fake_bn.registered) == len(ALL_COMMANDS)
97
- assert fake_bn.errors == []
83
+ assert "Extension Manager" in fake_bn.errors[0]
@@ -4,7 +4,9 @@ from pathlib import Path
4
4
  from fridaforge._version import __version__
5
5
 
6
6
  ROOT = Path(__file__).resolve().parent.parent
7
- MANIFEST = ROOT / "plugin.json"
7
+ BINJA_DIR = ROOT / "hosts" / "binja"
8
+ MANIFEST = BINJA_DIR / "plugin.json"
9
+ REQUIREMENTS = BINJA_DIR / "requirements.txt"
8
10
  REQUIRED_FIELDS = (
9
11
  "pluginmetadataversion",
10
12
  "name",
@@ -40,9 +42,14 @@ def test_manifest_version_matches_core():
40
42
  assert _manifest()["version"] == __version__
41
43
 
42
44
 
43
- def test_manifest_pins_core_exactly():
44
- assert _manifest()["dependencies"]["pip"] == [f"fridaforge=={__version__}"]
45
+ def test_requirements_pin_core_exactly():
46
+ assert REQUIREMENTS.read_text(encoding="utf-8") == f"fridaforge=={__version__}\n"
45
47
 
46
48
 
47
- def test_manifest_lives_only_at_repo_root():
48
- assert not (ROOT / "hosts" / "binja" / "plugin.json").exists()
49
+ def test_manifest_leaves_dependencies_to_requirements_txt():
50
+ assert "dependencies" not in _manifest()
51
+
52
+
53
+ def test_repo_root_is_not_a_binja_plugin():
54
+ assert not (ROOT / "plugin.json").exists()
55
+ assert not (ROOT / "__init__.py").exists()
@@ -34,7 +34,8 @@ def test_build_creates_both_archives(tmp_path):
34
34
  assert "fridaforge/commands/__init__.py" in names
35
35
  manifest = json.loads(z.read("fridaforge/plugin.json"))
36
36
  assert manifest["version"] == "9.9.9"
37
- assert manifest["dependencies"]["pip"] == ["fridaforge==9.9.9"]
37
+ assert "dependencies" not in manifest
38
+ assert "fridaforge/requirements.txt" not in names
38
39
  entry = z.read("fridaforge/__init__.py").decode("utf-8")
39
40
  assert "from .backend_binja import BinjaBackend" in entry
40
41
 
@@ -15,7 +15,11 @@ _spec.loader.exec_module(bump_version)
15
15
 
16
16
  @pytest.fixture
17
17
  def repo_copy(tmp_path):
18
- for rel in (bump_version.VERSION_FILE, bump_version.BINJA_MANIFEST):
18
+ for rel in (
19
+ bump_version.VERSION_FILE,
20
+ bump_version.BINJA_MANIFEST,
21
+ bump_version.BINJA_REQUIREMENTS,
22
+ ):
19
23
  (tmp_path / rel).parent.mkdir(parents=True, exist_ok=True)
20
24
  shutil.copy2(ROOT / rel, tmp_path / rel)
21
25
  return tmp_path
@@ -32,11 +36,12 @@ def test_bump_rewrites_every_copy(repo_copy):
32
36
  assert bump_version.read_versions(repo_copy) == {
33
37
  "_version.py": "1.2.3",
34
38
  "plugin.json version": "1.2.3",
35
- "plugin.json pip pin": "1.2.3",
39
+ "requirements.txt pin": "1.2.3",
36
40
  }
37
41
  manifest = json.loads((repo_copy / bump_version.BINJA_MANIFEST).read_text(encoding="utf-8"))
38
- assert manifest["dependencies"]["pip"] == ["fridaforge==1.2.3"]
39
42
  assert manifest["name"] == "FridaForge"
43
+ requirements = (repo_copy / bump_version.BINJA_REQUIREMENTS).read_text(encoding="utf-8")
44
+ assert requirements == "fridaforge==1.2.3\n"
40
45
 
41
46
 
42
47
  def test_bump_rejects_non_semver(repo_copy):
@@ -57,8 +62,6 @@ def test_check_reports_each_mismatch(repo_copy):
57
62
  assert all("2.0.0" in p for p in problems)
58
63
 
59
64
 
60
- def test_stamp_keeps_other_pins():
61
- data = {"version": "0.0.1", "dependencies": {"pip": ["fridaforge==0.0.1", "other"]}}
62
- stamped = bump_version.stamp_binja_manifest(data, "0.0.2")
63
- assert stamped["version"] == "0.0.2"
64
- assert stamped["dependencies"]["pip"] == ["fridaforge==0.0.2", "other"]
65
+ def test_pin_requirement_keeps_other_lines():
66
+ text = "other>=1\nfridaforge==0.0.1\n"
67
+ assert bump_version.pin_requirement(text, "0.0.2") == "fridaforge==0.0.2\nother>=1\n"
@@ -1 +0,0 @@
1
- __version__ = "0.3.1"
File without changes
File without changes
File without changes