插件新增数据导出功能#4
Open
admln wants to merge 8 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
由于该burp插件只能接收eCapture的ws数据,但是无法保存数据,所以增加了数据导出功能,功能如下:

1.在表格上方(Search 面板)应该看到新增按钮:Choose Columns、Export HAR、Export CSV。
2.选择若干行(多选)或不选择(导出全部会弹窗确认),点击 Export HAR 或 Export CSV,会弹出文件保存对话框以选择输出文件路径。
关键设计与行为
第一列为 Boolean,可直接勾选;点击表头第一列会在所有行间切换全选/反选。
getSelectedPairs() 返回被勾选的 MatchedHttpPair 列表;如果没有选中任何行,导出时会弹窗询问是否导出全部。
HAR: 生成一个基本 HAR JSON(log.version、creator、entries),entry 包含 request/response 的 minimal 字段,body 二进制以 base64 编码并标注 encoding。
Excel: 生成 XLSX,第一行为列头,后面每行为一条记录;列名与 ColumnSelectorDialog 中一致。
若没有勾选行,导出时弹窗询问是否导出全部。
对非常大的/二进制正文:HAR 会 base64 编码;Excel 将尝试写为文本(如果你需要更稳妥的二进制处理/截断或把正文拆到单独文件,可继续优化)。
如果写文件时遇 IOException,会弹出错误提示并记录到 Burp 日志(使用 existing logging)。