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


Python idc.read_selection_start方法代码示例

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


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

示例1: __init__

# 需要导入模块: import idc [as 别名]
# 或者: from idc import read_selection_start [as 别名]
def __init__(self):
        self.searchDwordArray = False
        self.searchPushArgs = False
        self.createStruct = False
        self.useDecompiler = False
        self.useXORSeed = False
        self.XORSeed = 0

        #startAddr & endAddr: range to process
        if using_ida7api:
            self.startAddr = idc.read_selection_start()
            self.endAddr = idc.read_selection_end()
        else:
            self.startAddr = idc.SelStart()
            self.endAddr = idc.SelEnd()

        #hashTypes: list of HashTypes user confirmed to process
        self.hashTypes = []

############################################################
# SearchParams
############################################################ 
开发者ID:fireeye,项目名称:flare-ida,代码行数:24,代码来源:shellcode_hash_search.py

示例2: search_with_wildcards

# 需要导入模块: import idc [as 别名]
# 或者: from idc import read_selection_start [as 别名]
def search_with_wildcards(strict):
    search_vt = vtgrep.VTGrepSearch(
        addr_start=idc.read_selection_start(),
        addr_end=idc.read_selection_end()
        )
    search_vt.search(True, strict) 
开发者ID:VirusTotal,项目名称:vt-ida-plugin,代码行数:8,代码来源:plugin_loader.py

示例3: search_for_bytes

# 需要导入模块: import idc [as 别名]
# 或者: from idc import read_selection_start [as 别名]
def search_for_bytes():
    search_vt = vtgrep.VTGrepSearch(
        addr_start=idc.read_selection_start(),
        addr_end=idc.read_selection_end()
        )
    search_vt.search(False) 
开发者ID:VirusTotal,项目名称:vt-ida-plugin,代码行数:8,代码来源:plugin_loader.py

示例4: get_selection

# 需要导入模块: import idc [as 别名]
# 或者: from idc import read_selection_start [as 别名]
def get_selection(always=True):
    start = idc.read_selection_start()
    end = idc.read_selection_end()

    if idaapi.BADADDR in (start, end):
        if not always:
            raise exceptions.SarkNoSelection()

        ea = idc.here()
        start = idaapi.get_item_head(ea)
        end = idaapi.get_item_end(ea)

    return Selection(start, end) 
开发者ID:tmr232,项目名称:Sark,代码行数:15,代码来源:base.py

示例5: symbolic_exec

# 需要导入模块: import idc [as 别名]
# 或者: from idc import read_selection_start [as 别名]
def symbolic_exec():
    from miasm.ir.symbexec import SymbolicExecutionEngine
    from miasm.core.bin_stream_ida import bin_stream_ida

    from utils import guess_machine

    start, end = idc.read_selection_start(), idc.read_selection_end()

    bs = bin_stream_ida()
    machine = guess_machine(addr=start)

    mdis = machine.dis_engine(bs)

    if start == idc.BADADDR and end == idc.BADADDR:
        start = idc.get_screen_ea()
        end = idc.next_head(start) # Get next instruction address

    mdis.dont_dis = [end]
    asmcfg = mdis.dis_multiblock(start)
    ira = machine.ira(loc_db=mdis.loc_db)
    ircfg = ira.new_ircfg_from_asmcfg(asmcfg)

    print("Run symbolic execution...")
    sb = SymbolicExecutionEngine(ira, machine.mn.regs.regs_init)
    sb.run_at(ircfg, start)
    modified = {}

    for dst, src in sb.modified(init_state=machine.mn.regs.regs_init):
        modified[dst] = src

    view = symbolicexec_t()
    all_views.append(view)
    if not view.Create(modified, machine, mdis.loc_db,
                       "Symbolic Execution - 0x%x to 0x%x"
                       % (start, idc.prev_head(end))):
        return

    view.Show()


# Support ida 6.9 and ida 7 
开发者ID:cea-sec,项目名称:miasm,代码行数:43,代码来源:symbol_exec.py

示例6: get_selection

# 需要导入模块: import idc [as 别名]
# 或者: from idc import read_selection_start [as 别名]
def get_selection():
    start = idc.read_selection_start()
    end = idc.read_selection_end()
    if idaapi.BADADDR in (start, end):
        ea = idc.here()
        start = idaapi.get_item_head(ea)
        end = idaapi.get_item_end(ea)
    return start, end 
开发者ID:fox-it,项目名称:mkYARA,代码行数:10,代码来源:mkyara_plugin.py

示例7: promptForRange

# 需要导入模块: import idc [as 别名]
# 或者: from idc import read_selection_start [as 别名]
def promptForRange(self):
        # Only run if QT not available, so not bothering with ida7 check
        #check if a range has already been selected - if so skip prompt
        if using_ida7api:
            selstart = idc.read_selection_start()
            selend = idc.read_selection_end()
            segstart = idc.get_segm_start(idc.here())
            segend = idc.get_segm_end(idc.here())
        else:
            selstart = idc.SelStart()
            selend = idc.SelEnd()
            seg = idc.SegStart(idc.here())
            self.params.endAddr = idc.SegEnd(idc.here())

        if selstart != idc.BADADDR:
            self.params.startAddr = selstart
            self.params.endAddr = selend
            logger.info('Processing range 0x%08x - 0x%08x', self.params.startAddr, self.params.endAddr)
        else:
            self.params.startAddr = segstart
            self.params.endAddr = segend
            logger.info('Processing current segment only')

###################################################################
#
################################################################### 
开发者ID:fireeye,项目名称:flare-ida,代码行数:28,代码来源:shellcode_hash_search.py


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