TraceWidget.py 文件源码

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

项目:idasec 作者: RobinDavid 项目源码 文件源码
def dump_trace(self):
        filename = QtWidgets.QFileDialog.getSaveFileName()[0]
        filepath = Path(filename)
        if not filepath.exists() and filepath != '':
            try:
                index = self.traces_tab.currentIndex()
                trace = self.core.traces[self.id_map[index]]
                f = filepath.open("w")
                for line in trace.to_string_generator():
                    f.write(line+"\n")
                f.close()
                print "Writing done"
            except KeyError:
                print "Trace not found"
        else:
            print "File already exists.. (do not dump)"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号