Skip to content

Commit

Permalink
Version: 2.4.2 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonymousUser committed Jul 15, 2022
1 parent 5097124 commit 225ee47
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 41 deletions.
6 changes: 3 additions & 3 deletions src/main/java/burp/BurpExtender.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ public void registerExtenderCallbacks(final IBurpExtenderCallbacks callbacks)
this.callbacks = callbacks;
BurpExtender.helpers = callbacks.getHelpers();

String version = "2.4.1";
String version = "2.4.2";
callbacks.setExtensionName(String.format("HaE (%s) - Highlighter and Extractor", version));
// 定义输出
stdout = new PrintWriter(callbacks.getStdout(), true);
stdout.println("@Core Author: EvilChen");
stdout.println("@Architecture Author: 0chencc");
stdout.println("@First Author: EvilChen");
stdout.println("@Second Author: 0chencc");
stdout.println("@Github: https://github.com/gh0stkey/HaE");
// UI
SwingUtilities.invokeLater(this::initialize);
Expand Down
1 change: 0 additions & 1 deletion src/main/java/burp/ui/JTabbedPaneCloseButton.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public void addTabNoExit(String title, Component component) {

/** Button */
public class CloseButtonTab extends JPanel {

public CloseButtonTab(final Component tab, String title, Icon icon) {
setOpaque(false);
FlowLayout flowLayout = new FlowLayout(FlowLayout.CENTER, 3, 3);
Expand Down
30 changes: 8 additions & 22 deletions src/main/java/burp/ui/MainUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void closeTabActionPerformed(ActionEvent e){
}
}

private void onlineUpdateMouseClicked(MouseEvent e) {
private void onlineUpdateActionPerformed(ActionEvent e) {
String url = "https://raw.githubusercontent.com/gh0stkey/HaE/gh-pages/Config.yml";
OkHttpClient httpClient = new OkHttpClient();
Request httpRequest = new Request.Builder().url(url).get().build();
Expand All @@ -62,6 +62,7 @@ private void onlineUpdateMouseClicked(MouseEvent e) {
}

new LoadConfig();
reloadRule();
}

private void reloadRule(){
Expand All @@ -78,11 +79,11 @@ private void reloadRule(){
ruleSwitch.setListen(true);
}

private void reloadMouseClicked(MouseEvent e) {
private void reloadActionPerformed(ActionEvent e) {
reloadRule();
}

private void excludeSuffixSaveMouseClicked(MouseEvent e) {
private void excludeSuffixSaveActionPerformed(ActionEvent e) {
LoadConfig loadCon = new LoadConfig();
loadCon.setExcludeSuffix(excludeSuffixTextField.getText());
}
Expand Down Expand Up @@ -125,23 +126,13 @@ private void initComponents() {
new Insets(5, 5, 5, 5), 0, 0));

onlineUpdateButton.setText("Online Update");
onlineUpdateButton.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
onlineUpdateMouseClicked(e);
}
});
onlineUpdateButton.addActionListener(this::onlineUpdateActionPerformed);
rulePanel.add(onlineUpdateButton, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0,
GridBagConstraints.CENTER, GridBagConstraints.BOTH,
new Insets(5, 0, 5, 5), 0, 0));

reloadButton.setText("Reload");
reloadButton.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
reloadMouseClicked(e);
}
});
reloadButton.addActionListener(this::reloadActionPerformed);
rulePanel.add(reloadButton, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0,

GridBagConstraints.CENTER, GridBagConstraints.BOTH,
Expand All @@ -156,12 +147,7 @@ public void mouseClicked(MouseEvent e) {
new Insets(0, 0, 0, 5), 0, 0));

excludeSuffixSaveButton.setText("Save");
excludeSuffixSaveButton.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
excludeSuffixSaveMouseClicked(e);
}
});
excludeSuffixSaveButton.addActionListener(this::excludeSuffixSaveActionPerformed);
rulePanel.add(excludeSuffixSaveButton, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0,
GridBagConstraints.SOUTH, GridBagConstraints.HORIZONTAL,
new Insets(0, 0, 0, 5), 0, 0));
Expand All @@ -183,7 +169,7 @@ public void mouseClicked(MouseEvent e) {
ruleSwitch = new TabTitleEditListener(ruleTabbedPane);
ruleTabbedPane.addChangeListener(ruleSwitch);
ruleTabbedPane.addMouseListener(ruleSwitch);
closeTabMenuItem.addActionListener(e -> closeTabActionPerformed(e));
closeTabMenuItem.addActionListener(this::closeTabActionPerformed);
tabMenu.add(closeTabMenuItem);
}

Expand Down
29 changes: 14 additions & 15 deletions src/main/java/burp/ui/RulePane.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

import burp.yaml.SetConfig;

import java.awt.event.ComponentListener;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableRowSorter;
import java.awt.*;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.Vector;

/**
Expand All @@ -24,7 +23,7 @@ public RulePane(Object[][] data, JTabbedPane pane) {
private SetConfig setConfig = new SetConfig();
private Boolean isEdit = false;

private void ruleAddMouseClicked(MouseEvent e, JTabbedPane pane) {
private void ruleAddActionPerformed(ActionEvent e, JTabbedPane pane) {
RuleSetting ruleSettingPanel = new RuleSetting();
int showState = JOptionPane.showConfirmDialog(null, ruleSettingPanel, "RuleSetting - Add Rule", JOptionPane.OK_OPTION);
if(showState == 0){
Expand All @@ -42,7 +41,7 @@ private void ruleAddMouseClicked(MouseEvent e, JTabbedPane pane) {
}
}

private void ruleEditMouseClicked(MouseEvent e, JTabbedPane pane){
private void ruleEditActionPerformed(ActionEvent e, JTabbedPane pane){
if (ruleTable.getSelectedRowCount() >= 1){
RuleSetting ruleSettingPanel = new RuleSetting();
ruleSettingPanel.ruleNameTextField.setText(ruleTable.getValueAt(ruleTable.getSelectedRow(), 1).toString());
Expand Down Expand Up @@ -71,7 +70,7 @@ private void ruleEditMouseClicked(MouseEvent e, JTabbedPane pane){
}
}

private void ruleRemoveMouseClicked(MouseEvent e, JTabbedPane pane){
private void ruleRemoveActionPerformed(ActionEvent e, JTabbedPane pane){
if (ruleTable.getSelectedRowCount() >= 1){
int isOk = JOptionPane.showConfirmDialog(null, "Are your sure?", "RuleSetting - Delete Rule", JOptionPane.OK_OPTION);
if (isOk == 0){
Expand Down Expand Up @@ -109,11 +108,11 @@ private void initComponents(Object[][] data, JTabbedPane pane) {
//---- addButton ----
addButton.setText("Add");

addButton.addMouseListener(new MouseAdapter() {
addButton.addActionListener(new ActionListener() {
@Override
public void mouseClicked(MouseEvent e) {
public void actionPerformed(ActionEvent e) {
isEdit = true;
ruleAddMouseClicked(e, pane);
ruleAddActionPerformed(e, pane);
model = (DefaultTableModel) ruleTable.getModel();
isEdit = false;
}
Expand All @@ -125,11 +124,11 @@ public void mouseClicked(MouseEvent e) {

//---- editButton ----
editButton.setText("Edit");
editButton.addMouseListener(new MouseAdapter() {
editButton.addActionListener(new ActionListener() {
@Override
public void mouseClicked(MouseEvent e) {
public void actionPerformed(ActionEvent e) {
isEdit = true;
ruleEditMouseClicked(e, pane);
ruleEditActionPerformed(e, pane);
model = (DefaultTableModel) ruleTable.getModel();
isEdit = false;
}
Expand Down Expand Up @@ -158,11 +157,11 @@ public void mouseClicked(MouseEvent e) {
//---- removeButton ----
removeButton.setText("Remove");

removeButton.addMouseListener(new MouseAdapter() {
removeButton.addActionListener(new ActionListener() {
@Override
public void mouseClicked(MouseEvent e) {
public void actionPerformed(ActionEvent e) {
isEdit = true;
ruleRemoveMouseClicked(e, pane);
ruleRemoveActionPerformed(e, pane);
model = (DefaultTableModel) ruleTable.getModel();
isEdit = false;
}
Expand Down

0 comments on commit 225ee47

Please sign in to comment.