本文整理汇总了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
############################################################
示例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)
示例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)
示例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)
示例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
示例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
示例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')
###################################################################
#
###################################################################