Skip to content

Commit bb55cb1

Browse files
authored
Merge pull request #83 from CompassSecurity/tobiashort/ui-improvements
Tobiashort/UI improvements
2 parents a481a6c + 2c26b1b commit bb55cb1

File tree

10 files changed

+471
-850
lines changed

10 files changed

+471
-850
lines changed

BappManifest.bmf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ Uuid: c61cfa893bb14db4b01775554f7b802e
22
ExtensionType: 1
33
Name: SAML Raider
44
RepoName: saml-raider
5-
ScreenVersion: 2.0.4
6-
SerialVersion: 17
5+
ScreenVersion: 2.1.0
6+
SerialVersion: 18
77
MinPlatformVersion: 0
88
ProOnly: False
99
Author: Roland Bischofberger / Emanuel Duss / Tobias Hort-Giess
1010
ShortDescription: Provides a SAML message editor and a certificate management tool to help with testing SAML infrastructures.
11-
EntryPoint: build/libs/saml-raider-2.0.4.jar
11+
EntryPoint: build/libs/saml-raider-2.1.0.jar
1212
BuildCommand: ./gradlew jar
1313
SupportedProducts: Pro, Community

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Don't forget to rate our extension with as many stars you like :smile:.
7979
### Manual Installation
8080

8181
First, download the latest SAML Raider version:
82-
[saml-raider-2.0.4.jar](https://github.com/SAMLRaider/SAMLRaider/releases/download/v2.0.4/saml-raider-2.0.4.jar).
82+
[saml-raider-2.1.0.jar](https://github.com/SAMLRaider/SAMLRaider/releases/download/v2.1.0/saml-raider-2.1.0.jar).
8383
Then, start Burp Suite and click in the `Extensions` tab on `Add`. Choose the
8484
SAML Raider JAR file to install it and you are ready to go.
8585

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id "java-library"
33
}
44

5-
version = "2.0.4"
5+
version = "2.1.0"
66

77
repositories {
88
mavenCentral()

src/main/java/application/SamlTabController.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,7 @@ public void removeSignature() {
337337
}
338338

339339
public void resetMessage() {
340-
if (isRawMode) {
341-
samlMessage = orgSAMLMessage;
342-
}
340+
samlMessage = orgSAMLMessage;
343341
textArea.setContents(ByteArray.byteArray(samlMessage));
344342
isEdited = false;
345343
}
@@ -428,15 +426,15 @@ public void resignMessage() {
428426
}
429427

430428
private void setInfoMessageText(String infoMessage) {
431-
samlGUI.getActionPanel().getInfoMessageLabel().setText(infoMessage);
429+
samlGUI.getActionPanel().getStatusMessageLabel().setText(infoMessage);
432430
}
433431

434432
public String getInfoMessageText() {
435-
return samlGUI.getActionPanel().getInfoMessageLabel().getText();
433+
return samlGUI.getActionPanel().getStatusMessageLabel().getText();
436434
}
437435

438436
private void resetInfoMessageText() {
439-
samlGUI.getActionPanel().getInfoMessageLabel().setText("");
437+
samlGUI.getActionPanel().getStatusMessageLabel().setText("");
440438
}
441439

442440
private void updateCertificateList() {
@@ -594,12 +592,14 @@ public void setGUIEditable(boolean editable) {
594592
}
595593

596594
public void showSignatureHelp() {
597-
SignatureHelpWindow window = new SignatureHelpWindow();
595+
var window = new SignatureHelpWindow();
596+
window.setLocationRelativeTo(BurpExtender.api.userInterface().swingUtils().suiteFrame());
598597
window.setVisible(true);
599598
}
600599

601600
public void showXSWHelp() {
602601
XSWHelpWindow window = new XSWHelpWindow();
602+
window.setLocationRelativeTo(BurpExtender.api.userInterface().swingUtils().suiteFrame());
603603
window.setVisible(true);
604604
}
605605

src/main/java/gui/ImagePanel.java

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/main/java/gui/SamlMain.java

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
import burp.BurpExtender;
55
import burp.api.montoya.core.ByteArray;
66
import burp.api.montoya.ui.editor.RawEditor;
7-
import java.awt.BorderLayout;
8-
import javax.swing.JPanel;
9-
import javax.swing.JSplitPane;
10-
import javax.swing.JTabbedPane;
7+
8+
import javax.swing.*;
9+
import javax.swing.border.EmptyBorder;
10+
import java.awt.*;
1111

1212
import static java.util.Objects.requireNonNull;
1313

@@ -26,52 +26,62 @@ public SamlMain(SamlTabController controller) {
2626
}
2727

2828
private void initializeUI() {
29-
setLayout(new BorderLayout(0, 0));
30-
31-
JSplitPane splitPaneAction = new JSplitPane();
32-
splitPaneAction.setOrientation(JSplitPane.VERTICAL_SPLIT);
33-
splitPaneAction.setDividerSize(5);
34-
add(splitPaneAction, BorderLayout.CENTER);
29+
panelAction = new SamlPanelAction(controller);
3530

3631
JPanel panelActionTop = new JPanel();
37-
splitPaneAction.setLeftComponent(panelActionTop);
38-
panelActionTop.setLayout(new BorderLayout(0, 0));
39-
panelAction = new SamlPanelAction(controller);
32+
panelActionTop.setLayout(new BorderLayout());
33+
panelActionTop.setPreferredSize(new Dimension(0, 460));
4034
panelActionTop.add(panelAction);
4135

42-
JPanel panelActionBottom = new JPanel();
43-
splitPaneAction.setRightComponent(panelActionBottom);
44-
panelActionBottom.setLayout(new BorderLayout(0, 0));
4536
textEditorAction = BurpExtender.api.userInterface().createRawEditor();
4637
textEditorAction.setContents(ByteArray.byteArray("<SAMLRaiderFailureInInitialization></SAMLRaiderFailureInInitialization>"));
4738
textEditorAction.setEditable(false);
39+
40+
JPanel panelActionBottom = new JPanel();
41+
panelActionBottom.setLayout(new BorderLayout());
42+
panelActionBottom.setPreferredSize(new Dimension(0, 100));
4843
panelActionBottom.add(textEditorAction.uiComponent(), BorderLayout.CENTER);
4944

50-
JSplitPane splitPaneInformation = new JSplitPane();
51-
splitPaneInformation.setOrientation(JSplitPane.VERTICAL_SPLIT);
52-
splitPaneAction.setDividerSize(5);
53-
add(splitPaneInformation, BorderLayout.CENTER);
45+
JSplitPane splitPaneAction = new JSplitPane();
46+
splitPaneAction.setOrientation(JSplitPane.VERTICAL_SPLIT);
47+
splitPaneAction.setLeftComponent(panelActionTop);
48+
splitPaneAction.setRightComponent(panelActionBottom);
49+
splitPaneAction.resetToPreferredSizes();
5450

55-
JPanel panelInformationTop = new JPanel();
56-
splitPaneInformation.setLeftComponent((panelInformationTop));
57-
panelInformationTop.setLayout(new BorderLayout(0, 0));
5851
panelInformation = new SamlPanelInfo();
52+
53+
JPanel panelInformationTop = new JPanel();
54+
panelInformationTop.setLayout(new BorderLayout());
55+
panelInformationTop.setPreferredSize(new Dimension(0, 375));
5956
panelInformationTop.add(panelInformation);
6057

61-
JPanel panelInformationBottom = new JPanel();
62-
splitPaneInformation.setRightComponent(panelInformationBottom);
63-
panelInformationBottom.setLayout(new BorderLayout(0, 0));
6458
textEditorInformation = BurpExtender.api.userInterface().createRawEditor();
6559
textEditorInformation.setContents(ByteArray.byteArray(""));
60+
61+
var panelInformationBottomLabel = new JLabel("Parsed & Prettified");
62+
panelInformationBottomLabel.setBorder(new EmptyBorder(5, 5, 5, 5));
63+
64+
JPanel panelInformationBottom = new JPanel();
65+
panelInformationBottom.setLayout(new BorderLayout());
66+
panelInformationBottom.setPreferredSize(new Dimension(0, 100));
67+
panelInformationBottom.add(panelInformationBottomLabel, BorderLayout.NORTH);
6668
panelInformationBottom.add(textEditorInformation.uiComponent(), BorderLayout.CENTER);
6769

70+
JSplitPane splitPaneInformation = new JSplitPane();
71+
splitPaneInformation.setOrientation(JSplitPane.VERTICAL_SPLIT);
72+
splitPaneInformation.setLeftComponent((panelInformationTop));
73+
splitPaneInformation.setRightComponent(panelInformationBottom);
74+
splitPaneInformation.resetToPreferredSizes();
75+
6876
JTabbedPane tabbedPane = new JTabbedPane();
69-
add(tabbedPane);
7077
tabbedPane.addTab("SAML Attacks", null, splitPaneAction, "SAML Attacks");
7178
tabbedPane.addTab("SAML Message Info", null, splitPaneInformation, "SAML Message Info");
7279

73-
this.invalidate();
74-
this.updateUI();
80+
setLayout(new BorderLayout());
81+
add(tabbedPane);
82+
83+
invalidate();
84+
updateUI();
7585
}
7686

7787
public RawEditor getTextEditorAction() {

0 commit comments

Comments
 (0)