Skip to content

Commit aa5e1a8

Browse files
author
isayan
committed
bugfix
1 parent aa33794 commit aa5e1a8

File tree

11 files changed

+130
-7
lines changed

11 files changed

+130
-7
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=3.0
3+
release_version_minor=4.0

help/html5/help-ja.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ <h5 id="_proxy設定ダイヤログ">Proxy設定ダイヤログ</h5>
964964
<dl>
965965
<dt class="hdlist1">Protocol</dt>
966966
<dd>
967-
<p>Proxyのプロトコルを指定します。HTTPとSOCKSを選択可能です。(SOCKSは現状動作しません)</p>
967+
<p>Proxyのプロトコルを指定します。HTTPとSOCKSを選択可能です。</p>
968968
</dd>
969969
<dt class="hdlist1">Host</dt>
970970
<dd>
@@ -990,6 +990,9 @@ <h5 id="_proxy設定ダイヤログ">Proxy設定ダイヤログ</h5>
990990
</li>
991991
</ul>
992992
</div>
993+
<div class="paragraph">
994+
<p>COUTION: JDKのバグのためSOCKS Proxyは動作しません</p>
995+
</div>
993996
</div>
994997
<div class="sect4">
995998
<h5 id="_サーバチェック時にサーバに送信される形式">サーバチェック時にサーバに送信される形式</h5>
@@ -1106,6 +1109,10 @@ <h4 id="_extendタブ">2.4.4. Extendタブ</h4>
11061109
<dd>
11071110
<p>リクエストとレスポンスをファイルに保存します。</p>
11081111
</dd>
1112+
<dt class="hdlist1">request body to file</dt>
1113+
<dd>
1114+
<p>リクエストのボディの部分のみをファイルに保存します。</p>
1115+
</dd>
11091116
<dt class="hdlist1">response body to file</dt>
11101117
<dd>
11111118
<p>レスポンスのボディの部分のみをファイルに保存します。</p>
@@ -1837,7 +1844,7 @@ <h3 id="_version">2.9. Version</h3>
18371844
<div id="footer">
18381845
<div id="footer-text">
18391846
Version unspecified<br>
1840-
Last updated 2021-04-17 12:29:05 +0900
1847+
Last updated 2021-04-29 10:45:19 +0900
18411848
</div>
18421849
</div>
18431850
</body>

help/html5/help.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,10 @@ <h4 id="_extend_tab">2.4.4. Extend tab</h4>
11071107
<dd>
11081108
<p>Save request and response to a file.</p>
11091109
</dd>
1110+
<dt class="hdlist1">request body to file</dt>
1111+
<dd>
1112+
<p>Save only the body part of the request to a file.</p>
1113+
</dd>
11101114
<dt class="hdlist1">response body to file</dt>
11111115
<dd>
11121116
<p>Save only the body part of the response to a file.</p>
@@ -1137,6 +1141,9 @@ <h4 id="_extend_tab">2.4.4. Extend tab</h4>
11371141
</dd>
11381142
</dl>
11391143
</div>
1144+
<div class="paragraph">
1145+
<p>COUTION: SOCKS Proxy does not work due to a JDK bug</p>
1146+
</div>
11401147
</div>
11411148
</div>
11421149
<div class="sect2">
@@ -1843,7 +1850,7 @@ <h3 id="_version">2.9. Version</h3>
18431850
<div id="footer">
18441851
<div id="footer-text">
18451852
Version unspecified<br>
1846-
Last updated 2021-04-17 12:31:28 +0900
1853+
Last updated 2021-04-29 10:45:56 +0900
18471854
</div>
18481855
</div>
18491856
</body>

release/YaguraExtender-v2.2.jar

143 Bytes
Binary file not shown.

src/main/help/help-ja.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ image:images/custom_sendto_server_proxy.png[SendToItem編集 Proxy設定 ダイ
308308
** プロキシ設定に独自の設定を利用します。
309309

310310
Protocol::
311-
Proxyのプロトコルを指定します。HTTPとSOCKSを選択可能です。(SOCKSは現状動作しません)
311+
Proxyのプロトコルを指定します。HTTPとSOCKSを選択可能です。
312312

313313
Host::
314314
Proxyのホストを入力します。
@@ -322,6 +322,9 @@ User::
322322
Password::
323323
Proxyの認証パスワードを指定します。
324324

325+
326+
COUTION: JDKのバグのためSOCKS Proxyは動作しません
327+
325328
===== サーバチェック時にサーバに送信される形式
326329

327330
multipart のデータ形式でサーバに送信されます。次の内容を含みます。
@@ -404,6 +407,8 @@ image:images/custom_sendto_extend.png[SendToItem編集 Extend ダイヤログ]
404407
JTransCoder のInputに選択した文字列を送ります。
405408
request and response to file::
406409
リクエストとレスポンスをファイルに保存します。
410+
request body to file::
411+
リクエストのボディの部分のみをファイルに保存します。
407412
response body to file::
408413
レスポンスのボディの部分のみをファイルに保存します。
409414
paste from jtranscoder::

src/main/help/help.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,8 @@ image:images/custom_sendto_extend.png[SendToItem Edit Extend Dialog]
410410
Sends the selected string to the input of JTransCoder.
411411
request and response to file::
412412
Save request and response to a file.
413+
request body to file::
414+
Save only the body part of the request to a file.
413415
response body to file::
414416
Save only the body part of the response to a file.
415417
paste from jtranscoder::
@@ -425,6 +427,8 @@ image:images/custom_sendto_extend.png[SendToItem Edit Extend Dialog]
425427
add exclude scope::
426428
Add URL to exclude in scope.
427429

430+
COUTION: SOCKS Proxy does not work due to a JDK bug
431+
428432
=== Logging tabs
429433

430434
image:images/custom_logging.png[Logging tab]

src/main/java/burp/BurpExtender.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ public void processProxyMessage(boolean messageIsRequest, IInterceptedProxyMessa
280280
MatchReplaceGroup group = this.option.getMatchReplaceProperty().getReplaceSelectedGroup(this.option.getMatchReplaceProperty().getSelectedName());
281281
if (group != null && group.isInScopeOnly()) {
282282
IRequestInfo reqInfo = BurpExtender.getHelpers().analyzeRequest(msgInfo.getHttpService(), messageByte);
283+
//BurpExtender.outPrintln("isScope:" + BurpExtender.getCallbacks().isInScope(reqInfo.getUrl()) + ":" + reqInfo.getUrl());
283284
if (BurpExtender.getCallbacks().isInScope(reqInfo.getUrl())) {
284285
resultBytes = this.replaceProxyMessage(message.getMessageReference(), messageIsRequest, messageByte);
285286
}
@@ -555,9 +556,10 @@ private void matchAlertMessage(String toolName, boolean messageIsRequest, IHttpR
555556
issue.setConfidence(bean.getConfidence());
556557
issue.setStart(m.start());
557558
issue.setEnd(m.end());
558-
if (bean.isCaptureGroup()) {
559+
// コメントは最初にマッチしたもののみ
560+
if (bean.isCaptureGroup() && replacemeComment == null) {
559561
String group = m.group();
560-
replacemeComment= p.matcher(group).replaceFirst(bean.getComment());
562+
replacemeComment = p.matcher(group).replaceFirst(bean.getComment());
561563
}
562564
markList.add(issue);
563565
count++;

src/main/java/extend/util/external/gson/XMatchItemAdapter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public JsonElement serialize(MatchItem t, Type type, JsonSerializationContext js
4040
jsonObject.add("smartMatch", jsc.serialize(matchItem.isSmartMatch()));
4141
jsonObject.add("issueName", jsc.serialize(matchItem.getIssueName()));
4242
jsonObject.add("severity", jsc.serialize(matchItem.getSeverity()));
43+
jsonObject.add("captureGroup", jsc.serialize(matchItem.isCaptureGroup()));
4344
jsonObject.add("confidence", jsc.serialize(matchItem.getConfidence()));
4445
jsonObject.add("notifyTypes", jsc.serialize(matchItem.getNotifyTypes()));
4546
jsonObject.add("targetTools", jsc.serialize(matchItem.getTargetTools()));
@@ -71,6 +72,7 @@ public MatchItem deserialize(JsonElement je, Type type, JsonDeserializationConte
7172
if (jsonObject.has("smartMatch")) matchItem.setSmartMatch(jdc.deserialize(jsonObject.get("smartMatch"), Boolean.TYPE));
7273
if (jsonObject.has("issueName")) matchItem.setIssueName(jdc.deserialize(jsonObject.get("issueName"), String.class));
7374
if (jsonObject.has("severity")) matchItem.setSeverity(jdc.deserialize(jsonObject.get("severity"), Severity.class));
75+
if (jsonObject.has("captureGroup")) matchItem.setCaptureGroup(jdc.deserialize(jsonObject.get("captureGroup"), Boolean.TYPE));
7476
if (jsonObject.has("confidence")) matchItem.setConfidence(jdc.deserialize(jsonObject.get("confidence"), Confidence.class));
7577
if (jsonObject.has("notifyTypes")) matchItem.setNotifyTypes(NotifyType.parseEnumSet(jsonObject.get("notifyTypes").getAsJsonArray().toString()));
7678
if (jsonObject.has("targetTools")) matchItem.setTargetTools(TargetTool.parseEnumSet(jsonObject.get("targetTools").getAsJsonArray().toString()));

src/main/java/yagura/model/SendToExtend.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ public void sendToEvent(String menuItemCaption, IHttpRequestResponse[] messageIn
5757
saveAsMessage(SendToItem.MessageType.REQUEST_AND_RESPONSE, messageInfo);
5858
break;
5959
}
60+
case REQUEST_BODY_TO_FILE: {
61+
saveAsMessageBody(SendToItem.MessageType.REQUEST, messageInfo);
62+
break;
63+
}
6064
case RESPONSE_BODY_TO_FILE: {
6165
saveAsMessageBody(SendToItem.MessageType.RESPONSE, messageInfo);
6266
break;
@@ -190,6 +194,7 @@ public boolean isEnabled() {
190194
enabled = true;
191195
break;
192196
}
197+
case REQUEST_BODY_TO_FILE:
193198
case RESPONSE_BODY_TO_FILE: {
194199
enabled = true;
195200
break;

src/main/java/yagura/model/SendToItem.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public String toString() {
3030
public enum ExtendType {
3131
SEND_TO_JTRANSCODER,
3232
REQUEST_AND_RESPONSE_TO_FILE,
33+
REQUEST_BODY_TO_FILE,
3334
RESPONSE_BODY_TO_FILE,
3435
PASTE_FROM_JTRANSCODER,
3536
PASTE_FROM_CLIPBOARD,

0 commit comments

Comments
 (0)