Skip to content

Instantly share code, notes, and snippets.

Avatar

Nicolas Falliere nfalliere

View GitHub Profile
@nfalliere
nfalliere / JebUnitReparseExample.java
Created Nov 12, 2018
Sample code showing how to reparse unit's binary data as another format
View JebUnitReparseExample.java
// sample code, needs adjusting/customizing (see TODO tags)
// call reparse() with input information set in a ReparseInformation object
public class ReparseInformation {
IUnit unit;
String subUnitName;
String wantedType;
long offset;
long size;
}
View JebRetrieveIdentifiers.java
// reference: https://www.pnfsoftware.com/jeb/apidoc
// Print all identifiers supported by the currently instantiated JEB engines
void printAllAvailableIdentifiers(IEnginesContext engctx) {
for(IUnitIdentifier id: engctx.getUnitIdentifiers()) {
logger.info(id.getFormatType());
}
}
// ... or:
View JumpTo.py
from com.pnfsoftware.jeb.client.api import IScript
from com.pnfsoftware.jeb.core.units.code.android import IDexUnit
"""
Sample showing:
- how a script can be invoked after a cmdline-provided file has been processed by the JEB UI client
- currently, this script simply searches for a Dex code unit, attempts to find a disassembly fragment for it, and navigate to the cmdline-provided address
How to use:
$ jeb_startup_script --script=ScriptPath -- InputFile AddressToJumpTo