RunTrace.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:IDAPython-Scripts 作者: razygon 项目源码 文件源码
def IdxChooser(self):  #'i' #THE ONLY place can change the index manually
        DEBUG_PRINT('in IdxChooser')
        ea = idc.ScreenEA()
        deflt_id = 1
        try:
            deflt_id = self.GetID(ea, self.GetIDX(ea)) + 1
        except:
            pass
        DEBUG_PRINT(ea)
        if ea not in self._dbDict.keys():
            DEBUG_PRINT( '\n0x%x has no comments'%(ea))
            return
        title = 'IndexChooser'
        cols = [['ID',4],['Index',10],['Comment',40]]
        items = []
        count = 1
        for item in self._dbDict[ea]._idx_list:
            temp = [str(count),str(item[0]),item[1]]
            items.append(temp)
            count = count + 1            
        chooser = IdxChoose2(title, cols, items,deflt = deflt_id)
        id = chooser.show()        
        if -1==id:
            idc.Message('\n Index no change\n')
        else:
            self._choose_id = id
            self._choose_ea = ea
            print '0x%x %dth index is chosen'%(ea,self._choose_id)
            self.ForwardView(ea,self._choose_id,innermode = 1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号