python类jumpto()的实例源码

RunTrace.py 文件源码 项目:IDAPython-Scripts 作者: razygon 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def DefaultView(self): 
        DEBUG_PRINT('IN Defaultview')
        ea = self._showFunctions()
        if 0 == ea:
            return
        idaapi.jumpto(ea, -1,1)
        (startEA,endEA) = self._GetFuncRange(ea)
        cid = [i for i,item in enumerate(self._tablelist) if item[0]==hex(startEA)]
        if cid != []:
            cindex = cid[0]
            if self._tablelist[cindex][2] == '1':
                return
            self._tablelist[cindex][2] = '1'
        else:
            print 'ea not in range' 
        self._showComms(startEA,endEA,0)
        self._choose_id = 0
        idc.Refresh()
coverage_overview.py 文件源码 项目:lighthouse 作者: gaasedelen 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def _ui_entry_double_click(self, index):
        """
        Handle double click event on the coverage table.

        A double click on the coverage table view will jump the user to
        the corresponding function in the IDA disassembly view.
        """
        idaapi.jumpto(self._model.row2func[index.row()])
database.py 文件源码 项目:idascripts 作者: ctfhacker 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def go(ea):
    '''Jump to the specified address at ``ea``.'''
    if isinstance(ea, basestring):
        ea = search.by_name(None, ea)
    idaapi.jumpto(interface.address.inside(ea))
    return ea

# returns the offset of ea from the baseaddress
database.py 文件源码 项目:idascripts 作者: ctfhacker 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def goof(offset):
    '''Jump to the specified ``offset`` within the database.'''
    res = ui.current.address()-baseaddress()
    ea = coof(offset)
    idaapi.jumpto(interface.address.inside(ea))
    return res
TemporaryStructure.py 文件源码 项目:HexRaysPyTools 作者: igogo-x86 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def show_location(self):
        idaapi.jumpto(self.address)
Classes.py 文件源码 项目:HexRaysPyTools 作者: igogo-x86 项目源码 文件源码 阅读 27 收藏 0 点赞 0 评论 0
def open_function(self):
        if self.address:
            if idaapi.decompile(self.address):
                idaapi.open_pseudocode(self.address, 0)
            else:
                idaapi.jumpto(self.address)
idc.py 文件源码 项目:DecLLVM 作者: F8LEFT 项目源码 文件源码 阅读 25 收藏 0 点赞 0 评论 0
def Jump(ea):
    """
    Move cursor to the specifed linear address

    @param ea: linear address
    """
    return idaapi.jumpto(ea)
functions_plus.py 文件源码 项目:functions-plus 作者: ax330d 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def dblclick(self, item):
        '''Handle double click event.'''
        try:
            idaapi.jumpto(int(item.text(1), 16))
        except:
            pass
extractFunMatrix.py 文件源码 项目:IDAPython-Scripts 作者: razygon 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def Get_FunctionFeatures():
    global ftarget, func_name_ea, dbctrl, FIRST_RUN, funlist, funfeaturelist, title, cols
    origin_ftarget = ftarget #pAllocateAndInitializeMDSURF
    ftarget = idc.AskStr(origin_ftarget, 'Type the Target String (CASE INSenstive)')
    if ftarget == '':
        print 'NO input'
        return
    if ftarget == origin_ftarget and not FIRST_RUN:
    # if target string doesn't change, then keep previous funlist, but first time run must be excluded
        DEBUG_PRINT("ftarget == origin_ftarget ")
        pass
    else:
        funlist = []        
        for f in func_name_ea.keys():
            if ftarget.lower() in f.lower():
#                 funlist.append((f,func_name_ea[f]))
                funlist.append(f)
        DEBUG_PRINT(funlist)
        funfeaturelist = []
        for fun in funlist:
            funfeature = dbctrl.find_one({"name":fun})
            if funfeature:
                featurelist = []
                for feature in funfeature:
                    if feature != '_id':
                        featurelist.append(funfeature[feature].strip('(,)').split(',')[0])
                DEBUG_PRINT(featurelist)
                funfeaturelist.append(featurelist) 
        DEBUG_PRINT(funfeaturelist)                
    if FIRST_RUN:
        FIRST_RUN = 0
#funfeaturelist prepared      
    DEBUG_PRINT("To show the window")
#     print title
#     print cols
    chooser = IdxChoose2(title, cols, funfeaturelist)  #, deflt = deflt_id
    id = chooser.show()
    if -1 == id:
        idc.Message('\n Index no change\n')
    else:
        ea = funfeaturelist[id][cols.index(['ea', 10])]
        print 'ea',ea
        type(ea)
        idaapi.jumpto(int(ea,16), -1,1)
        features = dbctrl.find_one({"ea":ea})
        for f in features:
            print '%-20s %s'%(f, features[f])
    DEBUG_PRINT("show finished")


问题


面经


文章

微信
公众号

扫码关注公众号