|
@@ -121,28 +121,28 @@ def convert_android_methods_to_jvm_frames(methods: list[dict]) -> list[dict]:
|
|
|
|
|
|
|
|
|
def merge_jvm_frames_with_android_methods(frames: list[dict], methods: list[dict]) -> None:
|
|
|
- for f in frames:
|
|
|
+ for f in reversed(frames):
|
|
|
m = methods[f["index"]]
|
|
|
if m.get("data", {}).get("deobfuscation_status", "") != "deobfuscated":
|
|
|
m["class_name"] = f["module"]
|
|
|
- m["name"] = f["function"]
|
|
|
m["data"] = {"deobfuscation_status": "deobfuscated"}
|
|
|
- m["inline_frames"] = []
|
|
|
- if "signature" in f:
|
|
|
- m["signature"] = f["signature"]
|
|
|
- if "lineno" in f:
|
|
|
- m["source_line"] = f["lineno"]
|
|
|
- if "abs_path" in f:
|
|
|
- m["source_file"] = f["abs_path"]
|
|
|
+ m["name"] = f["function"]
|
|
|
+ m["signature"] = f.get("signature", "")
|
|
|
+ m["source_file"] = f.get("abs_path", "")
|
|
|
+ m["source_line"] = f.get("lineno", 0)
|
|
|
if "in_app" in f:
|
|
|
m["in_app"] = f["in_app"]
|
|
|
else:
|
|
|
- m["inline_frames"].append(
|
|
|
- {
|
|
|
- "class_name": f["module"],
|
|
|
- "data": {"deobfuscation_status": "deobfuscated"},
|
|
|
- "name": f["function"],
|
|
|
- "source_file": f.get("abs_path", ""),
|
|
|
- "source_line": f.get("lineno", 0),
|
|
|
- }
|
|
|
- )
|
|
|
+ if "inline_frames" in m:
|
|
|
+ m["inline_frames"] = [m]
|
|
|
+ im = {
|
|
|
+ "class_name": f["module"],
|
|
|
+ "data": {"deobfuscation_status": "deobfuscated"},
|
|
|
+ "name": f["function"],
|
|
|
+ "signature": f.get("signature", ""),
|
|
|
+ "source_file": f.get("abs_path", ""),
|
|
|
+ "source_line": f.get("lineno", 0),
|
|
|
+ }
|
|
|
+ if "in_app" in f:
|
|
|
+ im["in_app"] = f["in_app"]
|
|
|
+ m["inline_frames"].append(im)
|