Skip to content

Commit 7e90085

Browse files
author
isayan
committed
いろいろ修正
1 parent 090afb2 commit 7e90085

15 files changed

+338
-200
lines changed

release/YaguraExtender.jar

2.23 KB
Binary file not shown.

src/burp/BurpExtender.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,28 +109,36 @@ public static BurpExtender getInstance() {
109109
private final IMessageEditorTabFactory requestRawTab = new IMessageEditorTabFactory() {
110110
@Override
111111
public IMessageEditorTab createNewInstance(IMessageEditorController controller, boolean editable) {
112-
return new RawViewTab(controller, editable, true);
112+
final RawViewTab tab = new RawViewTab(controller, editable, true);
113+
getCallbacks().customizeUiComponent(tab);
114+
return tab;
113115
}
114116
};
115117

116118
private final IMessageEditorTabFactory responseRawTab = new IMessageEditorTabFactory() {
117119
@Override
118120
public IMessageEditorTab createNewInstance(IMessageEditorController controller, boolean editable) {
119-
return new RawViewTab(controller, editable, false);
121+
final RawViewTab tab = new RawViewTab(controller, editable, false);
122+
getCallbacks().customizeUiComponent(tab);
123+
return tab;
120124
}
121125
};
122126

123127
private final IMessageEditorTabFactory requestParamsTab = new IMessageEditorTabFactory() {
124128
@Override
125129
public IMessageEditorTab createNewInstance(IMessageEditorController controller, boolean editable) {
126-
return new ParamsViewTab(controller, editable);
130+
final ParamsViewTab tab = new ParamsViewTab(controller, editable);
131+
getCallbacks().customizeUiComponent(tab);
132+
return tab;
127133
}
128134
};
129135

130136
private final IMessageEditorTabFactory requestJSONTab = new IMessageEditorTabFactory() {
131137
@Override
132138
public IMessageEditorTab createNewInstance(IMessageEditorController controller, boolean editable) {
133-
return new JSONViewTab(controller, editable, true);
139+
final JSONViewTab tab = new JSONViewTab(controller, editable, true);
140+
getCallbacks().customizeUiComponent(tab);
141+
return tab;
134142
}
135143
};
136144

src/burp/release.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# YaguraExtender build xml properties
22

33
# version
4-
version=1.7.33.0
4+
version=1.7.34.0
55

66
#lib
77
asciidoctor-version=1.5.6

src/yagura/external/FormatUtil.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,23 @@ public static boolean isURL(String plainURL) {
3636

3737
public static boolean isXML(String plainXML) {
3838
Matcher m = XML_TYPE.matcher(plainXML);
39-
return m.find();
39+
return m.lookingAt();
4040
}
4141

4242
public static boolean isJSON(String plainJson) {
43-
// Matcher m = JSON_TYPE.matcher(plainJson);
44-
// if (m.matches()) {
43+
Matcher m = JSON_TYPE.matcher(plainJson);
44+
if (m.lookingAt()) {
4545
try {
4646
JsonUtil.prettyJSON(plainJson, false);
4747
return true;
4848
}
4949
catch (IOException e) {
5050
return false;
5151
}
52-
// }
53-
// else {
54-
// return false;
55-
// }
52+
}
53+
else {
54+
return false;
55+
}
5656
}
5757

5858
public static String prettyXML(String plainXML) throws IOException {

src/yagura/external/TransUtil.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public enum EncodePattern {
7171
private final static Pattern PTN_QUOTEDPRINTABLE = Pattern.compile("=([0-9a-fA-F]{2})");
7272
private final static Pattern PTN_PUNYCODE = Pattern.compile("xn--[0-9a-zA-Z_\\.]+");
7373
private final static Pattern PTN_URL = Pattern.compile("%([0-9a-fA-F]{2})");
74-
private final static Pattern PTN_HTML = Pattern.compile("(&#(\\d+);)|(&#[xX]([0-9a-fA-F]+);)");
74+
private final static Pattern PTN_HTML = Pattern.compile("(&#(\\d+);)|(&(lt|gt|amp|quot);)|(&#[xX]([0-9a-fA-F]+);)");
7575
private final static Pattern PTN_URL_UNICODE = Pattern.compile("%[uU]([0-9a-fA-F]{4})");
7676
private final static Pattern PTN_UNICODE = Pattern.compile("\\\\[uU]([0-9a-fA-F]{4})");
7777
private final static Pattern PTN_BYTE_HEX = Pattern.compile("\\\\[xX]([0-9a-fA-F]{2})");
@@ -162,7 +162,7 @@ public static String toSmartDecode(String value, TransUtil.EncodePattern encodeP
162162
applyCharset = guessCode;
163163
decode = TransUtil.decodeUrl(value, guessCode);
164164
} else {
165-
decode = TransUtil.decodeUrl(value, "8859_1");
165+
decode = TransUtil.decodeUrl(value, StandardCharsets.ISO_8859_1.name());
166166
}
167167
}
168168
break;
@@ -181,7 +181,7 @@ public static String toSmartDecode(String value, TransUtil.EncodePattern encodeP
181181
applyCharset = guessCode;
182182
decode = toByteDecode(value, applyCharset);
183183
} else {
184-
decode = toByteDecode(value, "8859_1");
184+
decode = toByteDecode(value, StandardCharsets.ISO_8859_1.name());
185185
}
186186
break;
187187
}
@@ -191,7 +191,7 @@ public static String toSmartDecode(String value, TransUtil.EncodePattern encodeP
191191
applyCharset = guessCode;
192192
decode = toByteDecode(value, applyCharset);
193193
} else {
194-
decode = toByteDecode(value, "8859_1");
194+
decode = toByteDecode(value, StandardCharsets.ISO_8859_1.name());
195195
}
196196
break;
197197
}
@@ -202,7 +202,7 @@ public static String toSmartDecode(String value, TransUtil.EncodePattern encodeP
202202
applyCharset = guessCode;
203203
decode = toUudecode(value, guessCode);
204204
} else {
205-
decode = toUudecode(value, "8859_1");
205+
decode = toUudecode(value, StandardCharsets.ISO_8859_1.name());
206206
}
207207
}
208208
break;
@@ -213,7 +213,7 @@ public static String toSmartDecode(String value, TransUtil.EncodePattern encodeP
213213
applyCharset = guessCode;
214214
decode = toUnQuotedPrintable(value, guessCode);
215215
} else {
216-
decode = toUnQuotedPrintable(value, "8859_1");
216+
decode = toUnQuotedPrintable(value, StandardCharsets.ISO_8859_1.name());
217217
}
218218
}
219219
break;
@@ -230,7 +230,7 @@ public static String toSmartDecode(String value, TransUtil.EncodePattern encodeP
230230
applyCharset = guessCode;
231231
decode = ConvertUtil.toBase64Decode(value, guessCode);
232232
} else {
233-
decode = ConvertUtil.toBase64Decode(value, "8859_1");
233+
decode = ConvertUtil.toBase64Decode(value, StandardCharsets.ISO_8859_1.name());
234234
}
235235
}
236236
break;
@@ -366,7 +366,7 @@ public static String toUSASCII(String str, String enc)
366366
}
367367
}
368368
String ustr = new String(chars);
369-
return new String(ustr.getBytes("8859_1"), enc);
369+
return new String(ustr.getBytes(StandardCharsets.ISO_8859_1), enc);
370370
}
371371

372372
public static int getCharCode(String str, String enc)
@@ -1218,7 +1218,7 @@ public static void hexDump(byte[] output, PrintStream out) {
12181218
hexmod[j++] = hexs[i];
12191219
if (i > 0 && (j - 1) % 16 == 0) {
12201220
System.arraycopy(output, row * 16, partout, 0, partout.length);
1221-
String hexText = new String(partout, "8859_1");
1221+
String hexText = new String(partout, StandardCharsets.ISO_8859_1.name());
12221222
hexmod[0] = fmtPosition.format(row);
12231223
hexmod[17] = hexText;
12241224
for (int x = 0; x < hexmod.length; x++) {
@@ -1237,7 +1237,7 @@ public static void hexDump(byte[] output, PrintStream out) {
12371237
*/
12381238
if ((j - 1) > 0) {
12391239
System.arraycopy(output, row * 16, partout, 0, j - 1);
1240-
String hexText = new String(partout, "8859_1");
1240+
String hexText = new String(partout, StandardCharsets.ISO_8859_1.name());
12411241
hexmod[0] = fmtPosition.format(row);
12421242
hexmod[17] = hexText;
12431243
for (int x = 0; x < j; x++) {

src/yagura/view/HexViewTab.form

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,82 +59,82 @@
5959
<Editor/>
6060
<Renderer/>
6161
</Column>
62-
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
62+
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false">
6363
<Title/>
6464
<Editor/>
6565
<Renderer/>
6666
</Column>
67-
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
67+
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false">
6868
<Title/>
6969
<Editor/>
7070
<Renderer/>
7171
</Column>
72-
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
72+
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false">
7373
<Title/>
7474
<Editor/>
7575
<Renderer/>
7676
</Column>
77-
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
77+
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false">
7878
<Title/>
7979
<Editor/>
8080
<Renderer/>
8181
</Column>
82-
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
82+
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false">
8383
<Title/>
8484
<Editor/>
8585
<Renderer/>
8686
</Column>
87-
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
87+
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false">
8888
<Title/>
8989
<Editor/>
9090
<Renderer/>
9191
</Column>
92-
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
92+
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false">
9393
<Title/>
9494
<Editor/>
9595
<Renderer/>
9696
</Column>
97-
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
97+
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false">
9898
<Title/>
9999
<Editor/>
100100
<Renderer/>
101101
</Column>
102-
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
102+
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false">
103103
<Title/>
104104
<Editor/>
105105
<Renderer/>
106106
</Column>
107-
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
107+
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false">
108108
<Title/>
109109
<Editor/>
110110
<Renderer/>
111111
</Column>
112-
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
112+
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false">
113113
<Title/>
114114
<Editor/>
115115
<Renderer/>
116116
</Column>
117-
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
117+
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false">
118118
<Title/>
119119
<Editor/>
120120
<Renderer/>
121121
</Column>
122-
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
122+
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false">
123123
<Title/>
124124
<Editor/>
125125
<Renderer/>
126126
</Column>
127-
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
127+
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false">
128128
<Title/>
129129
<Editor/>
130130
<Renderer/>
131131
</Column>
132-
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
132+
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false">
133133
<Title/>
134134
<Editor/>
135135
<Renderer/>
136136
</Column>
137-
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
137+
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="false">
138138
<Title/>
139139
<Editor/>
140140
<Renderer/>
@@ -147,7 +147,7 @@
147147
</TableColumnModel>
148148
</Property>
149149
<Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor">
150-
<TableHeader reorderingAllowed="true" resizingAllowed="true"/>
150+
<TableHeader reorderingAllowed="false" resizingAllowed="true"/>
151151
</Property>
152152
</Properties>
153153
</Component>

0 commit comments

Comments
 (0)