A free, open-source alternative to Burp Suite: an intercepting proxy and web app security testing suite with Repeater, Intruder, Collaborator and a built-in OWASP ZAP scanner. Linux, AGPL-3.0.
Java application-securityappsecbug-bountyburp-alternativeburp-suitedasthttp-proxyinfosecintercepting-proxyjavaowaspowasp-zappenetration-testingpentestingsecuritysecurity-toolsvulnerability-scannerweb-application-securityweb-security
package opensuite.extensions;
import opensuite.core.Settings;
import opensuite.ui.OptionsPage;
import opensuite.ui.Sections;
import opensuite.ui.Ui;
import javax.swing.*;
import java.awt.*;
/**
* Settings > Extensions > Core extension settings: startup and load behaviour,
* and where the Java, Python and Ruby runtimes for extensions live.
*/
public final class CoreExtensionSettingsPanel extends OptionsPage {
public CoreExtensionSettingsPanel(Settings s) {
JCheckBox reload = bind(s, ExtensionLoader.RELOAD_ON_STARTUP, true, "Automatically reload extensions on startup");
JCheckBox update = bind(s, "ext.updateOnStartup", true, "Automatically update installed extensions on startup");
section("Startup behavior",
Ui.note("Use these settings to control how Open Suite handles extensions on startup."),
reload, update);
JCheckBox hide = bind(s, "ext.hideReloadDialog", true, "Hide dialog on reload");
section("Load behavior",
Ui.note("Use this setting to choose whether the Load extension dialog appears when you reload an extension."),
hide, Sections.gap(0));
// A caption over each path, the field and its button on the line beneath. The page puts 5px between
// every two parts, so the empty gap that closes a section adds the 5px the reference leaves there.
section("Java environment",
Ui.note("Use this setting to configure the environment that should be used to execute extensions that are written in Java."),
captioned("Folder for loading library JAR files (optional):", pathRow(s, ExtensionLoader.JAVA_LIBS, true, 709)), Sections.gap(0));
section("Python environment",
Ui.note("Use these settings to configure the environment that should be used to execute extensions that are written in Python. "
+ "To use Python extensions, you will need to download Jython, which is a Python interpreter implemented in Java."),
captioned("Location of Jython standalone JAR file:", pathRow(s, "ext.jython", false, 363)),
Sections.gap(10),
captioned("Folder for loading modules (optional):", pathRow(s, "ext.pythonModules", true, 363)), Sections.gap(0));
section("Ruby environment",
Ui.note("Use this setting to configure the environment that should be used to execute extensions that are written in Ruby. "
+ "To use Ruby extensions, you will need to download JRuby, which is a Ruby interpreter implemented in Java."),
captioned("Location of JRuby JAR file:", pathRow(s, "ext.jruby", false, 363)), Sections.gap(0));
}
private static JCheckBox bind(Settings s, String key, boolean def, String text) {
JCheckBox c = Ui.check(text, s.getBool(key, def));
c.addItemListener(e -> s.setBool(key, c.isSelected()));
return c;
}
/** A caption directly above its row, as one part of the page. */
private static JPanel captioned(String caption, JComponent row) {
JLabel l = Sections.caption(caption);
l.setAlignmentX(Component.LEFT_ALIGNMENT);
row.setAlignmentX(Component.LEFT_ALIGNMENT);
JPanel p = new JPanel();
p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
p.setOpaque(false);
p.add(l);
p.add(Box.createVerticalStrut(5));
p.add(row);
return p;
}
/** A path field of the given width (at the smallest font) with its chooser button beside it. */
private static JPanel pathRow(Settings s, String key, boolean folder, int width) {
JComponent[] parts = opensuite.ui.settings.SettingsPage.path(s, key, "", folder, folder ? "Select folder ..." : "Select file ...", width);
return opensuite.ui.settings.SettingsPage.line(22, parts[0], 5, parts[1]);
}
}