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.ui.settings;
import opensuite.core.Settings;
import opensuite.core.SuiteContext;
import opensuite.ui.OptionsPage;
import opensuite.ui.Ui;
import javax.swing.*;
import java.awt.Dimension;
/** Settings > Tools pages that no tool owns: Comparer, and the browser's data / running / logging blocks. */
public final class ToolPages {
private ToolPages() {}
public static final String COMPARER_SYNC = "comparer.syncViews";
public static SettingsPage comparer(SuiteContext ctx) {
Settings s = ctx.settings();
SettingsPage p = new SettingsPage();
p.block("Sync Comparer results view", SettingsPage.Kind.USER,
"Use this setting to control whether the two panes of a new Comparer results window scroll together.",
() -> s.setBool(COMPARER_SYNC, false),
SettingsPage.check(s, COMPARER_SYNC, false, "Sync views in new Comparer results windows"));
return p;
}
public static SettingsPage browser(SuiteContext ctx, JComponent existing) {
Settings s = ctx.settings();
SettingsPage p = new SettingsPage();
String def = opensuite.proxy.BrowserFlags.defaultDataFolder(), logDef = opensuite.proxy.BrowserFlags.defaultLogFolder();
JComponent[] data = SettingsPage.path(s, "browser.dataFolder", def, true, "Select folder ...", 364);
JComponent[] log = SettingsPage.path(s, "browser.logFolder", logDef, true, "Select folder ...", 364);
for (JComponent[] row : new JComponent[][]{data, log}) Ui.sized(row[1], 124);
JButton clear = clearButton(s);
Ui.sized(clear, 87);
p.block("Browser data", SettingsPage.Kind.USER,
"Use this setting to control the storage of settings and history for Open Suite's browser. If you deselect this setting, you stop "
+ "storing browser data, but any past data is retained.",
() -> { s.setBool("browser.storeData", true); s.set("browser.dataFolder", def); ((JTextField) data[0]).setText(def); },
SettingsPage.check(s, "browser.storeData", true, "Store browser data"),
opensuite.ui.Sections.gap(5),
opensuite.ui.Sections.caption("Browser data folder (we recommend using a dedicated folder)"),
SettingsPage.line(22, data[0], 5, data[1]),
opensuite.ui.Sections.gap(15),
opensuite.ui.Sections.text("Remove all files from the specified folder, including files that weren't created by Open Suite."),
opensuite.ui.Sections.gap(5),
clear);
JLabel note = opensuite.ui.Sections.caption("Note: Scanning hostile websites without the sandbox increases the risk of your local system being compromised");
p.block("Browser running", SettingsPage.Kind.PROJECT,
"Use these settings to control whether Open Suite's browser can run without a sandbox or attempt to use the GPU.",
() -> { s.setBool("browser.noSandbox", false); s.setBool("browser.gpu", true); },
SettingsPage.check(s, "browser.noSandbox", false, "Allow Open Suite's browser to run without a sandbox"),
OptionsPage.indent(note, 17),
opensuite.ui.Sections.gap(5),
SettingsPage.check(s, "browser.gpu", true, "Use the GPU"));
p.block("Browser logging", SettingsPage.Kind.PROJECT,
"If this setting is selected then communication with Open Suite's browser is logged to the specified folder. A new pair of log "
+ "files is started each time the browser is launched.",
() -> { s.setBool("browser.log", false); s.set("browser.logFolder", logDef); ((JTextField) log[0]).setText(logDef); },
SettingsPage.check(s, "browser.log", false, "Log browser communication"),
opensuite.ui.Sections.gap(5),
opensuite.ui.Sections.caption("Log folder"),
SettingsPage.line(22, log[0], 5, log[1]));
// Open Suite's own browser settings follow the reference's.
if (existing != null) p.addSection(existing);
return p;
}
private static JButton clearButton(Settings s) {
JButton b = Ui.button("Clear all", "delete the browser data folder's contents");
b.addActionListener(e -> {
java.io.File dir = new java.io.File(s.get("browser.dataFolder", System.getProperty("user.home") + "/.opensuite/browser"));
if (!dir.isDirectory()) { JOptionPane.showMessageDialog(b, "The browser data folder does not exist.", "Clear all", JOptionPane.INFORMATION_MESSAGE); return; }
if (JOptionPane.showConfirmDialog(b, "Delete all contents of " + dir + "?", "Clear all", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE) != JOptionPane.OK_OPTION) return;
try (var walk = java.nio.file.Files.walk(dir.toPath())) {
walk.sorted(java.util.Comparator.reverseOrder()).filter(pth -> !pth.equals(dir.toPath())).forEach(pth -> pth.toFile().delete());
} catch (java.io.IOException ex) { JOptionPane.showMessageDialog(b, "Could not clear: " + ex.getMessage()); }
});
return b;
}
}