hashbinkit 0.2.0__tar.gz → 0.2.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.
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/PKG-INFO +1 -1
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/hashbinkit/data.py +5 -8
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/hashbinkit/serialize.py +11 -4
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/hashbinkit.egg-info/PKG-INFO +1 -1
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/pyproject.toml +1 -1
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/LICENCE +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/README.md +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/hashbinkit/__init__.py +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/hashbinkit/canonicalize.py +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/hashbinkit/digests/__init__.py +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/hashbinkit/digests/bloom.py +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/hashbinkit/digests/common.py +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/hashbinkit/digests/simhash.py +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/hashbinkit/digests/unary.py +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/hashbinkit/graph.py +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/hashbinkit.egg-info/SOURCES.txt +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/hashbinkit.egg-info/dependency_links.txt +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/hashbinkit.egg-info/requires.txt +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/hashbinkit.egg-info/top_level.txt +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/setup.cfg +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/tests/test_bloom.py +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/tests/test_common.py +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/tests/test_data.py +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/tests/test_simhash.py +0 -0
- {hashbinkit-0.2.0 → hashbinkit-0.2.2}/tests/test_unary.py +0 -0
|
@@ -227,9 +227,9 @@ class OpcodeData(Serializable):
|
|
|
227
227
|
return cls(
|
|
228
228
|
addr=get_addr(opcode_info),
|
|
229
229
|
n_bytes=opcode_info["size"],
|
|
230
|
-
raw_bytes=opcode_info
|
|
231
|
-
op_type=opcode_info
|
|
232
|
-
esil=opcode_info
|
|
230
|
+
raw_bytes=opcode_info.get("bytes") or "",
|
|
231
|
+
op_type=opcode_info.get("type") or "",
|
|
232
|
+
esil=opcode_info.get("esil") or "",
|
|
233
233
|
ptr=filter_placeholder_addr(opcode_info.get("ptr")),
|
|
234
234
|
refs=refs,
|
|
235
235
|
xrefs=xrefs,
|
|
@@ -406,8 +406,7 @@ class FunctionCodeData(Serializable):
|
|
|
406
406
|
|
|
407
407
|
blocks.append(block)
|
|
408
408
|
|
|
409
|
-
cfg.
|
|
410
|
-
cfg.setup_edges(block_edges)
|
|
409
|
+
cfg.setup(block_addrs, block_edges)
|
|
411
410
|
|
|
412
411
|
return cls(
|
|
413
412
|
# Identifiers
|
|
@@ -793,9 +792,7 @@ class BinaryDataManager(Serializable):
|
|
|
793
792
|
yield from callers
|
|
794
793
|
yield from terminal_callees
|
|
795
794
|
|
|
796
|
-
self.func_call_graph.
|
|
797
|
-
self.func_call_graph.setup_outputs(outputs)
|
|
798
|
-
|
|
795
|
+
self.func_call_graph.setup(_iter_cg_nodes(), outputs=outputs)
|
|
799
796
|
return self.func_call_graph.size
|
|
800
797
|
|
|
801
798
|
|
|
@@ -265,10 +265,17 @@ class Serializable:
|
|
|
265
265
|
def serialize(self) -> bytes:
|
|
266
266
|
"""Serialize self into bytes."""
|
|
267
267
|
resolved = get_type_hints(type(self))
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
268
|
+
parts = []
|
|
269
|
+
for f in fields(self): # type: ignore[reportArgumentType]
|
|
270
|
+
val = getattr(self, f.name)
|
|
271
|
+
try:
|
|
272
|
+
parts.append(_serialize(resolved[f.name], val))
|
|
273
|
+
except TypeError as e:
|
|
274
|
+
raise TypeError(
|
|
275
|
+
f"{type(self).__name__}.{f.name} = {val!r} "
|
|
276
|
+
f"(annotated {resolved[f.name]!r}): {e}"
|
|
277
|
+
) from e
|
|
278
|
+
return b"".join(parts)
|
|
272
279
|
|
|
273
280
|
@classmethod
|
|
274
281
|
def _partial_deserialize(cls, b: bytes) -> tuple[Self, bytes]:
|
|
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
|