Skip to content

Commit

Permalink
upgrade depend library
Browse files Browse the repository at this point in the history
  • Loading branch information
isayan committed Jan 9, 2025
1 parent 0332491 commit 8b13ca6
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 39 deletions.
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ plugins {
id 'java-library'
id 'application'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'org.asciidoctor.jvm.base' version '4.0.3'
id 'org.asciidoctor.jvm.convert' version '4.0.3'
id 'org.asciidoctor.jvm.pdf' version '4.0.3'
id 'org.asciidoctor.jvm.base' version '4.0.4'
id 'org.asciidoctor.jvm.convert' version '4.0.4'
id 'org.asciidoctor.jvm.pdf' version '4.0.4'
}

repositories {
Expand Down Expand Up @@ -103,7 +103,7 @@ dependencies {
// https://mvnrepository.com/artifact/net.portswigger.burp.extensions/montoya-api
implementation 'net.portswigger.burp.extensions:montoya-api:2024.12'
// https://mvnrepository.com/artifact/commons-codec/commons-codec
implementation 'commons-codec:commons-codec:1.17.1'
implementation 'commons-codec:commons-codec:1.17.2'
// https://mvnrepository.com/artifact/com.fifesoft/rsyntaxtextarea
implementation 'com.fifesoft:rsyntaxtextarea:3.3.4'

Expand All @@ -119,8 +119,8 @@ dependencies {

// Use JUnit Jupiter for testing.
// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.9.3'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.5'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.5'

// testImplementation fileTree(dir: 'libs', include: ['*.jar'])

Expand All @@ -132,7 +132,7 @@ dependencies {
// https://mvnrepository.com/artifact/io.github.rburgst/okhttp-digest
testImplementation 'io.github.rburgst:okhttp-digest:3.1.1'
// https://mvnrepository.com/artifact/com.squareup.okhttp3/mockwebserver
testImplementation 'com.squareup.okhttp3:mockwebserver:4.11.0'
testImplementation 'com.squareup.okhttp3:mockwebserver:4.12.0'

// https://mvnrepository.com/artifact/org.mockito/mockito-core
testImplementation 'org.mockito:mockito-core:5.4.0'
Expand Down
Binary file modified libs/BurpExtensionCommons-v3.2.5.0-all.jar
Binary file not shown.
Binary file added release/YaguraExtension-v3.2.jar
Binary file not shown.
6 changes: 4 additions & 2 deletions src/main/java/yagura/model/SendToExtend.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,14 @@ public boolean isEnabled() {
|| (this.contextMenu.invocationType() == null); // Orgnaizerではnull
break;
}
case REQUEST_BODY_TO_FILE:
case REQUEST_BODY_TO_FILE: {
enabled = (this.contextMenu.invocationType() == InvocationType.PROXY_HISTORY)
|| (this.contextMenu.invocationType() == InvocationType.SEARCH_RESULTS)
|| (this.contextMenu.invocationType() == InvocationType.MESSAGE_EDITOR_REQUEST)
|| (this.contextMenu.invocationType() == InvocationType.MESSAGE_VIEWER_REQUEST)
|| (this.contextMenu.invocationType() == null); // Orgnaizerではnull
break;
}
case RESPONSE_BODY_TO_FILE: {
enabled = (this.contextMenu.invocationType() == InvocationType.PROXY_HISTORY)
|| (this.contextMenu.invocationType() == InvocationType.SEARCH_RESULTS)
Expand All @@ -252,7 +253,7 @@ public boolean isEnabled() {
|| (this.contextMenu.invocationType() == null); // Orgnaizerではnull
break;
}
case MESSAGE_INFO_COPY:
case MESSAGE_INFO_COPY: {
enabled = (this.contextMenu.invocationType() == InvocationType.PROXY_HISTORY)
|| (this.contextMenu.invocationType() == InvocationType.SEARCH_RESULTS)
|| (this.contextMenu.invocationType() == InvocationType.MESSAGE_VIEWER_REQUEST)
Expand All @@ -261,6 +262,7 @@ public boolean isEnabled() {
|| (this.contextMenu.invocationType() == InvocationType.MESSAGE_EDITOR_RESPONSE)
|| (this.contextMenu.invocationType() == null); // Orgnaizerではnull
break;
}
case ADD_HOST_TO_INCLUDE_SCOPE:
case ADD_HOST_TO_EXCLUDE_SCOPE:
case ADD_TO_EXCLUDE_SCOPE: {
Expand Down
18 changes: 12 additions & 6 deletions src/main/java/yagura/model/SendToParameterProperty.java
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,11 @@ public Properties getProperties() {
public static String getParameter(SendToParameterProperty.SendToParameterType type, HttpRequestResponse messageInfo) {
String value = null;
switch (type) {
case HISTORY_COMMENT:
case HISTORY_COMMENT: {
value = messageInfo.annotations().notes();
break;
case RESPONSE_TITLE:
}
case RESPONSE_TITLE: {
if (messageInfo.response() != null) {
try {
HttpResponseWapper wrapResponse = new HttpResponseWapper(messageInfo.response());
Expand All @@ -262,8 +263,10 @@ public static String getParameter(SendToParameterProperty.SendToParameterType ty
}
}
break;
case HISTORY_NUMBER:
}
case HISTORY_NUMBER: {
break;
}
}
return value;
}
Expand All @@ -275,14 +278,17 @@ public static String extractLinePart(SendToParameterProperty.LinePartType commen
Matcher m = LINE_PART.matcher(part);
if (m.find()) {
switch (commentLineType) {
case FIRST_LINE:
case FIRST_LINE: {
part = m.group(1);
break;
case SECOND_LINE:
}
case SECOND_LINE: {
part = m.group(2);
break;
default:
}
default: {
break;
}
}
}
return part;
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/yagura/model/SendToServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -492,12 +492,14 @@ public void run() {
String authorizationPasswd = extendConnectionProp.getAuthorizationPasswd();
okhttp3.Authenticator authenticator = null;
switch (authorizationType) {
case BASIC:
case BASIC: {
authenticator = new BasicAuthenticator(new com.burgstaller.okhttp.digest.Credentials(authorizationUser, authorizationPasswd));
break;
case DIGEST:
}
case DIGEST: {
authenticator = new DigestAuthenticator(new com.burgstaller.okhttp.digest.Credentials(authorizationUser, authorizationPasswd));
break;
}
}

// Proxy
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/yagura/view/BurpToolBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -416,14 +416,16 @@ private void mnuSaveProjectSettingsActionPerformed(java.awt.event.ActionEvent ev

public void applyStyleTheme(Theme theme) {
switch (theme) {
case DARK:
case DARK: {
this.tglIntercept.setIcon(inspector_off_dark);
this.tglIntercept.setSelectedIcon(inspector_on_dark);
break;
case LIGHT:
}
case LIGHT: {
this.tglIntercept.setIcon(inspector_off_light);
this.tglIntercept.setSelectedIcon(inspector_on_light);
break;
}
}
this.tglIntercept.updateUI();
}
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/yagura/view/ConnectionsPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -569,15 +569,18 @@ public void setProperty(HttpExtendProperty prop) {
this.rdoBurpClient.setSelected(true);
}
switch (httpProtocol) {
case HTTP_1_1:
case HTTP_1_1: {
this.rdoHttpProtocol1.setSelected(true);
break;
case HTTP_2:
}
case HTTP_2: {
this.rdoHttpProtocol2.setSelected(true);
break;
default:
}
default: {
this.rdoHttpProtocolAuto.setSelected(true);
break;
}
}

this.spnTimeout.setValue(prop.getTimeout());
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/yagura/view/HotKeyDlg.form
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,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,0,-65,0,0,1,-112"/>
<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,0,-52,0,0,2,38"/>
</AuxValues>

<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
Expand All @@ -33,19 +33,19 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="txtKey" min="-2" pref="250" max="-2" attributes="0"/>
<Group type="102" attributes="0">
<Component id="chkControl" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="chkShift" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="chkAlt" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="txtKey" alignment="0" min="-2" pref="159" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="235" max="32767" attributes="0"/>
<EmptySpace pref="294" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand All @@ -60,7 +60,7 @@
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="txtKey" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="87" max="32767" attributes="0"/>
<EmptySpace pref="100" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -101,7 +101,7 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace pref="203" max="32767" attributes="0"/>
<EmptySpace pref="353" max="32767" attributes="0"/>
<Component id="btnOK" min="-2" pref="84" max="-2" attributes="1"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="btnCancel" min="-2" pref="95" max="-2" attributes="1"/>
Expand Down
28 changes: 21 additions & 7 deletions src/main/java/yagura/view/HotKeyDlg.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ private void initComponents() {
.addGroup(pnlMainLayout.createSequentialGroup()
.addContainerGap()
.addGroup(pnlMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(txtKey, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(pnlMainLayout.createSequentialGroup()
.addComponent(chkControl)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(chkShift)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(chkAlt))
.addComponent(txtKey, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(235, Short.MAX_VALUE))
.addComponent(chkAlt)))
.addContainerGap(294, Short.MAX_VALUE))
);
pnlMainLayout.setVerticalGroup(
pnlMainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
Expand All @@ -72,7 +72,7 @@ private void initComponents() {
.addComponent(chkAlt))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtKey, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(87, Short.MAX_VALUE))
.addContainerGap(100, Short.MAX_VALUE))
);

getContentPane().add(pnlMain, java.awt.BorderLayout.CENTER);
Expand All @@ -98,7 +98,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
pnlApplyLayout.setHorizontalGroup(
pnlApplyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlApplyLayout.createSequentialGroup()
.addContainerGap(203, Short.MAX_VALUE)
.addContainerGap(353, Short.MAX_VALUE)
.addComponent(btnOK, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(btnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
Expand Down Expand Up @@ -182,6 +182,20 @@ public void windowClosing(java.awt.event.WindowEvent e) {
private javax.swing.JTextField txtKey;
// End of variables declaration//GEN-END:variables

public void setHotKey(KeyStroke ks) {
int modifiers = ks.getModifiers();
if ((modifiers &= KeyEvent.CTRL_DOWN_MASK) == KeyEvent.CTRL_DOWN_MASK) {
this.chkControl.setSelected(true);
}
if ((modifiers &= KeyEvent.SHIFT_DOWN_MASK) == KeyEvent.SHIFT_DOWN_MASK) {
this.chkShift.setSelected(true);
}
if ((modifiers &= KeyEvent.ALT_GRAPH_DOWN_MASK) == KeyEvent.ALT_GRAPH_DOWN_MASK) {
this.chkAlt.setSelected(true);
}
this.txtKey.setText(String.valueOf(ks.getKeyChar()));
}

public KeyStroke getHotKey() {
int modifiers = 0;
if (this.chkControl.isSelected()) {
Expand All @@ -192,9 +206,9 @@ public KeyStroke getHotKey() {
}
if (this.chkAlt.isSelected()) {
modifiers |= KeyEvent.ALT_GRAPH_DOWN_MASK;
}
}
return KeyStroke.getKeyStroke(ConvertUtil.parseIntDefault(this.txtKey.getText(), -1), modifiers);
}
}


}
9 changes: 6 additions & 3 deletions src/main/java/yagura/view/SendToParameterPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -297,15 +297,18 @@ public void setProperty(SendToParameterProperty prop) {
}

switch (prop.getReqNameLineType()) {
case FIRST_LINE:
case FIRST_LINE: {
this.rdoReqNameFirstLine.setSelected(true);
break;
case SECOND_LINE:
}
case SECOND_LINE: {
this.rdoReqNameSecondLine.setSelected(true);
break;
default:
}
default: {
this.rdoReqNameAllLine.setSelected(true);
break;
}
}

this.chkUseReqNotes.setSelected(prop.isUseReqComment());
Expand Down

0 comments on commit 8b13ca6

Please sign in to comment.