Skip to content

Commit

Permalink
upgrade BurpExtensionCommons-v0.4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
isayan committed Feb 27, 2021
1 parent 0725ceb commit 9d6ca6b
Show file tree
Hide file tree
Showing 18 changed files with 133 additions and 134 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 raise-isayan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion Readme-ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ gradlew release

## 必須ライブラリ
ビルドには別途 [BurpExtensionCommons](https://github.com/raise-isayan/BurpExtensionCommons) のライブラリを必要とします。
* BurpExtensionCommons v0.4.0.0
* BurpExtensionCommons v0.4.x

### 利用ライブラリ

Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ gradlew release

## Required library
Building requires a [BurpExtensionCommons](https://github.com/raise-isayan/BurpExtensionCommons) library.
* BurpExtensionCommons v0.4.0.0
* BurpExtensionCommons v0.4.x

## Use Library
* Apache common codec (https://commons.apache.org/proper/commons-codec/)
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ dependencies {

// https://mvnrepository.com/artifact/net.portswigger.burp.extender/burp-extender-api
compileOnly 'net.portswigger.burp.extender:burp-extender-api:2.1'
// https://mvnrepository.com/artifact/commons-codec/commons-codec
// https://mvnrepository.com/artifact/commons-codec/commons-codec
implementation 'commons-codec:commons-codec:1.15'
// https://mvnrepository.com/artifact/com.fifesoft/rsyntaxtextarea
// https://mvnrepository.com/artifact/com.fifesoft/rsyntaxtextarea
implementation 'com.fifesoft:rsyntaxtextarea:3.1.2'
// https://mvnrepository.com/artifact/org.jsoup/jsoup
// https://mvnrepository.com/artifact/org.jsoup/jsoup
implementation 'org.jsoup:jsoup:1.13.1'
// Unit Test
testImplementation 'net.portswigger.burp.extender:burp-extender-api:2.1'
Expand Down
Binary file not shown.
Binary file modified release/YaguraExtender-v2.2.jar
Binary file not shown.
7 changes: 2 additions & 5 deletions src/main/java/aspx/viewstate/ViewStateParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
import java.util.regex.Pattern;

/**
* @author isayan
* Base Code
* @see https://github.com/mono/mono/blob/da11592cbea4269971f4b1f9624769a85cc10660/mcs/class/referencesource/System.Web/UI/ObjectStateFormatter.cs
* @see https://github.com/mono/mono/blob/master/mcs/class/referencesource/System.Web/UI/ObjectStateFormatter.cs
* @licenses MIT license
*/
public class ViewStateParser {
Expand Down Expand Up @@ -356,8 +355,6 @@ public JsonElement decodeJsonObject(ByteBuffer bbf) {
int b = bbf.remaining();
double value = bbf.getDouble();
int type = bbf.getInt();
// jsonUnit.addProperty("UnitType", type);
// jsonUnit.addProperty("Value", value);
JsonObject jsonNode = new JsonObject();
jsonNode.addProperty("Unit", String.format("%.2f %s", value, ViewState.getUnitType(type)));
decodeNode = jsonNode;
Expand Down Expand Up @@ -510,7 +507,7 @@ private int readEncodedInt32(ByteBuffer bbf) {
public String readString(ByteBuffer bbf) {
return readString(bbf, StandardCharsets.UTF_8);
}

public String readString(ByteBuffer bbf, Charset charset) {
StringBuilder sb = new StringBuilder();
int stringLength = readEncodedInt32(bbf);
Expand Down
19 changes: 8 additions & 11 deletions src/main/java/burp/BurpExtender.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@
import extension.helpers.json.JsonUtil;
import extension.view.base.MatchItem;
import java.awt.Component;
import java.awt.KeyEventPostProcessor;
import java.awt.KeyboardFocusManager;
import java.awt.TrayIcon;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
Expand Down Expand Up @@ -62,11 +60,9 @@
import javax.swing.JTable;
import javax.swing.SwingUtilities;
import javax.swing.table.TableModel;
import jdk.jshell.execution.Util;
import passive.IssueItem;
import yagura.Config;
import yagura.Version;
import yagura.model.IKeywordHighlighter;
import yagura.view.JWTViewTab;
import yagura.view.ParamsViewTab;
import yagura.view.RawViewTab;
Expand All @@ -79,7 +75,7 @@ public class BurpExtender extends BurpExtenderImpl
implements IHttpListener, IProxyListener, IExtensionStateListener {
private final static Logger logger = Logger.getLogger(BurpExtender.class.getName());


public BurpExtender() {
}

Expand Down Expand Up @@ -180,7 +176,7 @@ public IMessageEditorTab createNewInstance(IMessageEditorController controller,
@Override
public boolean isJsonp() {
return true;
}
}
};
return tab;
}
Expand All @@ -192,9 +188,9 @@ private MouseListener newContextMenu(IMessageEditorController controller) {
public void mouseClicked(MouseEvent e) {
getSendToMenu().showBurpMenu(controller, e);
}
};
};
}

@Override
public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) {
super.registerExtenderCallbacks(callbacks);
Expand Down Expand Up @@ -456,7 +452,7 @@ protected synchronized void writeToolMessage(
}

private final static Pattern HTTP_LINESEP = Pattern.compile("\\r\\n\\r\\n");

/**
* メッセージの置換
*
Expand Down Expand Up @@ -742,7 +738,7 @@ protected void applyOptionProperty() {
logger.log(Level.SEVERE, null, ex);
}
}

/**
* Send to JTransCoder
*
Expand Down Expand Up @@ -828,7 +824,8 @@ else if (Long.class.isAssignableFrom(table.getColumnClass(i))) {
export.append("\t");
}
}
export.append("\r\n"); int[] rows = table.getSelectedRows();
export.append("\r\n");
int[] rows = table.getSelectedRows();
for (int k = 0; k < rows.length; k++) {
for (int i = 0; i < colcount; i++) {
if (cols[i]) {
Expand Down
19 changes: 12 additions & 7 deletions src/main/java/yagura/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,23 @@ public String getProjectName() {
String projname = BUNDLE.getString("projname");
return projname;
}

private final static String VERSION_INFO_FMT =
"Product Version: %s %s\n" +

public String getTabCaption() {
String projname = BUNDLE.getString("tabcaption");
return projname;
}

private final static String VERSION_INFO_FMT =
"Product Version: %s %s\n" +
"Log Dir: %s\n" +
"Config Dir: %s\n";
"Config Dir: %s\n";

public String getVersionInfo() {
return String.format(VERSION_INFO_FMT,
getProjectName(),
Version.getInstance().getVersion(),
Version.getInstance().getVersion(),
Config.getUserDirPath(),
Config.getExtensionHomeDir().getAbsoluteFile());
Config.getExtensionHomeDir().getAbsoluteFile());
}

}
12 changes: 7 additions & 5 deletions src/main/java/yagura/view/JTransCoderTab.form
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,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,-118,0,0,5,46"/>
<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,-118,0,0,5,56"/>
</AuxValues>

<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
Expand Down Expand Up @@ -96,6 +96,7 @@
<SubComponents>
<Component class="javax.swing.JButton" name="btnEncode">
<Properties>
<Property name="mnemonic" type="int" value="69"/>
<Property name="text" type="java.lang.String" value="Encode"/>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[71, 21]"/>
Expand All @@ -113,6 +114,7 @@
</Component>
<Component class="javax.swing.JButton" name="btnDecode">
<Properties>
<Property name="mnemonic" type="int" value="68"/>
<Property name="text" type="java.lang.String" value="Decode"/>
</Properties>
<Events>
Expand Down Expand Up @@ -1671,7 +1673,7 @@
<Component id="pnlCount" min="-2" pref="240" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace pref="714" max="32767" attributes="0"/>
<EmptySpace pref="710" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -1976,7 +1978,7 @@
<Group type="102" alignment="0" attributes="0">
<Component id="lblBin" min="-2" pref="55" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="txtBin" pref="1180" max="32767" attributes="0"/>
<Component id="txtBin" pref="1178" max="32767" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="lblHex" min="-2" pref="55" max="-2" attributes="0"/>
Expand Down Expand Up @@ -2394,7 +2396,7 @@
<Component id="btnStoreTypePKCS12" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace pref="966" max="32767" attributes="0"/>
<EmptySpace pref="968" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
Expand Down Expand Up @@ -2521,7 +2523,7 @@
<Component id="btnCalc" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Component id="jLabel3" pref="358" max="32767" attributes="0"/>
<Component id="jLabel3" pref="366" max="32767" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="671" max="-2" attributes="0"/>
</Group>
Expand Down
Loading

0 comments on commit 9d6ca6b

Please sign in to comment.