当前位置: 首页>>代码示例>>Python>>正文


Python idc.MinEA方法代码示例

本文整理汇总了Python中idc.MinEA方法的典型用法代码示例。如果您正苦于以下问题:Python idc.MinEA方法的具体用法?Python idc.MinEA怎么用?Python idc.MinEA使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在idc的用法示例。


在下文中一共展示了idc.MinEA方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_bad_addresses

# 需要导入模块: import idc [as 别名]
# 或者: from idc import MinEA [as 别名]
def get_bad_addresses(verbose=True):
    """ gets all the unmapped addressed from IDA's database """
    ret = []
    curEa = idc.MinEA()
    while True:
        if verbose:
            print "[+] getting more bad addresses 0x%08X" % (curEa)
        # the regex "(DC[DQ]| B.*) +0x" will retrieve the following:
        # 1. DCD 0x...
        # 2. DCQ 0x...
        # 3. B   0x.....
        # 4. BL  0x....
        curEa = get_next_bad_addr(curEa, "(DC[DQ]| B.*) +0x")
        if curEa == idc.BADADDR:
            break
        if verbose:
            print "[+] found bad address at 0x%08X" % (curEa)
        dcd = idc.GetDisasm(curEa)
        res = re.findall("0x\w{8,}", dcd)
        for r in res:
            ret.append(int(r, 16))
    if verbose:
        print "[+] found %d bad addresses" % len(ret)
    return ret 
开发者ID:deepinstinct,项目名称:dsc_fix,代码行数:26,代码来源:dsc_fix.py

示例2: reset

# 需要导入模块: import idc [as 别名]
# 或者: from idc import MinEA [as 别名]
def reset():
        idc.MakeUnknown(idc.MinEA(), 0x1000, 0)
        for i in range(0x1000):
            idc.PatchByte(idc.MinEA() + i, 0) 
开发者ID:sogeti-esec-lab,项目名称:LKD,代码行数:6,代码来源:simple_x64.py

示例3: tst

# 需要导入模块: import idc [as 别名]
# 或者: from idc import MinEA [as 别名]
def tst():
        reset()
        midap.here(idc.MinEA()).write(s.get_code())
        idc.MakeFunction(idc.MinEA())

    # tst() 
开发者ID:sogeti-esec-lab,项目名称:LKD,代码行数:8,代码来源:simple_x64.py

示例4: tst

# 需要导入模块: import idc [as 别名]
# 或者: from idc import MinEA [as 别名]
def tst():
        reset()
        midap.here(idc.MinEA()).write(s.get_code())
        idc.MakeFunction(idc.MinEA()) 
开发者ID:sogeti-esec-lab,项目名称:LKD,代码行数:6,代码来源:simple_x86.py

示例5: main

# 需要导入模块: import idc [as 别名]
# 或者: from idc import MinEA [as 别名]
def main():
    if _IN_IDA:
        # # get dyld_shared_cache path from IDA's openFile dialog
        print "[+] Please choose the original dyld_shared_cache_arm64"
        dsc_path = idc.AskFile(0, "*.*", "dyld shared cache file")
    else:
        dsc_path = sys.argv[1]

    if not dsc_path or not os.path.exists(dsc_path):
        raise RuntimeError("Couldn't find the dyld shared cache file..")

    print "[+] about to parse %s.." % (dsc_path)
    dsc_file = open(dsc_path, "rb")
    adrfind = AddrFinder(dsc_file, cache_symbols=False)
    map_shared_bridges(dsc_file, adrfind)
    if _IN_IDA:
        addresses = sorted(set(get_bad_addresses()))
    else:
        addresses = sorted(set(eval(open("addrs.txt", "rb").read())))

    segments, exports = get_segments_and_exports_for_addresses(addresses, adrfind)
    # segments = join_neighbors(segments, threshold=0x1000)
    if _IN_IDA:
        map_segments(segments, dsc_file)
        map_exports(exports)
        idaapi.analyze_area(idc.MinEA(), idc.MaxEA()) 
开发者ID:deepinstinct,项目名称:dsc_fix,代码行数:28,代码来源:dsc_fix.py


注:本文中的idc.MinEA方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。