Skip to content

Commit

Permalink
Base64URLSafe のNewLine 指定を無視するように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
isayan committed Dec 12, 2024
1 parent ae59c18 commit 2fab54f
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 68 deletions.
25 changes: 12 additions & 13 deletions help/help-ja.html
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@
<div id="header">
<h1>YaguraExtension ヘルプ</h1>
<div class="details">
<span id="revnumber">version v3.1.5.1</span>
<span id="revnumber">version v3.1.6.0</span>
</div>
<div id="toc" class="toc2">
<div id="toctitle">Table of Contents</div>
Expand All @@ -462,10 +462,9 @@ <h1>YaguraExtension ヘルプ</h1>
<li><a href="#_yaguraタブ">3. Yaguraタブ</a>
<ul class="sectlevel2">
<li><a href="#_universal_viewタブ">3.1. Universal Viewタブ</a>
<ul class="sectlevel4">
<li><a href="#_cjk_view">CJK View</a></li>
<li><a href="#_cjk_message_view">3.1.2. CJK Message View</a></li>
<li><a href="#_burp_view_タブ">3.1.3. Burp View タブ</a></li>
<ul class="sectlevel3">
<li><a href="#_cjk_view">3.1.1. CJK View</a></li>
<li><a href="#_burp_view_タブ">3.1.2. Burp View タブ</a></li>
</ul>
</li>
<li><a href="#_matchreplaceタブ">3.2. MatchReplaceタブ</a>
Expand Down Expand Up @@ -762,8 +761,8 @@ <h2 id="_yaguraタブ">3. Yaguraタブ</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_universal_viewタブ">3.1. Universal Viewタブ</h3>
<div class="sect4">
<h5 id="_cjk_view">CJK View</h5>
<div class="sect3">
<h4 id="_cjk_view">3.1.1. CJK View</h4>
<div class="paragraph">
<p><span class="image"><img src="images/custom_encoding.png" alt="CJK Viewタブ"></span></p>
</div>
Expand Down Expand Up @@ -802,9 +801,8 @@ <h5 id="_cjk_view">CJK View</h5>
</dd>
</dl>
</div>
</div>
<div class="sect3">
<h4 id="_cjk_message_view">3.1.2. CJK Message View</h4>
<div class="sect4">
<h5 id="_cjk_message_view">CJK Message View</h5>
<div class="dlist">
<dl>
<dt class="hdlist1">[Cenerate PoC] チェックボックス</dt>
Expand Down Expand Up @@ -852,8 +850,9 @@ <h4 id="_cjk_message_view">3.1.2. CJK Message View</h4>
</dl>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_burp_view_タブ">3.1.3. Burp View タブ</h4>
<h4 id="_burp_view_タブ">3.1.2. Burp View タブ</h4>
<div class="paragraph">
<p><span class="image"><img src="images/custom_burpview.png" alt="Burp View tab"></span></p>
</div>
Expand Down Expand Up @@ -2995,8 +2994,8 @@ <h3 id="_version">3.11. Version</h3>
</div>
<div id="footer">
<div id="footer-text">
Version v3.1.5.1<br>
Last updated 2024-11-30 08:19:26 +0900
Version v3.1.6.0<br>
Last updated 2024-12-11 21:59:52 +0900
</div>
</div>
</body>
Expand Down
17 changes: 8 additions & 9 deletions help/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@
<div id="header">
<h1>YaguraExtension Help</h1>
<div class="details">
<span id="revnumber">version v3.1.5.1</span>
<span id="revnumber">version v3.1.6.0</span>
</div>
<div id="toc" class="toc2">
<div id="toctitle">Table of Contents</div>
Expand All @@ -464,8 +464,7 @@ <h1>YaguraExtension Help</h1>
<li><a href="#_universal_view_tab">3.1. Universal View tab</a>
<ul class="sectlevel3">
<li><a href="#_cjk_view_tab">3.1.1. CJK View tab</a></li>
<li><a href="#_cjk_message_view">3.1.2. CJK Message View</a></li>
<li><a href="#_burp_view_tab">3.1.3. Burp View tab</a></li>
<li><a href="#_burp_view_tab">3.1.2. Burp View tab</a></li>
</ul>
</li>
<li><a href="#_matchreplace_tab">3.2. MatchReplace tab</a>
Expand Down Expand Up @@ -803,9 +802,8 @@ <h4 id="_cjk_view_tab">3.1.1. CJK View tab</h4>
</dd>
</dl>
</div>
</div>
<div class="sect3">
<h4 id="_cjk_message_view">3.1.2. CJK Message View</h4>
<div class="sect4">
<h5 id="_cjk_message_view">CJK Message View</h5>
<div class="dlist">
<dl>
<dt class="hdlist1">[Cenerate PoC] check box</dt>
Expand Down Expand Up @@ -853,8 +851,9 @@ <h4 id="_cjk_message_view">3.1.2. CJK Message View</h4>
</dl>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_burp_view_tab">3.1.3. Burp View tab</h4>
<h4 id="_burp_view_tab">3.1.2. Burp View tab</h4>
<div class="paragraph">
<p><span class="image"><img src="images/custom_burpview.png" alt="Burp View tab"></span></p>
</div>
Expand Down Expand Up @@ -3007,8 +3006,8 @@ <h3 id="_version">3.11. Version</h3>
</div>
<div id="footer">
<div id="footer-text">
Version v3.1.5.1<br>
Last updated 2024-11-30 08:08:25 +0900
Version v3.1.6.0<br>
Last updated 2024-12-11 22:00:49 +0900
</div>
</div>
</body>
Expand Down
Binary file modified release/YaguraExtension-v3.1.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions src/main/help/help-ja.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Burpの [User Interface] -> [Inspector and Message Editor] の Charsetsの切り

=== Universal Viewタブ

===== CJK View
==== CJK View

image:images/custom_encoding.png[CJK Viewタブ]

Expand Down Expand Up @@ -147,7 +147,7 @@ Select::
クリップボード内のバイト文字列から文字コードを推測しているため、判定に失敗する場合があります。 +
現在のバージョンではサポートされていません。

==== CJK Message View
===== CJK Message View

[Cenerate PoC] チェックボックス::
メッセージタブにCenerate PoCタブを表示するようにします。
Expand Down
2 changes: 1 addition & 1 deletion src/main/help/help.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Select::
Judgment may fail because the character code is inferred from the byte string in the clipboard. +
Not supported in current version.

==== CJK Message View
===== CJK Message View

[Cenerate PoC] check box::
Display the "Cenerate PoC" tab in the message tab.
Expand Down
34 changes: 17 additions & 17 deletions src/main/java/yagura/view/JTransCoderTab.form
Original file line number Diff line number Diff line change
Expand Up @@ -786,23 +786,6 @@
<Property name="text" type="java.lang.String" value="Base64"/>
</Properties>
</Component>
<Component class="javax.swing.JRadioButton" name="rdoBase64URLSafe">
<Properties>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="rdoEncodeDecodeGrp"/>
</Property>
<Property name="text" type="java.lang.String" value="Base64URLSafe"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="pnlBase64Setting">

<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout">
<Property name="columns" type="int" value="0"/>
<Property name="rows" type="int" value="1"/>
</Layout>
<SubComponents>
<Component class="javax.swing.JCheckBox" name="chk76Newline">
<Properties>
<Property name="text" type="java.lang.String" value="76 newline"/>
Expand All @@ -827,6 +810,23 @@
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="pnlBase64URLSafe">

<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout">
<Property name="columns" type="int" value="1"/>
<Property name="rows" type="int" value="1"/>
</Layout>
<SubComponents>
<Component class="javax.swing.JRadioButton" name="rdoBase64URLSafe">
<Properties>
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
<ComponentRef name="rdoEncodeDecodeGrp"/>
</Property>
<Property name="text" type="java.lang.String" value="Base64URLSafe"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="pnlBaseN">

<Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout">
Expand Down
41 changes: 15 additions & 26 deletions src/main/java/yagura/view/JTransCoderTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -458,11 +458,11 @@ private void initComponents() {
rdoUrlUnicode = new javax.swing.JRadioButton();
pnlBase64 = new javax.swing.JPanel();
rdoBase64 = new javax.swing.JRadioButton();
rdoBase64URLSafe = new javax.swing.JRadioButton();
pnlBase64Setting = new javax.swing.JPanel();
chk76Newline = new javax.swing.JCheckBox();
chk64Newline = new javax.swing.JCheckBox();
chkPadding = new javax.swing.JCheckBox();
pnlBase64URLSafe = new javax.swing.JPanel();
rdoBase64URLSafe = new javax.swing.JRadioButton();
pnlBaseN = new javax.swing.JPanel();
rdoBase32 = new javax.swing.JRadioButton();
rdoBase16 = new javax.swing.JRadioButton();
Expand Down Expand Up @@ -1131,35 +1131,35 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
rdoBase64.setText("Base64");
pnlBase64.add(rdoBase64);

rdoEncodeDecodeGrp.add(rdoBase64URLSafe);
rdoBase64URLSafe.setText("Base64URLSafe");
pnlBase64.add(rdoBase64URLSafe);

pnlEncodeDecode.add(pnlBase64);

pnlBase64Setting.setLayout(new java.awt.GridLayout(1, 0));

chk76Newline.setText("76 newline");
chk76Newline.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chk76NewlineActionPerformed(evt);
}
});
pnlBase64Setting.add(chk76Newline);
pnlBase64.add(chk76Newline);

chk64Newline.setText("64 newline");
chk64Newline.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chk64NewlineActionPerformed(evt);
}
});
pnlBase64Setting.add(chk64Newline);
pnlBase64.add(chk64Newline);

chkPadding.setSelected(true);
chkPadding.setText("Padding");
pnlBase64Setting.add(chkPadding);
pnlBase64.add(chkPadding);

pnlEncodeDecode.add(pnlBase64);

pnlEncodeDecode.add(pnlBase64Setting);
pnlBase64URLSafe.setLayout(new java.awt.GridLayout(1, 1));

rdoEncodeDecodeGrp.add(rdoBase64URLSafe);
rdoBase64URLSafe.setText("Base64URLSafe");
pnlBase64URLSafe.add(rdoBase64URLSafe);

pnlEncodeDecode.add(pnlBase64URLSafe);

pnlBaseN.setLayout(new java.awt.GridLayout(1, 0));

Expand Down Expand Up @@ -3062,17 +3062,6 @@ private void btnEncodeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIR
}
} else if (this.rdoBase64URLSafe.isSelected()) {
encode = CodecUtil.toBase64URLSafeEncode(value, this.getSelectEncode());
if (this.chk76Newline.isSelected()) {
if (!this.chkRawMode.isSelected()) {
encode = TransUtil.newLine(TransUtil.getNewLine(this.getSelectNewLine()), encode, 76);
// encode = CodecUtil.toBase64URLSafeEncode(value, this.getSelectEncode(), this.chkPadding.isSelected(), 76, TransUtil.getNewLine(this.getSelectNewLine()));
}
} else if (this.chk64Newline.isSelected()) {
if (!this.chkRawMode.isSelected()) {
encode = TransUtil.newLine(TransUtil.getNewLine(this.getSelectNewLine()), encode, 64);
// encode = CodecUtil.toBase64URLSafeEncode(value, this.getSelectEncode(), this.chkPadding.isSelected(), 64, TransUtil.getNewLine(this.getSelectNewLine()));
}
}
} else if (this.rdoBase32.isSelected()) {
encode = CodecUtil.toBase32Encode(value, this.getSelectEncode(), this.chkNPadding.isSelected());
} else if (this.rdoBase16.isSelected()) {
Expand Down Expand Up @@ -4706,7 +4695,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
private javax.swing.JLabel lblZoneDate;
private javax.swing.JLabel lblmaximum;
private javax.swing.JPanel pnlBase64;
private javax.swing.JPanel pnlBase64Setting;
private javax.swing.JPanel pnlBase64URLSafe;
private javax.swing.JPanel pnlBaseN;
private javax.swing.JPanel pnlCharacter;
private javax.swing.JPanel pnlCheckSumTrans;
Expand Down

0 comments on commit 2fab54f

Please sign in to comment.