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 |
|
| ID | Amount |
|
||||||
| -------- | -------- |
|
| -------- | -------- |
|
||||||
| 毁三观大人 | 200.00¥ |
|
| 毁三观大人 | 200.00 CNY |
|
||||||
| ttt | 50.00¥ |
|
| ttt | 50.00 CNY |
|
||||||
| C_soon5 | 66.66¥ |
|
| C_soon5 | 66.66 CNY |
|
||||||
| 1wtbb | 25.00¥ |
|
| 1wtbb | 25.00 CNY |
|
||||||
| Deep | 66.66¥ |
|
| Deep | 66.66 CNY |
|
||||||
| NaTsUk0 | 50.00¥ |
|
| NaTsUk0 | 50.00 CNY |
|
||||||
| Kite | 48.00¥ |
|
| Kite | 48.00 CNY |
|
||||||
| 红色键盘 | 99.99¥ |
|
| 红色键盘 | 99.99 CNY |
|
||||||
| 曾哥 | 188.88¥ |
|
| 曾哥 | 188.88 CNY |
|
||||||
| NOP Team | 200.00¥ |
|
| NOP Team | 200.00 CNY |
|
||||||
| vaycore | 188.88¥ |
|
| vaycore | 188.88 CNY |
|
||||||
| xccc | 168.00¥ |
|
| xccc | 168.00 CNY |
|
||||||
| 柯林斯-民间新秀 | 1000.00¥ |
|
| 柯林斯-民间新秀 | 1000.00 CNY |
|
||||||
| Cuber | 100.00¥ |
|
| Cuber | 100.00 CNY |
|
||||||
| 时光难逆 | 50.00¥ |
|
| 时光难逆 | 50.00 CNY |
|
||||||
| Celvin | 66.00¥ |
|
| Celvin | 66.00 CNY |
|
||||||
|
| 呱呱 | 18.80 CNY |
|
||||||
|
| 红炉点雪 | 50.00 CNY |
|
||||||
|
|
||||||
## Support the Project
|
## Support the Project
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,8 @@ HaE目前的规则一共有8个字段,详细的含义如下所示:
|
|||||||
| Cuber | 100.00元 |
|
| Cuber | 100.00元 |
|
||||||
| 时光难逆 | 50.00元 |
|
| 时光难逆 | 50.00元 |
|
||||||
| Celvin | 66.00元 |
|
| Celvin | 66.00元 |
|
||||||
|
| 呱呱 | 18.80元 |
|
||||||
|
| 红炉点雪 | 50.00元 |
|
||||||
|
|
||||||
## 支持项目
|
## 支持项目
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class HaE implements BurpExtension {
|
|||||||
public void initialize(MontoyaApi api) {
|
public void initialize(MontoyaApi api) {
|
||||||
// 设置扩展名称
|
// 设置扩展名称
|
||||||
api.extension().setName("HaE - Highlighter and Extractor");
|
api.extension().setName("HaE - Highlighter and Extractor");
|
||||||
String version = "4.1.1";
|
String version = "4.1.2";
|
||||||
|
|
||||||
// 加载扩展后输出的项目信息
|
// 加载扩展后输出的项目信息
|
||||||
Logging logging = api.logging();
|
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 {
|
public class MessageCache {
|
||||||
private static final int MAX_SIZE = 100000;
|
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 =
|
private static final Cache<String, Map<String, Map<String, Object>>> cache =
|
||||||
Caffeine.newBuilder()
|
Caffeine.newBuilder()
|
||||||
|
|||||||
@@ -218,7 +218,6 @@ public class Config extends JPanel {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private JPanel createConfigTablePanel(String[] mode) {
|
private JPanel createConfigTablePanel(String[] mode) {
|
||||||
GridBagConstraints constraints = new GridBagConstraints();
|
GridBagConstraints constraints = new GridBagConstraints();
|
||||||
constraints.weightx = 1.0;
|
constraints.weightx = 1.0;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package hae.component.board;
|
|||||||
|
|
||||||
import burp.api.montoya.MontoyaApi;
|
import burp.api.montoya.MontoyaApi;
|
||||||
import hae.Config;
|
import hae.Config;
|
||||||
|
import hae.cache.MessageCache;
|
||||||
import hae.component.board.message.MessageTableModel;
|
import hae.component.board.message.MessageTableModel;
|
||||||
import hae.component.board.message.MessageTableModel.MessageTable;
|
import hae.component.board.message.MessageTableModel.MessageTable;
|
||||||
import hae.component.board.table.Datatable;
|
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};
|
((GridBagLayout) getLayout()).rowWeights = new double[]{0.0, 1.0, 0.0, 0.0, 1.0E-4};
|
||||||
JLabel hostLabel = new JLabel("Host:");
|
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");
|
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));
|
menuPanel.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
|
||||||
JPopupMenu menu = new JPopupMenu();
|
JPopupMenu menu = new JPopupMenu();
|
||||||
menuPanel.add(clearButton);
|
menuPanel.add(clearDataButton);
|
||||||
|
menuPanel.add(clearCacheButton);
|
||||||
menu.add(menuPanel);
|
menu.add(menuPanel);
|
||||||
|
|
||||||
hostTextField = new JTextField();
|
hostTextField = new JTextField();
|
||||||
@@ -76,7 +79,8 @@ public class Databoard extends JPanel {
|
|||||||
menu.show(actionButton, x, y);
|
menu.show(actionButton, x, y);
|
||||||
});
|
});
|
||||||
|
|
||||||
clearButton.addActionListener(this::clearActionPerformed);
|
clearDataButton.addActionListener(this::clearDataActionPerformed);
|
||||||
|
clearCacheButton.addActionListener(this::clearCacheActionPerformed);
|
||||||
|
|
||||||
progressBar = new JProgressBar();
|
progressBar = new JProgressBar();
|
||||||
splitPane.addComponentListener(new ComponentAdapter() {
|
splitPane.addComponentListener(new ComponentAdapter() {
|
||||||
@@ -340,7 +344,11 @@ public class Databoard extends JPanel {
|
|||||||
return result;
|
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",
|
int retCode = JOptionPane.showConfirmDialog(this, "Do you want to clear data?", "Info",
|
||||||
JOptionPane.YES_NO_OPTION);
|
JOptionPane.YES_NO_OPTION);
|
||||||
String host = hostTextField.getText();
|
String host = hostTextField.getText();
|
||||||
|
|||||||
@@ -242,17 +242,40 @@ public class MessageTableModel extends AbstractTableModel {
|
|||||||
|
|
||||||
public void applyHostFilter(String filterText) {
|
public void applyHostFilter(String filterText) {
|
||||||
filteredLog.clear();
|
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());
|
String host = StringProcessor.getHostByUrl(entry.getUrl());
|
||||||
if (!host.isEmpty()) {
|
if (!host.isEmpty() && (StringProcessor.matchesHostPattern(host, filterText) || filterText.contains("*"))) {
|
||||||
if (StringProcessor.matchesHostPattern(host, filterText) || filterText.contains("*")) {
|
batch.add(entry);
|
||||||
filteredLog.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) {
|
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 JCheckBox regexMode = new JCheckBox("Regex mode");
|
||||||
private final String tabName;
|
private final String tabName;
|
||||||
private final JPanel footerPanel;
|
private final JPanel footerPanel;
|
||||||
|
private SwingWorker<Void, Void> doubleClickWorker;
|
||||||
|
|
||||||
public Datatable(MontoyaApi api, ConfigLoader configLoader, String tabName, List<String> dataList) {
|
public Datatable(MontoyaApi api, ConfigLoader configLoader, String tabName, List<String> dataList) {
|
||||||
this.api = api;
|
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) {
|
public void setTableListener(MessageTableModel messagePanel) {
|
||||||
// 表格复制功能
|
// 表格复制功能
|
||||||
dataTable.setTransferHandler(new TransferHandler() {
|
dataTable.setTransferHandler(new TransferHandler() {
|
||||||
@@ -224,8 +245,7 @@ public class Datatable extends JPanel {
|
|||||||
if (e.getClickCount() == 2) {
|
if (e.getClickCount() == 2) {
|
||||||
int selectedRow = dataTable.getSelectedRow();
|
int selectedRow = dataTable.getSelectedRow();
|
||||||
if (selectedRow != -1) {
|
if (selectedRow != -1) {
|
||||||
String rowData = dataTable.getValueAt(selectedRow, 1).toString();
|
handleDoubleClick(selectedRow, messagePanel);
|
||||||
messagePanel.applyMessageFilter(tabName, rowData);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user