fix: IDA 9.0+ compat, Frida 17.0+ compat, bad chars in names, stripped ELF#206
fix: IDA 9.0+ compat, Frida 17.0+ compat, bad chars in names, stripped ELF#206t0kubetsu wants to merge 1 commit into
Conversation
- DartDumper.cpp: add UTF-8 encoding declaration to generated addNames.py so IDA with non-ASCII names doesn't raise SyntaxError (worawit#145) - DartDumper.cpp: add sanitizeName4Ida() to replace '|' and '-' with '_' in lib/class/function names, eliminating "bad character" IDA errors (worawit#186) - DartDumper.cpp: wrap 'import ida_struct' in try/except with fallback to 'import ida_typeinf as ida_struct' for IDA 9.0+ compatibility (worawit#181, worawit#198) - frida.template.js: fix tryLoadLibapp() to try Process.getModuleByName() first (Frida >= 17.0.0) with fallback to Module.findBaseAddress() for older Frida; previous fallback also used a removed API (worawit#168) - extract_dart_info.py: accept st_size == 0 in _kDartVmSnapshotData assertion so stripped ELF files don't abort with AssertionError (worawit#154)
|
Hi @t0kubetsu Issue: IDA Pro 9.3 compatibility fallback raises
|
Summary
Fixes several compatibility issues reported by users across multiple open issues.
Changes
blutter/src/DartDumper.cpp# -*- coding: utf-8 -*-encoding declaration to the generatedaddNames.py— fixesSyntaxError: Non-ASCII characterin old IDA Python 2 environments (addNames.py: Non-ASCII character '\xc2' in file E:/vm_servers/shareFolders/out/ida_script #145)sanitizeName4Ida()helper that replaces|(Dart extension separator) and-(hyphen in package names) with_— eliminates IDA's "bad character" errors inidaapi.set_name()(addNames.py error: bad character #186)import ida_structintry/except ImportErrorwith fallback toimport ida_typeinf as ida_struct— fixesModuleNotFoundError: No module named 'ida_struct'on IDA 9.0+ (No module named ida_struct #181, Please add support for IDA9.0+ #198)scripts/frida.template.jstryLoadLibapp()to tryProcess.getModuleByName('libapp.so').basefirst (Frida ≥ 17.0.0 API), falling back toModule.findBaseAddress()for older Frida — the previous fallback itself calledProcess.findModuleByName()which was also removed in Frida 17.0.0, causing an uncaughtTypeError(frida findBaseAddress function not found #168)extract_dart_info.pyst_size == 0in the_kDartVmSnapshotDataassertion — some ELF files have symbol size stripped to 0 while the data itself is still readable at the symbol's address; the previous hard assertion caused an unhelpfulAssertionErrorcrash (AssertionError #154)Related Issues
Closes / addresses: #145, #154, #168, #181, #186, #198