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


Python idc.Jump方法代码示例

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


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

示例1: itemDoubleClickSlot

# 需要导入模块: import idc [as 别名]
# 或者: from idc import Jump [as 别名]
def itemDoubleClickSlot(self, index):
        """
        TreeView DoubleClicked Slot.
        @param index: QModelIndex object of the clicked tree index item.
        @return:
        """
        function = index.data(role=DIE.UI.Function_Role)
        if function is not None:

            ea = function.function_start
            if function.is_lib_func:
                ea = function.proto_ea

            if ea is not None and ea is not idc.BADADDR:
                idc.Jump(ea)
                return True

        func_context = index.data(role=DIE.UI.FunctionContext_Role)
        if func_context is not None:
            ea = func_context.calling_ea
            if ea is not None and ea is not idc.BADADDR:
                idc.Jump(ea)
                return True 
开发者ID:ynvb,项目名称:DIE,代码行数:25,代码来源:FunctionViewEx.py

示例2: run

# 需要导入模块: import idc [as 别名]
# 或者: from idc import Jump [as 别名]
def run(self, arg):
        comms = {}
        for addr in ida.addresses():
            comm = idaapi.get_cmt(addr, 0)
            if comm:
                try:
                    parsed = bap_comment.parse(comm)
                    if parsed:
                        for (name, data) in parsed.items():
                            comms[(addr, name)] = data
                except:
                    idc.Message("BAP> failed to parse string {0}\n{1}".
                                format(comm, str(sys.exc_info()[1])))
        comms = [(name, addr, data)
                 for ((addr, name), data) in comms.items()]
        attrs = Attributes(comms)
        choice = attrs.Show(modal=True)
        if choice >= 0:
            idc.Jump(comms[choice][1]) 
开发者ID:BinaryAnalysisPlatform,项目名称:bap-ida-python,代码行数:21,代码来源:bap_comments.py

示例3: __init__

# 需要导入模块: import idc [as 别名]
# 或者: from idc import Jump [as 别名]
def __init__(self, bits):
        super(IntelMask, self).__init__(bits)

        self.maskings = [('ESP Offsets', 'sp_mask'),
                        ('EBP Offsets', 'bp_mask'),
                        ('Call Offsets', 'call_mask'),
                        ('Jump Offsets', 'jmp_mask'),
                        ('Global Offsets', 'global_mask'),
                        ('Customize', 'custom_mask')]
        self.registers = [  ('EAX', 'eax_mask'), ('EBX', 'ebx_mask'),
                            ('ECX', 'ecx_mask'), ('EDX', 'edx_mask'),
                            ('ESI', 'esi_mask'), ('EDI', 'edi_mask')]
        if not is_32bit():
            self.registers = []

        self.gui = self._init_gui() 
开发者ID:Cisco-Talos,项目名称:CASC,代码行数:18,代码来源:casc_plugin.py

示例4: subsignature_selected

# 需要导入模块: import idc [as 别名]
# 或者: from idc import Jump [as 别名]
def subsignature_selected(self, item):
        try:
            match = self.matches[item.subsignature_name]
            self.match_label.setText("Match:   EA: 0x%08x  Length: % 4d     Bytes: %s" % \
                    (match["ea"], len(match["data"]), " ".join("%02x" % ord(x) for x in match["data"])))
            idc.Jump(match["ea"])
            for ea, color in self.previous_colors:
                idc.SetColor(ea, idc.CIC_ITEM, color)
            self.previous_colors = []
            for ea in idautils.Heads(match["ea"], match["ea"] + len(match["data"])):
                self.previous_colors.append((ea, idc.GetColor(ea, idc.CIC_ITEM)))
                idc.SetColor(ea, idc.CIC_ITEM, SIGALYZER_COLOR_HIGHLIGHTED)
        except KeyError:
            self.match_label.setText("No match")
            for ea, color in self.previous_colors:
                idc.SetColor(ea, idc.CIC_ITEM, color)
            self.previous_colors = []
        except IndexError:
            log.exception("While selecting subsignature") 
开发者ID:Cisco-Talos,项目名称:CASC,代码行数:21,代码来源:casc_plugin.py

示例5: go_to_instruction

# 需要导入模块: import idc [as 别名]
# 或者: from idc import Jump [as 别名]
def go_to_instruction(self, item):
        table = self.index_map[self.traces_tab.currentIndex()]
        addr_item = table.item(item.row(), 1)
        addr_s = addr_item.text()
        try:
            addr = int(addr_s, 0)
            idc.Jump(addr)
        except Exception:
            print "Cannot jump to the selected location" 
开发者ID:RobinDavid,项目名称:idasec,代码行数:11,代码来源:TraceWidget.py

示例6: disassemble_from_trace

# 需要导入模块: import idc [as 别名]
# 或者: from idc import Jump [as 别名]
def disassemble_from_trace(self):
        try:
            index = self.traces_tab.currentIndex()
            trace = self.core.traces[self.id_map[index]]

            self.disassemble_button.setFlat(True)
            found_match = False
            for k, inst in trace.instrs.items():
                if k in trace.metas:
                    for name, arg1, arg2 in trace.metas[k]:
                        if name == "wave":
                            self.parent.log("LOG", "Wave n°%d encountered at (%s,%x) stop.." % (arg1, k, inst.address))
                            prev_inst = trace.instrs[k-1]
                            idc.MakeComm(prev_inst.address, "Jump into Wave %d" % arg1)
                            self.disassemble_button.setFlat(False)
                            return
                # TODO: Check that the address is in the address space of the program
                if not idc.isCode(idc.GetFlags(inst.address)):
                    found_match = True
                    # TODO: Add an xref with the previous instruction
                    self.parent.log("LOG", "Addr:%x not decoded as an instruction" % inst.address)
                    if idc.MakeCode(inst.address) == 0:
                        self.parent.log("ERROR", "Fail to decode at:%x" % inst.address)
                    else:
                        idaapi.autoWait()
                        self.parent.log("SUCCESS", "Instruction decoded at:%x" % inst.address)

            if not found_match:
                self.parent.log("LOG", "All instruction are already decoded")
            self.disassemble_button.setFlat(False)
        except KeyError:
            print "No trace found to use" 
开发者ID:RobinDavid,项目名称:idasec,代码行数:34,代码来源:TraceWidget.py

示例7: OnSelectLine

# 需要导入模块: import idc [as 别名]
# 或者: from idc import Jump [as 别名]
def OnSelectLine(self, n):

		item = self.items[n]

		jump_ea = int(item[0], 16)
		# Only jump for valid addresses
		if idaapi.IDA_SDK_VERSION < 700:
			valid_addr = idc.isEnabled(jump_ea)
		else:
			valid_addr = idc.is_mapped(jump_ea)
		if valid_addr:
			idc.Jump(jump_ea) 
开发者ID:FSecureLABS,项目名称:win_driver_plugin,代码行数:14,代码来源:create_tab_table.py

示例8: OnJump

# 需要导入模块: import idc [as 别名]
# 或者: from idc import Jump [as 别名]
def OnJump(self, row, column):
        ea = self.tableWidget.item(row, column).text()
        if column == 0:
            idc.Jump(int(ea, 16)) 
开发者ID:onethawt,项目名称:idapyscripts,代码行数:6,代码来源:dataxrefcounter.py

示例9: enter

# 需要导入模块: import idc [as 别名]
# 或者: from idc import Jump [as 别名]
def enter(self, n):
        o = self.list[n-1]
        idc.Jump(o.caller)

# ----------------------------------------------------------------------- 
开发者ID:joxeankoret,项目名称:nightmare,代码行数:7,代码来源:CallStackWalk.py

示例10: jump_user_to

# 需要导入模块: import idc [as 别名]
# 或者: from idc import Jump [as 别名]
def jump_user_to(self, where):
            print "[+] Jumping to", where
            idc.Jump(int(where, 16)) 
开发者ID:CubicaLabs,项目名称:IDASynergy,代码行数:5,代码来源:IDASynergy.py

示例11: click_tree

# 需要导入模块: import idc [as 别名]
# 或者: from idc import Jump [as 别名]
def click_tree(self):
        i = self._switch_tree.currentItem()
        addr = i.text(0).strip()
        if not addr.startswith("0x"):
            addr = idaapi.get_name_ea(idc.BADADDR, str(addr))
        else:
            addr = addr[2:10]
            addr = int(addr, 16)
        idc.Jump(addr)
        return 
开发者ID:jjo-sec,项目名称:idataco,代码行数:12,代码来源:switch_jumps.py

示例12: clickRow

# 需要导入模块: import idc [as 别名]
# 或者: from idc import Jump [as 别名]
def clickRow(self):
        addr = int(self._call_table.item(self._call_table.currentRow(), 1).text(), 16)
        if addr:
            idc.Jump(addr) 
开发者ID:jjo-sec,项目名称:idataco,代码行数:6,代码来源:calls.py

示例13: click_row

# 需要导入模块: import idc [as 别名]
# 或者: from idc import Jump [as 别名]
def click_row(self):
        i = self._bytestring_table.item(self._bytestring_table.currentRow(), 0)
        bstr = self._bytestring_table.item(self._bytestring_table.currentRow(), 2)
        addr = i.text().strip()
        bstr = bstr.text()
        if not addr.startswith("0x"):
            addr = idaapi.get_name_ea(idc.BADADDR, str(addr))
        else:
            addr = addr[2:10]
            addr = int(addr, 16)
        idc.Jump(addr)
        self._clipboard.setText(bstr) 
开发者ID:jjo-sec,项目名称:idataco,代码行数:14,代码来源:byte_strings.py

示例14: clickRow

# 需要导入模块: import idc [as 别名]
# 或者: from idc import Jump [as 别名]
def clickRow(self):
        try:
            addr = int(self._import_table.item(self._import_table.currentRow(), 0).text(), 16)
            idc.Jump(addr)
        except Exception, e:
            log.error("Exception encountered: {}".format(e)) 
开发者ID:jjo-sec,项目名称:idataco,代码行数:8,代码来源:imports.py

示例15: click_row

# 需要导入模块: import idc [as 别名]
# 或者: from idc import Jump [as 别名]
def click_row(self):
        addr = self._interesting_xor_table.item(self._interesting_xor_table.currentRow(), 1).text().strip()
        addr= int(addr, 16)
        idc.Jump(addr) 
开发者ID:jjo-sec,项目名称:idataco,代码行数:6,代码来源:interesting_xor.py


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