Skip to content

Commit

Permalink
WebSocket Filter Edited 対応
Browse files Browse the repository at this point in the history
  • Loading branch information
isayan committed Oct 23, 2024
1 parent 286311e commit 16ad8e7
Show file tree
Hide file tree
Showing 22 changed files with 82 additions and 393 deletions.
Binary file modified libs/BurpExtensionCommons-v3.2.1.3-all.jar
Binary file not shown.
Binary file modified release/YaguraExtension-v3.1.jar
Binary file not shown.
1 change: 1 addition & 0 deletions src/main/java/extend/util/external/BouncyUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -3052,6 +3052,7 @@ public static String toTUPLEHASH256_512Sum(String str, String charset, boolean u
return BouncyUtil.toTUPLEHASH256_512Sum(StringUtil.getBytesCharset(str, charset), upperCase);
}


// https://github.com/bcgit/bc-java/tree/main/core/src/test/java/org/bouncycastle/crypto/test
/**
* 証明書 https://gist.github.com/vivekkr12/c74f7ee08593a8c606ed96f4b62a208a
Expand Down
1 change: 0 additions & 1 deletion src/main/java/yagura/view/CertificateTab.form
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@
</AccessibilityProperties>
<Events>
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="chkProvidedServerStateChanged"/>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkProvidedServerActionPerformed"/>
</Events>
</Component>
</SubComponents>
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/yagura/view/CertificateTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,6 @@ public void stateChanged(javax.swing.event.ChangeEvent evt) {
chkProvidedServerStateChanged(evt);
}
});
chkProvidedServer.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chkProvidedServerActionPerformed(evt);
}
});

javax.swing.GroupLayout pnlServerEnableLayout = new javax.swing.GroupLayout(pnlServerEnable);
pnlServerEnable.setLayout(pnlServerEnableLayout);
Expand Down Expand Up @@ -683,10 +678,6 @@ private void btnSelectExecuteActionPerformed(java.awt.event.ActionEvent evt) {//
this.showImportCertificatetDlg();
}//GEN-LAST:event_btnSelectExecuteActionPerformed

private void chkProvidedServerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkProvidedServerActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_chkProvidedServerActionPerformed

private void rdoCustomCAActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rdoCustomCAActionPerformed
// SwingUtil.setContainerEnable(this.pnlCertificateExports, this.rdoCustomCA.isSelected());
this.tableCertificate.setEnabled(this.rdoCustomCA.isSelected());
Expand Down
15 changes: 2 additions & 13 deletions src/main/java/yagura/view/FilterHttpPanel.form
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,8 @@
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
<Component id="chkResRegExp" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="chkResIgnoreCase" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="chkResIgnoreCase" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="chkResRegExp" min="-2" max="-2" attributes="0"/>
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
<Component id="txtResponse" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="lblResponse" alignment="3" min="-2" max="-2" attributes="0"/>
Expand Down Expand Up @@ -321,17 +319,11 @@
<Properties>
<Property name="text" type="java.lang.String" value="Show only parameterized requests"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkShowOnlyParameterizedRequestsActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="chkShowOnlyEditedMessage">
<Properties>
<Property name="text" type="java.lang.String" value="Show only edited message"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkShowOnlyEditedMessageActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
Expand Down Expand Up @@ -382,9 +374,6 @@
<Properties>
<Property name="text" type="java.lang.String" value="5xx [server error]"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkStat5xxActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
Expand Down
32 changes: 2 additions & 30 deletions src/main/java/yagura/view/FilterHttpPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,8 @@ public void stateChanged(javax.swing.event.ChangeEvent evt) {
.addComponent(chkReqIgnoreCase))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(pnlHttpFilterSearchItemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(pnlHttpFilterSearchItemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(chkResRegExp)
.addComponent(chkResIgnoreCase))
.addComponent(chkResIgnoreCase)
.addComponent(chkResRegExp)
.addGroup(pnlHttpFilterSearchItemLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txtResponse, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(lblResponse)))
Expand All @@ -218,19 +217,9 @@ public void stateChanged(javax.swing.event.ChangeEvent evt) {
pnlHttpFilterByRequest.add(chkHideItemsWithoutResponses);

chkShowOnlyParameterizedRequests.setText("Show only parameterized requests");
chkShowOnlyParameterizedRequests.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chkShowOnlyParameterizedRequestsActionPerformed(evt);
}
});
pnlHttpFilterByRequest.add(chkShowOnlyParameterizedRequests);

chkShowOnlyEditedMessage.setText("Show only edited message");
chkShowOnlyEditedMessage.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chkShowOnlyEditedMessageActionPerformed(evt);
}
});
pnlHttpFilterByRequest.add(chkShowOnlyEditedMessage);

pnlHeader.add(pnlHttpFilterByRequest, java.awt.BorderLayout.CENTER);
Expand All @@ -252,11 +241,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
pnlHttpStatus.add(chkStat4xx);

chkStat5xx.setText("5xx [server error]");
chkStat5xx.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chkStat5xxActionPerformed(evt);
}
});
pnlHttpStatus.add(chkStat5xx);

pnlHeader.add(pnlHttpStatus, java.awt.BorderLayout.EAST);
Expand All @@ -274,18 +258,6 @@ private void chkHideStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST
this.chkShowOnly.setEnabled(!this.chkHide.isSelected());
}//GEN-LAST:event_chkHideStateChanged

private void chkShowOnlyParameterizedRequestsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkShowOnlyParameterizedRequestsActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_chkShowOnlyParameterizedRequestsActionPerformed

private void chkShowOnlyEditedMessageActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkShowOnlyEditedMessageActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_chkShowOnlyEditedMessageActionPerformed

private void chkStat5xxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkStat5xxActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_chkStat5xxActionPerformed


// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JCheckBox chkHide;
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/yagura/view/FilterWebSocketPanel.form
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,6,0,0,3,14"/>
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,26,0,0,3,14"/>
</AuxValues>

<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
Expand Down Expand Up @@ -87,6 +87,11 @@
<Property name="text" type="java.lang.String" value="Hide incoming message"/>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="chkShowOnlyEditedMessage">
<Properties>
<Property name="text" type="java.lang.String" value="Show only edited message"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="pnlWebsocketFilterSearchItem">
Expand Down Expand Up @@ -140,7 +145,6 @@
<SubComponents>
<Component class="javax.swing.JCheckBox" name="chkMsgRegExp">
<Properties>
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="RegExp"/>
</Properties>
</Component>
Expand Down
16 changes: 11 additions & 5 deletions src/main/java/yagura/view/FilterWebSocketPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ private void initComponents() {
chkShowOnlyinscopeItem = new javax.swing.JCheckBox();
chkHideOutgoingMessage = new javax.swing.JCheckBox();
chkHideIncomingMessage = new javax.swing.JCheckBox();
chkShowOnlyEditedMessage = new javax.swing.JCheckBox();
pnlWebsocketFilterSearchItem = new javax.swing.JPanel();
chkMsgRegExp = new javax.swing.JCheckBox();
chkMsgIgnoreCase = new javax.swing.JCheckBox();
Expand Down Expand Up @@ -68,12 +69,14 @@ private void initComponents() {
chkHideIncomingMessage.setText("Hide incoming message");
pnlFilterByRequest.add(chkHideIncomingMessage);

chkShowOnlyEditedMessage.setText("Show only edited message");
pnlFilterByRequest.add(chkShowOnlyEditedMessage);

pnlCenter.add(pnlFilterByRequest, java.awt.BorderLayout.NORTH);

pnlWebsocketFilterSearchItem.setBorder(javax.swing.BorderFactory.createTitledBorder("Filter by Search Item"));
pnlWebsocketFilterSearchItem.setMinimumSize(new java.awt.Dimension(663, 400));

chkMsgRegExp.setSelected(true);
chkMsgRegExp.setText("RegExp");

chkMsgIgnoreCase.setText("IgnoreCase");
Expand Down Expand Up @@ -121,6 +124,7 @@ private void initComponents() {
private javax.swing.JCheckBox chkHideOutgoingMessage;
private javax.swing.JCheckBox chkMsgIgnoreCase;
private javax.swing.JCheckBox chkMsgRegExp;
private javax.swing.JCheckBox chkShowOnlyEditedMessage;
private javax.swing.JCheckBox chkShowOnlyinscopeItem;
private javax.swing.JLabel lblMessage;
private javax.swing.JPanel pnlCenter;
Expand All @@ -139,11 +143,11 @@ public Document createDefaultDocument() {
}
};

private FilterAnnotationPanel pnlAnnotation = new FilterAnnotationPanel();
private final FilterAnnotationPanel pnlAnnotation = new FilterAnnotationPanel();

private javax.swing.JPanel pnlBambda = new javax.swing.JPanel();
private javax.swing.JScrollPane scrollBabda = new javax.swing.JScrollPane();
private javax.swing.JEditorPane txtBambda = new javax.swing.JEditorPane();
private final javax.swing.JPanel pnlBambda = new javax.swing.JPanel();
private final javax.swing.JScrollPane scrollBabda = new javax.swing.JScrollPane();
private final javax.swing.JEditorPane txtBambda = new javax.swing.JEditorPane();

private void customizeComponents() {
this.scrollBabda.setViewportView(this.txtBambda);
Expand Down Expand Up @@ -202,6 +206,7 @@ public void setProperty(FilterWebSocketProperty filterProp) {
this.chkShowOnlyinscopeItem.setSelected(filterProp.isShowOnlyScopeItems());
this.chkHideIncomingMessage.setSelected(filterProp.isHideIncomingMessage());
this.chkHideOutgoingMessage.setSelected(filterProp.isHideOutgoingMessage());
this.chkShowOnlyEditedMessage.setSelected(filterProp.isShowOnlyEditedMessage());

this.txtMessage.setText(filterProp.getMessage());
this.chkMsgRegExp.setSelected(filterProp.isMessageRegex());
Expand All @@ -222,6 +227,7 @@ public FilterProperty getProperty() {
filterProp.setShowOnlyScopeItems(this.chkShowOnlyinscopeItem.isSelected());
filterProp.setHideIncomingMessage(this.chkHideIncomingMessage.isSelected());
filterProp.setHideOutgoingMessage(this.chkHideOutgoingMessage.isSelected());
filterProp.setShowOnlyEditedMessage(this.chkShowOnlyEditedMessage.isSelected());

this.pnlAnnotation.getAnnotationProperty(filterProp);

Expand Down
5 changes: 0 additions & 5 deletions src/main/java/yagura/view/JSearchTab.form
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
</Properties>
<Events>
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="chkRegExpStateChanged"/>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkRegExpActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="chkIgnoreCase">
Expand Down Expand Up @@ -299,17 +298,13 @@
<Properties>
<Property name="text" type="java.lang.String" value="in-scope only"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkScopeOnlyActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="chkSmartMatch">
<Properties>
<Property name="text" type="java.lang.String" value="Smart Match"/>
</Properties>
<Events>
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="chkSmartMatchStateChanged"/>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkSmartMatchActionPerformed"/>
</Events>
</Component>
</SubComponents>
Expand Down
27 changes: 0 additions & 27 deletions src/main/java/yagura/view/JSearchTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,6 @@ public void stateChanged(javax.swing.event.ChangeEvent evt) {
chkRegExpStateChanged(evt);
}
});
chkRegExp.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chkRegExpActionPerformed(evt);
}
});

chkIgnoreCase.setText("IgnoreCase");
chkIgnoreCase.addChangeListener(new javax.swing.event.ChangeListener() {
Expand Down Expand Up @@ -230,23 +225,13 @@ public void stateChanged(javax.swing.event.ChangeEvent evt) {
lblProgress.setText("100.0%");

chkScopeOnly.setText("in-scope only");
chkScopeOnly.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chkScopeOnlyActionPerformed(evt);
}
});

chkSmartMatch.setText("Smart Match");
chkSmartMatch.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
chkSmartMatchStateChanged(evt);
}
});
chkSmartMatch.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chkSmartMatchActionPerformed(evt);
}
});

javax.swing.GroupLayout pnlSearchLayout = new javax.swing.GroupLayout(pnlSearch);
pnlSearch.setLayout(pnlSearchLayout);
Expand Down Expand Up @@ -623,18 +608,6 @@ private void chkSmartMatchStateChanged(javax.swing.event.ChangeEvent evt) {//GEN
firePropertyChange(JSearchProperty.JSEARCH_FILTER_PROPERTY, null, this.getProperty());
}//GEN-LAST:event_chkSmartMatchStateChanged

private void chkScopeOnlyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkScopeOnlyActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_chkScopeOnlyActionPerformed

private void chkSmartMatchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkSmartMatchActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_chkSmartMatchActionPerformed

private void chkRegExpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkRegExpActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_chkRegExpActionPerformed


// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btnSearch;
Expand Down
Loading

0 comments on commit 16ad8e7

Please sign in to comment.