Skip to content

Commit

Permalink
Upgrade BurpExtensionCommons
Browse files Browse the repository at this point in the history
  • Loading branch information
isayan committed Jan 15, 2024
1 parent 179ac3c commit f258f50
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 10 deletions.
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
netbeans.org-netbeans-modules-javascript2-requirejs.enabled=true
release_version_major=3.0
release_version_minor=7.2
release_version_minor=7.3
netbeans.license=mit
netbeans.hint.jdkPlatform=JDK_17
2 changes: 1 addition & 1 deletion help/help-ja.html
Original file line number Diff line number Diff line change
Expand Up @@ -2384,7 +2384,7 @@ <h3 id="_version">3.10. Version</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2023-12-19 07:47:29 +0900
Last updated 2023-12-18 18:00:05 +0900
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion help/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -2418,7 +2418,7 @@ <h3 id="_version">3.11. Version</h3>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2023-12-19 07:47:29 +0900
Last updated 2023-12-18 18:03:30 +0900
</div>
</div>
</body>
Expand Down
Binary file not shown.
Binary file added release/YaguraExtension-v3.0.jar
Binary file not shown.
8 changes: 4 additions & 4 deletions src/main/java/burp/BurpExtension.java
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,15 @@ public List<String> getSelectEncodingList() {
String defaultCharset = HttpUtil.normalizeCharset(StringUtil.DEFAULT_ENCODING);
List<String> list = new ArrayList<>();
list.addAll(this.option.getEncodingProperty().getEncodingList());
// リストにない場合追加(デフォルトエンコーディング)
if (!list.contains(defaultCharset)) {
list.add(defaultCharset);
}
// リストにない場合追加
BurpConfig.CharacterSets burpCharset = BurpConfig.getCharacterSets(api());
if (BurpConfig.CharacterSetMode.SPECIFIC_CHARACTER_SET.toIdent().equals(burpCharset.getMode()) && burpCharset.getCharacterSet() != null && !list.contains(burpCharset.getCharacterSet())) {
list.add(burpCharset.getCharacterSet());
}
// リストにない場合追加(デフォルトエンコーディング)
if (!list.contains(defaultCharset)) {
list.add(defaultCharset);
}
return list;
}

Expand Down
36 changes: 36 additions & 0 deletions src/test/java/extend/util/external/TransUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
import extension.helpers.MatchUtil;
import extension.helpers.SmartCodec;
import extension.helpers.StringUtil;
import java.io.ByteArrayOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.util.logging.Level;
Expand All @@ -30,6 +34,7 @@
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
import org.apache.commons.codec.digest.Blake3;
import org.apache.commons.codec.digest.Sha2Crypt;
import org.apache.commons.codec.digest.UnixCrypt;

Expand Down Expand Up @@ -989,4 +994,35 @@ public void testTranslate() {
}
}

@Test
public void testBlake3_x32() {
System.out.println("testBlake3");
Blake3 hasher = Blake3.initHash();
hasher.update("Hello, world!".getBytes(StandardCharsets.UTF_8));
byte[] hash = new byte[32];
hasher.doFinalize(hash);
System.out.println(ConvertUtil.toHexString(hash));
}

@Test
public void testBlake3_x64() {
System.out.println("testBlake3");
Blake3 hasher = Blake3.initHash();
hasher.update("Hello, world!".getBytes(StandardCharsets.UTF_8));
byte[] hash = new byte[64];
hasher.doFinalize(hash);
System.out.println(ConvertUtil.toHexString(hash));
}


@Test
public void testBinary() throws IOException {
System.out.println("testBinary");
FileOutputStream fstm = new FileOutputStream("C:\\Windows\\Temp\\output");
for (int i = 0; i < 256; i++) {
fstm.write((byte)i);
}
}


}
1 change: 0 additions & 1 deletion src/test/java/yagura/model/OptoinPropertyTest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package yagura.model;

import extension.burp.FilterProperty;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/resources/YaguraExtender.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"regexp": false,
"match": "https://redirect/",
"type": "auto responder",
"replace": "C:\\Temp\\redirect.txt",
"replace": "C:\\Windows\\Temp\\redirect.txt",
"bodyOnly": false,
"contentType": "text/html"
}]
Expand Down

0 comments on commit f258f50

Please sign in to comment.