Skip to content

Commit 3a028c5

Browse files
author
isayan
committed
SendToにてBurpのプロキシ利用時のバグ修正
1 parent 1e83a9b commit 3a028c5

File tree

5 files changed

+19
-14
lines changed

5 files changed

+19
-14
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
netbeans.org-netbeans-modules-javascript2-requirejs.enabled=true
22
release_version_major=2.2
3-
release_version_minor=5.0
3+
release_version_minor=6.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

release/YaguraExtender-v2.2.jar

435 Bytes
Binary file not shown.

src/main/java/extend/util/external/ThemeUI.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package extend.util.external;
22

3+
import javax.swing.SwingUtilities;
34
import javax.swing.UIManager;
45
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
56
import org.fife.ui.rsyntaxtextarea.RSyntaxUtilities;
67
import org.fife.ui.rtextarea.Gutter;
8+
import yagura.model.SendToMenu;
79

810
/**
911
*
@@ -25,15 +27,17 @@ public class ThemeUI {
2527

2628
public static void changeStyleTheme(RSyntaxTextArea textArea) {
2729
try {
28-
textArea.setForeground(UIManager.getColor("EditorPane.foreground"));
29-
textArea.setBackground(UIManager.getColor("TextField.background"));
30-
textArea.setSelectedTextColor(UIManager.getColor("TextArea.selectedForeground"));
31-
textArea.setSelectionColor(UIManager.getColor("TextArea.selectedBackground"));
32-
Gutter gutter = RSyntaxUtilities.getGutter(textArea);
33-
if (gutter!=null) {
34-
gutter.setBackground(UIManager.getColor("EditorPane.foreground"));
35-
gutter.setLineNumberColor(UIManager.getColor("TextField.background"));
36-
}
30+
SwingUtilities.invokeLater(() -> {
31+
textArea.setForeground(UIManager.getColor("EditorPane.foreground"));
32+
textArea.setBackground(UIManager.getColor("TextField.background"));
33+
textArea.setSelectedTextColor(UIManager.getColor("TextArea.selectedForeground"));
34+
textArea.setSelectionColor(UIManager.getColor("TextArea.selectedBackground"));
35+
Gutter gutter = RSyntaxUtilities.getGutter(textArea);
36+
if (gutter!=null) {
37+
gutter.setBackground(UIManager.getColor("TextField.background"));
38+
gutter.setLineNumberColor(UIManager.getColor("TextField.background"));
39+
}
40+
});
3741
} catch (NullPointerException ex) {
3842
}
3943
}

src/main/java/yagura/model/SendToServer.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import burp.IHttpService;
77
import extension.burp.HttpService;
88
import extension.helpers.ConvertUtil;
9+
import extension.helpers.FileUtil;
910
import extension.helpers.HttpUtil;
1011
import extension.helpers.StringUtil;
1112
import java.awt.event.ActionEvent;
@@ -94,8 +95,8 @@ public void run() {
9495
ostm.write(StringUtil.getBytesRaw(String.format("Content-Type: %s", "multipart/form-data;boundary=" + boundary) + StringUtil.NEW_LINE));
9596
try (ByteArrayOutputStream bodyStream = new ByteArrayOutputStream()) {
9697
outMultipart(boundary, bodyStream, messageInfo);
97-
//ostm.write(StringUtil.getBytesRaw(String.format("Content-Length: %d", bodyStream.size()) + StringUtil.NEW_LINE));
98-
//ostm.write(StringUtil.getBytesRaw("Connection: close" + StringUtil.NEW_LINE));
98+
ostm.write(StringUtil.getBytesRaw(String.format("Content-Length: %d", bodyStream.size()) + StringUtil.NEW_LINE));
99+
ostm.write(StringUtil.getBytesRaw("Connection: close" + StringUtil.NEW_LINE));
99100
ostm.write(StringUtil.getBytesRaw(StringUtil.NEW_LINE));
100101
ostm.write(bodyStream.toByteArray());
101102
}
@@ -227,7 +228,7 @@ public void connectFailed(URI uri, SocketAddress sa, IOException ex) {
227228

228229
protected void outPostHeader(OutputStream out, URL tagetURL) throws IOException, Exception {
229230
HttpService httpService = new HttpService(tagetURL);
230-
out.write(StringUtil.getBytesRaw(String.format("POST %s HTTP/1.1", tagetURL.getFile()) + HttpUtil.LINE_TERMINATE));
231+
out.write(StringUtil.getBytesRaw(String.format("POST %s HTTP/1.1", FileUtil.appendLastSeparator(tagetURL.getFile(), "/")) + HttpUtil.LINE_TERMINATE));
231232
out.write(StringUtil.getBytesRaw(String.format("Host: %s", HttpUtil.buildHost(httpService.getHost(), httpService.getPort(), httpService.isHttps())) + HttpUtil.LINE_TERMINATE));
232233
out.write(StringUtil.getBytesRaw(String.format("User-Agent: %s", "Java-http-client/BurpSuite") + StringUtil.NEW_LINE));
233234
}

0 commit comments

Comments
 (0)