Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1238e536d1 | ||
|
|
5d23a68c0e | ||
|
|
d7f04526b4 | ||
|
|
acff96ed7b | ||
|
|
350c093162 |
@@ -4,9 +4,13 @@
|
||||
|
||||
架构作者: [@0chencc](https://github.com/0Chencc)
|
||||
|
||||
## 公共规则网站
|
||||
## 公共规则 & 打赏
|
||||
|
||||
https://gh0st.cn/HaE/
|
||||
公共规则下载地址:https://gh0st.cn/HaE/
|
||||
|
||||
如果你觉得HaE好用,可以打赏一下作者,给作者持续更新下去的动力!
|
||||
|
||||

|
||||
|
||||
## 介绍
|
||||
|
||||
|
||||
BIN
images/reward.jpeg
Normal file
BIN
images/reward.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 132 KiB |
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
import javax.swing.event.ChangeEvent;
|
||||
import javax.swing.event.ChangeListener;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @author EvilChen & 0chencc
|
||||
*/
|
||||
|
||||
@@ -32,7 +32,7 @@ public class BurpExtender implements IBurpExtender, IHttpListener, IMessageEdito
|
||||
this.callbacks = callbacks;
|
||||
BurpExtender.helpers = callbacks.getHelpers();
|
||||
|
||||
String version = "2.2.1";
|
||||
String version = "2.2.2";
|
||||
callbacks.setExtensionName(String.format("HaE (%s) - Highlighter and Extractor", version));
|
||||
// 定义输出
|
||||
stdout = new PrintWriter(callbacks.getStdout(), true);
|
||||
@@ -61,7 +61,7 @@ public class BurpExtender implements IBurpExtender, IHttpListener, IMessageEdito
|
||||
return main;
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* 使用processHttpMessage用来做Highlighter
|
||||
*/
|
||||
@Override
|
||||
@@ -149,6 +149,9 @@ public class BurpExtender implements IBurpExtender, IHttpListener, IMessageEdito
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 快捷键复制功能
|
||||
*/
|
||||
@Override
|
||||
public byte[] getSelectedData() {
|
||||
int[] selectRows = jTable.getSelectedRows();
|
||||
@@ -159,7 +162,7 @@ public class BurpExtender implements IBurpExtender, IHttpListener, IMessageEdito
|
||||
return helpers.stringToBytes(selectData.toString());
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* 使用setMessage用来做Extractor
|
||||
*/
|
||||
@Override
|
||||
@@ -172,18 +175,25 @@ public class BurpExtender implements IBurpExtender, IHttpListener, IMessageEdito
|
||||
makeTable(extractResponseMap);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建MarkInfo表单
|
||||
*/
|
||||
public void makeTable(Map<String, String> dataMap) {
|
||||
this.jTabbedPane.removeAll();
|
||||
dataMap.keySet().forEach(i->{
|
||||
String[] extractData = dataMap.get(i).split("\n");
|
||||
Object[][] data = new Object[extractData.length][1];
|
||||
for (int x = 0; x < extractData.length; x++) {
|
||||
data[x][0] = extractData[x];
|
||||
}
|
||||
this.jTabbedPane.addTab(i, new JScrollPane(new JTable(data, new Object[] {"Information"})));
|
||||
int indexOfTab = this.jTabbedPane.indexOfTab(i);
|
||||
JScrollPane jScrollPane = new JScrollPane(new JTable(data, new Object[] {"Information"}));
|
||||
this.jTabbedPane.addTab(i, jScrollPane);
|
||||
// 使用removeAll会导致UI出现空白的情况,为了改善用户侧体验,采用remove的方式进行删除
|
||||
if (indexOfTab != -1) {
|
||||
this.jTabbedPane.remove(indexOfTab);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package burp;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @author EvilChen
|
||||
*/
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import burp.Config;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @author EvilChen
|
||||
*/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import dk.brics.automaton.RunAutomaton;
|
||||
import jregex.Matcher;
|
||||
import jregex.Pattern;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @author EvilChen
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@ import burp.Config;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @author EvilChen
|
||||
*/
|
||||
|
||||
public class GetColorKey {
|
||||
/*
|
||||
/**
|
||||
* 颜色下标获取
|
||||
*/
|
||||
public List<Integer> getColorKeys(List<String> keys){
|
||||
|
||||
@@ -5,7 +5,7 @@ import jregex.Pattern;
|
||||
import jregex.REFlags;
|
||||
import burp.yaml.LoadConfig;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @author EvilChen
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@ import burp.Config;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @author EvilChen
|
||||
*/
|
||||
|
||||
public class UpgradeColor {
|
||||
private String endColor = "";
|
||||
/*
|
||||
/**
|
||||
* 颜色升级递归算法
|
||||
*/
|
||||
private void colorUpgrade(List<Integer> colorList) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.awt.*;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseListener;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @author 6dc
|
||||
*
|
||||
* A class which creates a JTabbedPane and auto sets a close button when you add a tab
|
||||
@@ -18,7 +18,7 @@ public class JTabbedPaneCloseButton extends JTabbedPane {
|
||||
super();
|
||||
}
|
||||
|
||||
/* Override Addtab in order to add the close Button everytime */
|
||||
/** Override Addtab in order to add the close Button everytime */
|
||||
@Override
|
||||
public void addTab(String title, Icon icon, Component component, String tip) {
|
||||
super.addTab(title, icon, component, tip);
|
||||
@@ -45,7 +45,7 @@ public class JTabbedPaneCloseButton extends JTabbedPane {
|
||||
}
|
||||
}
|
||||
|
||||
/* addTabNoExit */
|
||||
/** addTabNoExit */
|
||||
public void addTabNoExit(String title, Icon icon, Component component, String tip) {
|
||||
super.addTab(title, icon, component, tip);
|
||||
}
|
||||
@@ -58,7 +58,7 @@ public class JTabbedPaneCloseButton extends JTabbedPane {
|
||||
addTabNoExit(title, null, component);
|
||||
}
|
||||
|
||||
/* Button */
|
||||
/** Button */
|
||||
public class CloseButtonTab extends JPanel {
|
||||
|
||||
public CloseButtonTab(final Component tab, String title, Icon icon) {
|
||||
@@ -74,7 +74,7 @@ public class JTabbedPaneCloseButton extends JTabbedPane {
|
||||
add(button);
|
||||
}
|
||||
}
|
||||
/* ClickListener */
|
||||
/** ClickListener */
|
||||
public class CloseListener implements MouseListener
|
||||
{
|
||||
private final Component tab;
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @author LinChen
|
||||
*/
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.util.Vector;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @author LinChen
|
||||
*/
|
||||
|
||||
@@ -20,9 +20,10 @@ public class RulePane extends JPanel {
|
||||
public RulePane(Object[][] data, JTabbedPane pane) {
|
||||
initComponents(data, pane);
|
||||
}
|
||||
private SetConfig setruleconfig = new SetConfig();
|
||||
private SetConfig setConfig = new SetConfig();
|
||||
private Boolean isEdit = false;
|
||||
private void RuleAddMouseClicked(MouseEvent e, JTabbedPane pane) {
|
||||
|
||||
private void ruleAddMouseClicked(MouseEvent e, JTabbedPane pane) {
|
||||
RuleSetting add = new RuleSetting();
|
||||
int isOk = JOptionPane.showConfirmDialog(null, add, "RuleSetting - Add Rule", JOptionPane.OK_OPTION);
|
||||
if(isOk == 0){
|
||||
@@ -34,60 +35,60 @@ public class RulePane extends JPanel {
|
||||
data.add(add.ScopeSelect.getSelectedItem().toString());
|
||||
data.add(add.EngineSelect.getSelectedItem().toString());
|
||||
model.insertRow(model.getRowCount(), data);
|
||||
model = (DefaultTableModel) table.getModel();
|
||||
setruleconfig.add(data,pane.getTitleAt(pane.getSelectedIndex()));
|
||||
model = (DefaultTableModel) jTable.getModel();
|
||||
setConfig.add(data, pane.getTitleAt(pane.getSelectedIndex()));
|
||||
}
|
||||
}
|
||||
|
||||
private void RuleEditMouseClicked(MouseEvent e,JTabbedPane pane){
|
||||
if (table.getSelectedRowCount()>=1){
|
||||
private void ruleEditMouseClicked(MouseEvent e, JTabbedPane pane){
|
||||
if (jTable.getSelectedRowCount() >= 1){
|
||||
RuleSetting edit = new RuleSetting();
|
||||
edit.Name.setText(table.getValueAt(table.getSelectedRow(),1).toString());
|
||||
edit.Regex.setText(table.getValueAt(table.getSelectedRow(),2).toString());
|
||||
edit.ColorSelect.setSelectedItem(table.getValueAt(table.getSelectedRow(),3).toString());
|
||||
edit.ScopeSelect.setSelectedItem(table.getValueAt(table.getSelectedRow(),4).toString());
|
||||
edit.EngineSelect.setSelectedItem(table.getValueAt(table.getSelectedRow(),5).toString());
|
||||
edit.Name.setText(jTable.getValueAt(jTable.getSelectedRow(), 1).toString());
|
||||
edit.Regex.setText(jTable.getValueAt(jTable.getSelectedRow(), 2).toString());
|
||||
edit.ColorSelect.setSelectedItem(jTable.getValueAt(jTable.getSelectedRow(), 3).toString());
|
||||
edit.ScopeSelect.setSelectedItem(jTable.getValueAt(jTable.getSelectedRow(), 4).toString());
|
||||
edit.EngineSelect.setSelectedItem(jTable.getValueAt(jTable.getSelectedRow(), 5).toString());
|
||||
int isOk = JOptionPane.showConfirmDialog(null, edit, "RuleSetting - Edit Rule", JOptionPane.OK_OPTION);
|
||||
if (isOk == 0){
|
||||
int select = table.convertRowIndexToModel(table.getSelectedRow());
|
||||
int select = jTable.convertRowIndexToModel(jTable.getSelectedRow());
|
||||
model.setValueAt(edit.Name.getText(), select, 1);
|
||||
model.setValueAt(edit.Regex.getText(), select, 2);
|
||||
model.setValueAt(edit.ColorSelect.getSelectedItem().toString(), select, 3);
|
||||
model.setValueAt(edit.ScopeSelect.getSelectedItem().toString(), select, 4);
|
||||
model.setValueAt(edit.EngineSelect.getSelectedItem().toString(), select, 5);
|
||||
model = (DefaultTableModel) table.getModel();
|
||||
setruleconfig.edit((Vector) model.getDataVector().get(select),select,pane.getTitleAt(pane.getSelectedIndex()));
|
||||
model = (DefaultTableModel) jTable.getModel();
|
||||
setConfig.edit((Vector) model.getDataVector().get(select), select, pane.getTitleAt(pane.getSelectedIndex()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void RuleRemoveMouseClicked(MouseEvent e,JTabbedPane pane){
|
||||
if (table.getSelectedRowCount()>=1){
|
||||
private void ruleRemoveMouseClicked(MouseEvent e, JTabbedPane pane){
|
||||
if (jTable.getSelectedRowCount() >= 1){
|
||||
int isOk = JOptionPane.showConfirmDialog(null, "Are your sure?", "RuleSetting - Delete Rule", JOptionPane.OK_OPTION);
|
||||
if (isOk == 0){
|
||||
int select = table.convertRowIndexToModel(table.getSelectedRow());
|
||||
int select = jTable.convertRowIndexToModel(jTable.getSelectedRow());
|
||||
model.removeRow(select);
|
||||
model = (DefaultTableModel) table.getModel();
|
||||
setruleconfig.remove(select,pane.getTitleAt(pane.getSelectedIndex()));
|
||||
model = (DefaultTableModel) jTable.getModel();
|
||||
setConfig.remove(select, pane.getTitleAt(pane.getSelectedIndex()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void RuleTableChange(TableModelEvent e,JTabbedPane pane) {
|
||||
if (e.getColumn()==0&&table.getSelectedRow()!=-1&&!isEdit){
|
||||
model = (DefaultTableModel) table.getModel();
|
||||
int select = table.convertRowIndexToModel(table.getSelectedRow());
|
||||
setruleconfig.edit((Vector) model.getDataVector().get(select),select,pane.getTitleAt(pane.getSelectedIndex()));
|
||||
private void ruleTableChange(TableModelEvent e, JTabbedPane pane) {
|
||||
if (e.getColumn() == 0 && jTable.getSelectedRow() != -1 && !isEdit){
|
||||
model = (DefaultTableModel) jTable.getModel();
|
||||
int select = jTable.convertRowIndexToModel(jTable.getSelectedRow());
|
||||
setConfig.edit((Vector) model.getDataVector().get(select), select, pane.getTitleAt(pane.getSelectedIndex()));
|
||||
}
|
||||
}
|
||||
|
||||
private void initComponents(Object[][] data, JTabbedPane pane) {
|
||||
// JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents
|
||||
RuleAdd = new JButton();
|
||||
RuleEdit = new JButton();
|
||||
addButton = new JButton();
|
||||
editButton = new JButton();
|
||||
scrollPane = new JScrollPane();
|
||||
table = new JTable();
|
||||
Remove = new JButton();
|
||||
jTable = new JTable();
|
||||
removeButton = new JButton();
|
||||
|
||||
//======== this ========
|
||||
setLayout(new GridBagLayout());
|
||||
@@ -96,84 +97,91 @@ public class RulePane extends JPanel {
|
||||
((GridBagLayout)getLayout()).columnWeights = new double[] {0.0, 1.0, 1.0E-4};
|
||||
((GridBagLayout)getLayout()).rowWeights = new double[] {0.0, 0.0, 0.0, 1.0, 1.0E-4};
|
||||
|
||||
//---- RuleAdd ----
|
||||
RuleAdd.setText("Add");
|
||||
RuleAdd.addMouseListener(new MouseAdapter() {
|
||||
//---- addButton ----
|
||||
addButton.setText("Add");
|
||||
|
||||
addButton.addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
isEdit = true;
|
||||
RuleAddMouseClicked(e,pane);
|
||||
model = (DefaultTableModel) table.getModel();
|
||||
ruleAddMouseClicked(e, pane);
|
||||
model = (DefaultTableModel) jTable.getModel();
|
||||
isEdit = false;
|
||||
}
|
||||
});
|
||||
add(RuleAdd, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,
|
||||
|
||||
add(addButton, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,
|
||||
GridBagConstraints.CENTER, GridBagConstraints.BOTH,
|
||||
new Insets(15, 5, 3, 2), 0, 0));
|
||||
|
||||
//---- RuleEdit ----
|
||||
RuleEdit.setText("Edit");
|
||||
RuleEdit.addMouseListener(new MouseAdapter() {
|
||||
//---- editButton ----
|
||||
editButton.setText("Edit");
|
||||
editButton.addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
isEdit = true;
|
||||
RuleEditMouseClicked(e,pane);
|
||||
model = (DefaultTableModel) table.getModel();
|
||||
ruleEditMouseClicked(e, pane);
|
||||
model = (DefaultTableModel) jTable.getModel();
|
||||
isEdit = false;
|
||||
}
|
||||
});
|
||||
add(RuleEdit, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
|
||||
|
||||
add(editButton, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
|
||||
GridBagConstraints.CENTER, GridBagConstraints.BOTH,
|
||||
new Insets(0, 5, 3, 2), 0, 0));
|
||||
|
||||
//======== scrollPane ========
|
||||
{
|
||||
|
||||
//---- table ----
|
||||
table.setShowVerticalLines(false);
|
||||
table.setVerifyInputWhenFocusTarget(false);
|
||||
table.setUpdateSelectionOnSort(false);
|
||||
table.setShowHorizontalLines(false);
|
||||
table.setModel(new DefaultTableModel());
|
||||
table.setSurrendersFocusOnKeystroke(true);
|
||||
scrollPane.setViewportView(table);
|
||||
jTable.setShowVerticalLines(false);
|
||||
jTable.setVerifyInputWhenFocusTarget(false);
|
||||
jTable.setUpdateSelectionOnSort(false);
|
||||
jTable.setShowHorizontalLines(false);
|
||||
jTable.setModel(new DefaultTableModel());
|
||||
jTable.setSurrendersFocusOnKeystroke(true);
|
||||
scrollPane.setViewportView(jTable);
|
||||
}
|
||||
|
||||
add(scrollPane, new GridBagConstraints(1, 0, 1, 4, 0.0, 0.0,
|
||||
GridBagConstraints.CENTER, GridBagConstraints.BOTH,
|
||||
new Insets(15, 5, 5, 5), 0, 0));
|
||||
|
||||
//---- Remove ----
|
||||
Remove.setText("Remove");
|
||||
Remove.addMouseListener(new MouseAdapter() {
|
||||
//---- removeButton ----
|
||||
removeButton.setText("Remove");
|
||||
|
||||
removeButton.addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
isEdit = true;
|
||||
RuleRemoveMouseClicked(e,pane);
|
||||
model = (DefaultTableModel) table.getModel();
|
||||
ruleRemoveMouseClicked(e, pane);
|
||||
model = (DefaultTableModel) jTable.getModel();
|
||||
isEdit = false;
|
||||
}
|
||||
});
|
||||
add(Remove, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0,
|
||||
|
||||
add(removeButton, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0,
|
||||
GridBagConstraints.CENTER, GridBagConstraints.BOTH,
|
||||
new Insets(0, 5, 3, 2), 0, 0));
|
||||
|
||||
// JFormDesigner - End of component initialization //GEN-END:initComponents
|
||||
table.setModel(model);
|
||||
jTable.setModel(model);
|
||||
model.setDataVector(data, title);
|
||||
model.addTableModelListener(new TableModelListener() {
|
||||
@Override
|
||||
public void tableChanged(TableModelEvent e) {
|
||||
RuleTableChange(e,pane);
|
||||
ruleTableChange(e, pane);
|
||||
}
|
||||
});
|
||||
table.setRowSorter(new TableRowSorter(model));
|
||||
|
||||
jTable.setRowSorter(new TableRowSorter(model));
|
||||
}
|
||||
|
||||
// JFormDesigner - Variables declaration - DO NOT MODIFY //GEN-BEGIN:variables
|
||||
public JButton RuleAdd;
|
||||
public JButton RuleEdit;
|
||||
public JButton addButton;
|
||||
public JButton editButton;
|
||||
public JScrollPane scrollPane;
|
||||
public JTable table;
|
||||
public JButton Remove;
|
||||
public JTable jTable;
|
||||
public JButton removeButton;
|
||||
// JFormDesigner - End of variables declaration //GEN-END:variables
|
||||
private final String[] title = new String[]{"Loaded", "Name", "Regex", "Color", "Scope", "Engine"};
|
||||
private DefaultTableModel model = new DefaultTableModel() {
|
||||
@@ -188,11 +196,7 @@ public class RulePane extends JPanel {
|
||||
|
||||
@Override
|
||||
public boolean isCellEditable(int row, int column){
|
||||
if (column ==0){
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
return column == 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import burp.Config;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @author LinChen
|
||||
*/
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package burp.yaml.template;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @author LinChen
|
||||
*/
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import burp.yaml.template.Rule;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
/**
|
||||
* @author LinChen
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user