File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed
src/main/java/org/joychou/controller Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 221221 <orderEntry type =" library" name =" Maven: commons-beanutils:commons-beanutils:1.9.4" level =" project" />
222222 <orderEntry type =" library" name =" Maven: io.jsonwebtoken:jjwt:0.9.1" level =" project" />
223223 <orderEntry type =" library" name =" Maven: com.auth0:java-jwt:4.0.0" level =" project" />
224+ <orderEntry type =" library" name =" Maven: cn.hutool:hutool-all:5.8.10" level =" project" />
224225 </component >
225226</module >
Original file line number Diff line number Diff line change 300300 <version >4.0.0</version >
301301 </dependency >
302302
303+ <dependency >
304+ <groupId >cn.hutool</groupId >
305+ <artifactId >hutool-all</artifactId >
306+ <version >5.8.10</version >
307+ </dependency >
308+
303309 </dependencies >
304310
305311 <dependencyManagement >
Original file line number Diff line number Diff line change 11package org .joychou .controller ;
22
3+ import cn .hutool .http .HttpUtil ;
34import org .joychou .security .SecurityUtil ;
45import org .joychou .security .ssrf .SSRFException ;
56import org .joychou .service .HttpService ;
@@ -273,7 +274,7 @@ public String HttpSyncClients(@RequestParam("url") String url) {
273274
274275
275276 /**
276- * http://127.0.0.1:8080/ssrf/restTemplate/vuln ?url=http://www.baidu.com <p>
277+ * http://127.0.0.1:8080/ssrf/restTemplate/vuln1 ?url=http://www.baidu.com <p>
277278 * Only support HTTP protocol. <p>
278279 * Redirects: GET HttpMethod follow redirects by default, other HttpMethods do not follow redirects<p>
279280 * User-Agent: Java/1.8.0_102 <p>
@@ -294,5 +295,18 @@ public String RestTemplateUrl(String url){
294295 }
295296
296297
298+ /**
299+ * http://127.0.0.1:8080/ssrf/hutool/vuln?url=http://www.baidu.com <p>
300+ * UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36 Hutool<p>
301+ * Redirects: Do not follow redirects <p>
302+ *
303+ * @param url url
304+ * @return contents of url
305+ */
306+ @ GetMapping ("/hutool/vuln" )
307+ public String hutoolHttp (String url ){
308+ return HttpUtil .get (url );
309+ }
310+
297311
298312}
You can’t perform that action at this time.
0 commit comments