diff --git a/gradle.properties b/gradle.properties index 6bf7d019..8ff294e7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ netbeans.org-netbeans-modules-javascript2-requirejs.enabled=true release_version_major=2.2 -release_version_minor=5.0 +release_version_minor=6.0 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 28ff446a..0f80bbf5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/release/YaguraExtender-v2.2.jar b/release/YaguraExtender-v2.2.jar index 39f7ec52..6b9cf391 100644 Binary files a/release/YaguraExtender-v2.2.jar and b/release/YaguraExtender-v2.2.jar differ diff --git a/src/main/java/extend/util/external/ThemeUI.java b/src/main/java/extend/util/external/ThemeUI.java index 7da5ad27..32406155 100644 --- a/src/main/java/extend/util/external/ThemeUI.java +++ b/src/main/java/extend/util/external/ThemeUI.java @@ -1,9 +1,11 @@ package extend.util.external; +import javax.swing.SwingUtilities; import javax.swing.UIManager; import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; import org.fife.ui.rsyntaxtextarea.RSyntaxUtilities; import org.fife.ui.rtextarea.Gutter; +import yagura.model.SendToMenu; /** * @@ -25,15 +27,17 @@ public class ThemeUI { public static void changeStyleTheme(RSyntaxTextArea textArea) { try { - textArea.setForeground(UIManager.getColor("EditorPane.foreground")); - textArea.setBackground(UIManager.getColor("TextField.background")); - textArea.setSelectedTextColor(UIManager.getColor("TextArea.selectedForeground")); - textArea.setSelectionColor(UIManager.getColor("TextArea.selectedBackground")); - Gutter gutter = RSyntaxUtilities.getGutter(textArea); - if (gutter!=null) { - gutter.setBackground(UIManager.getColor("EditorPane.foreground")); - gutter.setLineNumberColor(UIManager.getColor("TextField.background")); - } + SwingUtilities.invokeLater(() -> { + textArea.setForeground(UIManager.getColor("EditorPane.foreground")); + textArea.setBackground(UIManager.getColor("TextField.background")); + textArea.setSelectedTextColor(UIManager.getColor("TextArea.selectedForeground")); + textArea.setSelectionColor(UIManager.getColor("TextArea.selectedBackground")); + Gutter gutter = RSyntaxUtilities.getGutter(textArea); + if (gutter!=null) { + gutter.setBackground(UIManager.getColor("TextField.background")); + gutter.setLineNumberColor(UIManager.getColor("TextField.background")); + } + }); } catch (NullPointerException ex) { } } diff --git a/src/main/java/yagura/model/SendToServer.java b/src/main/java/yagura/model/SendToServer.java index bdcb46bb..20f45c70 100644 --- a/src/main/java/yagura/model/SendToServer.java +++ b/src/main/java/yagura/model/SendToServer.java @@ -6,6 +6,7 @@ import burp.IHttpService; import extension.burp.HttpService; import extension.helpers.ConvertUtil; +import extension.helpers.FileUtil; import extension.helpers.HttpUtil; import extension.helpers.StringUtil; import java.awt.event.ActionEvent; @@ -94,8 +95,8 @@ public void run() { ostm.write(StringUtil.getBytesRaw(String.format("Content-Type: %s", "multipart/form-data;boundary=" + boundary) + StringUtil.NEW_LINE)); try (ByteArrayOutputStream bodyStream = new ByteArrayOutputStream()) { outMultipart(boundary, bodyStream, messageInfo); - //ostm.write(StringUtil.getBytesRaw(String.format("Content-Length: %d", bodyStream.size()) + StringUtil.NEW_LINE)); - //ostm.write(StringUtil.getBytesRaw("Connection: close" + StringUtil.NEW_LINE)); + ostm.write(StringUtil.getBytesRaw(String.format("Content-Length: %d", bodyStream.size()) + StringUtil.NEW_LINE)); + ostm.write(StringUtil.getBytesRaw("Connection: close" + StringUtil.NEW_LINE)); ostm.write(StringUtil.getBytesRaw(StringUtil.NEW_LINE)); ostm.write(bodyStream.toByteArray()); } @@ -227,7 +228,7 @@ public void connectFailed(URI uri, SocketAddress sa, IOException ex) { protected void outPostHeader(OutputStream out, URL tagetURL) throws IOException, Exception { HttpService httpService = new HttpService(tagetURL); - out.write(StringUtil.getBytesRaw(String.format("POST %s HTTP/1.1", tagetURL.getFile()) + HttpUtil.LINE_TERMINATE)); + out.write(StringUtil.getBytesRaw(String.format("POST %s HTTP/1.1", FileUtil.appendLastSeparator(tagetURL.getFile(), "/")) + HttpUtil.LINE_TERMINATE)); out.write(StringUtil.getBytesRaw(String.format("Host: %s", HttpUtil.buildHost(httpService.getHost(), httpService.getPort(), httpService.isHttps())) + HttpUtil.LINE_TERMINATE)); out.write(StringUtil.getBytesRaw(String.format("User-Agent: %s", "Java-http-client/BurpSuite") + StringUtil.NEW_LINE)); }