Version: 4.1.2 Update
Signed-off-by: gh0stkey <24655118+gh0stkey@users.noreply.github.com>
This commit is contained in:
34
README.md
34
README.md
@@ -65,22 +65,24 @@ We appreciate everyone's support for the project. The following list is sorted b
|
||||
|
||||
| ID | Amount |
|
||||
| -------- | -------- |
|
||||
| 毁三观大人 | 200.00¥ |
|
||||
| ttt | 50.00¥ |
|
||||
| C_soon5 | 66.66¥ |
|
||||
| 1wtbb | 25.00¥ |
|
||||
| Deep | 66.66¥ |
|
||||
| NaTsUk0 | 50.00¥ |
|
||||
| Kite | 48.00¥ |
|
||||
| 红色键盘 | 99.99¥ |
|
||||
| 曾哥 | 188.88¥ |
|
||||
| NOP Team | 200.00¥ |
|
||||
| vaycore | 188.88¥ |
|
||||
| xccc | 168.00¥ |
|
||||
| 柯林斯-民间新秀 | 1000.00¥ |
|
||||
| Cuber | 100.00¥ |
|
||||
| 时光难逆 | 50.00¥ |
|
||||
| Celvin | 66.00¥ |
|
||||
| 毁三观大人 | 200.00 CNY |
|
||||
| ttt | 50.00 CNY |
|
||||
| C_soon5 | 66.66 CNY |
|
||||
| 1wtbb | 25.00 CNY |
|
||||
| Deep | 66.66 CNY |
|
||||
| NaTsUk0 | 50.00 CNY |
|
||||
| Kite | 48.00 CNY |
|
||||
| 红色键盘 | 99.99 CNY |
|
||||
| 曾哥 | 188.88 CNY |
|
||||
| NOP Team | 200.00 CNY |
|
||||
| vaycore | 188.88 CNY |
|
||||
| xccc | 168.00 CNY |
|
||||
| 柯林斯-民间新秀 | 1000.00 CNY |
|
||||
| Cuber | 100.00 CNY |
|
||||
| 时光难逆 | 50.00 CNY |
|
||||
| Celvin | 66.00 CNY |
|
||||
| 呱呱 | 18.80 CNY |
|
||||
| 红炉点雪 | 50.00 CNY |
|
||||
|
||||
## Support the Project
|
||||
|
||||
|
||||
@@ -94,6 +94,8 @@ HaE目前的规则一共有8个字段,详细的含义如下所示:
|
||||
| Cuber | 100.00元 |
|
||||
| 时光难逆 | 50.00元 |
|
||||
| Celvin | 66.00元 |
|
||||
| 呱呱 | 18.80元 |
|
||||
| 红炉点雪 | 50.00元 |
|
||||
|
||||
## 支持项目
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ public class HaE implements BurpExtension {
|
||||
public void initialize(MontoyaApi api) {
|
||||
// 设置扩展名称
|
||||
api.extension().setName("HaE - Highlighter and Extractor");
|
||||
String version = "4.1.1";
|
||||
String version = "4.1.2";
|
||||
|
||||
// 加载扩展后输出的项目信息
|
||||
Logging logging = api.logging();
|
||||
|
||||
2
src/main/java/hae/cache/MessageCache.java
vendored
2
src/main/java/hae/cache/MessageCache.java
vendored
@@ -8,7 +8,7 @@ import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class MessageCache {
|
||||
private static final int MAX_SIZE = 100000;
|
||||
private static final int EXPIRE_DURATION = 12;
|
||||
private static final int EXPIRE_DURATION = 4;
|
||||
|
||||
private static final Cache<String, Map<String, Map<String, Object>>> cache =
|
||||
Caffeine.newBuilder()
|
||||
|
||||
@@ -218,7 +218,6 @@ public class Config extends JPanel {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
private JPanel createConfigTablePanel(String[] mode) {
|
||||
GridBagConstraints constraints = new GridBagConstraints();
|
||||
constraints.weightx = 1.0;
|
||||
|
||||
@@ -2,6 +2,7 @@ package hae.component.board;
|
||||
|
||||
import burp.api.montoya.MontoyaApi;
|
||||
import hae.Config;
|
||||
import hae.cache.MessageCache;
|
||||
import hae.component.board.message.MessageTableModel;
|
||||
import hae.component.board.message.MessageTableModel.MessageTable;
|
||||
import hae.component.board.table.Datatable;
|
||||
@@ -53,12 +54,14 @@ public class Databoard extends JPanel {
|
||||
((GridBagLayout) getLayout()).rowWeights = new double[]{0.0, 1.0, 0.0, 0.0, 1.0E-4};
|
||||
JLabel hostLabel = new JLabel("Host:");
|
||||
|
||||
JButton clearButton = new JButton("Clear");
|
||||
JButton clearDataButton = new JButton("Clear data");
|
||||
JButton clearCacheButton = new JButton("Clear cache");
|
||||
JButton actionButton = new JButton("Action");
|
||||
JPanel menuPanel = new JPanel(new GridLayout(1, 1, 0, 5));
|
||||
JPanel menuPanel = new JPanel(new GridLayout(2, 1, 0, 5));
|
||||
menuPanel.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
|
||||
JPopupMenu menu = new JPopupMenu();
|
||||
menuPanel.add(clearButton);
|
||||
menuPanel.add(clearDataButton);
|
||||
menuPanel.add(clearCacheButton);
|
||||
menu.add(menuPanel);
|
||||
|
||||
hostTextField = new JTextField();
|
||||
@@ -76,7 +79,8 @@ public class Databoard extends JPanel {
|
||||
menu.show(actionButton, x, y);
|
||||
});
|
||||
|
||||
clearButton.addActionListener(this::clearActionPerformed);
|
||||
clearDataButton.addActionListener(this::clearDataActionPerformed);
|
||||
clearCacheButton.addActionListener(this::clearCacheActionPerformed);
|
||||
|
||||
progressBar = new JProgressBar();
|
||||
splitPane.addComponentListener(new ComponentAdapter() {
|
||||
@@ -340,7 +344,11 @@ public class Databoard extends JPanel {
|
||||
return result;
|
||||
}
|
||||
|
||||
private void clearActionPerformed(ActionEvent e) {
|
||||
private void clearCacheActionPerformed(ActionEvent e) {
|
||||
MessageCache.clear();
|
||||
}
|
||||
|
||||
private void clearDataActionPerformed(ActionEvent e) {
|
||||
int retCode = JOptionPane.showConfirmDialog(this, "Do you want to clear data?", "Info",
|
||||
JOptionPane.YES_NO_OPTION);
|
||||
String host = hostTextField.getText();
|
||||
|
||||
@@ -242,17 +242,40 @@ public class MessageTableModel extends AbstractTableModel {
|
||||
|
||||
public void applyHostFilter(String filterText) {
|
||||
filteredLog.clear();
|
||||
fireTableDataChanged();
|
||||
|
||||
log.forEach(entry -> {
|
||||
int batchSize = 500;
|
||||
|
||||
// 分批处理数据
|
||||
List<MessageEntry> batch = new ArrayList<>(batchSize);
|
||||
int count = 0;
|
||||
|
||||
for (MessageEntry entry : log) {
|
||||
String host = StringProcessor.getHostByUrl(entry.getUrl());
|
||||
if (!host.isEmpty()) {
|
||||
if (StringProcessor.matchesHostPattern(host, filterText) || filterText.contains("*")) {
|
||||
filteredLog.add(entry);
|
||||
if (!host.isEmpty() && (StringProcessor.matchesHostPattern(host, filterText) || filterText.contains("*"))) {
|
||||
batch.add(entry);
|
||||
count++;
|
||||
|
||||
// 当批次达到指定大小时,更新UI
|
||||
if (count % batchSize == 0) {
|
||||
final List<MessageEntry> currentBatch = new ArrayList<>(batch);
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
filteredLog.addAll(currentBatch);
|
||||
fireTableDataChanged();
|
||||
});
|
||||
batch.clear();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
fireTableDataChanged();
|
||||
// 处理最后一批
|
||||
if (!batch.isEmpty()) {
|
||||
final List<MessageEntry> finalBatch = new ArrayList<>(batch);
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
filteredLog.addAll(finalBatch);
|
||||
fireTableDataChanged();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void applyMessageFilter(String tableName, String filterText) {
|
||||
|
||||
@@ -33,6 +33,7 @@ public class Datatable extends JPanel {
|
||||
private final JCheckBox regexMode = new JCheckBox("Regex mode");
|
||||
private final String tabName;
|
||||
private final JPanel footerPanel;
|
||||
private SwingWorker<Void, Void> doubleClickWorker;
|
||||
|
||||
public Datatable(MontoyaApi api, ConfigLoader configLoader, String tabName, List<String> dataList) {
|
||||
this.api = api;
|
||||
@@ -201,6 +202,26 @@ public class Datatable extends JPanel {
|
||||
};
|
||||
}
|
||||
|
||||
private void handleDoubleClick(int selectedRow, MessageTableModel messagePanel) {
|
||||
if (doubleClickWorker != null && !doubleClickWorker.isDone()) {
|
||||
doubleClickWorker.cancel(true);
|
||||
}
|
||||
|
||||
doubleClickWorker = new SwingWorker<>() {
|
||||
@Override
|
||||
protected Void doInBackground() {
|
||||
String rowData = dataTable.getValueAt(selectedRow, 1).toString();
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
if (!isCancelled()) {
|
||||
messagePanel.applyMessageFilter(tabName, rowData);
|
||||
}
|
||||
});
|
||||
return null;
|
||||
}
|
||||
};
|
||||
doubleClickWorker.execute();
|
||||
}
|
||||
|
||||
public void setTableListener(MessageTableModel messagePanel) {
|
||||
// 表格复制功能
|
||||
dataTable.setTransferHandler(new TransferHandler() {
|
||||
@@ -224,8 +245,7 @@ public class Datatable extends JPanel {
|
||||
if (e.getClickCount() == 2) {
|
||||
int selectedRow = dataTable.getSelectedRow();
|
||||
if (selectedRow != -1) {
|
||||
String rowData = dataTable.getValueAt(selectedRow, 1).toString();
|
||||
messagePanel.applyMessageFilter(tabName, rowData);
|
||||
handleDoubleClick(selectedRow, messagePanel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user