Skip to content

Commit

Permalink
Version 0.2
Browse files Browse the repository at this point in the history
Added functionality to copy selected property value to clipboard.
Updated description and usage instructions
  • Loading branch information
Bort-Millipede committed Dec 18, 2016
1 parent 3c57881 commit 34504ef
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 13 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Burp-JVM-Property-Editor
Small Burp Suite Extension that allows users to view, add, modify or remove JVM System Properties (https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html) during runtime. May be helpful for the purpose of viewing preset property values or setting options for other extensions during runtime rather than on the command line. Can be used with both the Free and Professional versions of Burp Suite.
# Burp JVM Property Editor
Small Burp Suite (Free or Professional) Extension to allow the user to view, add, modify, delete or copy the value of JVM System Properties (https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html) during Burp usage. May be helpful to some for the purpose of viewing preset property values or setting options for other extensions during runtime rather than on the command line.

# Usage
1. Load the burp-jvm-property-editor-[VERSION].jar file in the Burp Suite "Extensions" tab.
Expand All @@ -13,10 +13,11 @@ Small Burp Suite Extension that allows users to view, add, modify or remove JVM
1. Double click the cell in the "Property Value" column and type the new value for the property.
2. To commit the changed value to the JVM press enter. To cancel, press esc.
3. If the current installed SecurityManager allows the user to edit the selected property, the property value will be changed. Otherwise an error message will be printed below the "Add Property" button.
5. To remove an existing property:
1. Select the property that will be deleted and press the "Delete Property" button.
2. A confirm prompt will appear: select "Yes" to delete the property and "No" to cancel.
5. To remove an existing property (or properties):
1. Select the property (or properties) that will be deleted and press the "Delete Selected Property" button.
2. A confirm prompt will appear (for each selected property): select "Yes" to delete the property and "No" to cancel.
3. If "Yes" was clicked and the current installed SecurityManager allows the user to remove the selected property, the property value will be changed. Otherwise an error message will be printed below the "Add Property" button.
6. To copy the value of an existing property, select the property from the list and click "Copy Selected Property Value". The value of the property will be copied to the clipboard and a message will be printed below the "Add Property" button confirming this.

# Building
Requires Java Development Kit 7 or higher and Burp Suite jar file (Free or Professional)
Expand Down
32 changes: 24 additions & 8 deletions burp/BurpExtender.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/*
BurpExtender.java
v0.1
v0.2
Small Burp Suite Extension to allow the user to view/add/modify/remove JVM System Properties during runtime. May be helpful to some for the purpose
of viewing preset property values or setting options for other extensions during runtime rather than on the command line. This extension can be used
with both the Free and Professional versions of Burp Suite.
Small Burp Suite (Free or Professional) Extension to allow the user to view/add/modify/delete JVM System Properties during Burp usage. May be helpful to some
for the purpose of viewing preset property values or setting options for other extensions during runtime rather than on the command line.
*/

package burp;
Expand All @@ -15,6 +14,9 @@
import java.util.Arrays;
import java.awt.Component;
import java.awt.GridLayout;
import java.awt.Toolkit;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.StringSelection;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JPanel;
Expand All @@ -35,7 +37,7 @@ public class BurpExtender implements IBurpExtender,ITab {
private DefaultTableModel dtm;
private JLabel statusBar;

private static final String version = "v0.1";
private static final String version = "v0.2";

public void registerExtenderCallbacks(IBurpExtenderCallbacks cb) {
callbacks = cb;
Expand All @@ -44,16 +46,17 @@ public void registerExtenderCallbacks(IBurpExtenderCallbacks cb) {

component = new JPanel();

JPanel buttonPanel = new JPanel(new GridLayout(4,1));
JPanel buttonPanel = new JPanel(new GridLayout(5,1));
JButton refButton = new JButton("Refresh Properties");
JButton delButton = new JButton("Delete Property");
JButton delButton = new JButton("Delete Selected Property");
JButton copyButton = new JButton("Copy Selected Property Value");
JButton addButton = new JButton("Add Property");
statusBar = new JLabel("");
ActionListener buttonAL = new ActionListener() {
public void actionPerformed(ActionEvent ae) {
JButton b = (JButton) ae.getSource();
switch(b.getText()) {
case "Delete Property":
case "Delete Selected Property":
int[] selected = table.getSelectedRows();
for(int i=selected.length-1;i>-1;i--) {
String val = (String) table.getValueAt(selected[i],0);
Expand All @@ -80,6 +83,17 @@ public void actionPerformed(ActionEvent ae) {
}
}
break;
case "Copy Selected Property Value":
if(table.getSelectedRowCount() == 1) {
String val = (String) table.getValueAt(table.getSelectedRow(),0);
if(!val.isEmpty()) {
Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard();
StringSelection ss = new StringSelection((String) table.getValueAt(table.getSelectedRow(),1));
cb.setContents(ss,ss);
statusBar.setText("<html><font color='orange'>Property "+val+" value copied to clipboard.</font></html>");
}
}
break;
case "Add Property":
statusBar.setText("");
int rowIndex = dtm.getRowCount()-1;
Expand Down Expand Up @@ -109,9 +123,11 @@ public void actionPerformed(ActionEvent ae) {
};
refButton.addActionListener(buttonAL);
delButton.addActionListener(buttonAL);
copyButton.addActionListener(buttonAL);
addButton.addActionListener(buttonAL);
buttonPanel.add(refButton);
buttonPanel.add(delButton);
buttonPanel.add(copyButton);
buttonPanel.add(addButton);
buttonPanel.add(statusBar);

Expand Down

0 comments on commit 34504ef

Please sign in to comment.