This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Deobscure class name(use debug directives as source name) for PNF Software's JEB2. | |
""" | |
# https://www.jianshu.com/p/4387556ea7c9 edit | |
__author__ = 'Ericli' | |
from com.pnfsoftware.jeb.client.api import IScript | |
from com.pnfsoftware.jeb.core import RuntimeProjectUtil | |
from com.pnfsoftware.jeb.core.units.code import ICodeUnit, ICodeItem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_basic_block(addr): | |
res = None | |
_func = idaapi.get_func(addr) | |
for block in idaapi.FlowChart(_func): | |
if block.startEA >= addr: | |
return hex(res)[:-1] | |
else: | |
res = block.startEA |