當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。