File tree Expand file tree Collapse file tree 1 file changed +0
-33
lines changed
src/main/java/org/joychou/controller Expand file tree Collapse file tree 1 file changed +0
-33
lines changed Original file line number Diff line number Diff line change @@ -26,39 +26,6 @@ public class SSRF {
2626 private static Logger logger = LoggerFactory .getLogger (SSRF .class );
2727
2828
29- /**
30- * http://localhost:8080/ssrf/urlConnection/vuln?url=file:///etc/passwd
31- *
32- * The default setting of followRedirects is true.
33- * Protocol: file ftp mailto http https jar netdoc
34- * UserAgent is Java/1.8.0_102.
35- */
36- @ RequestMapping (value = "/urlConnection/vuln" , method = {RequestMethod .POST , RequestMethod .GET })
37- public String URLConnectionVuln (String url ) {
38- return HttpUtils .URLConnection (url );
39- }
40-
41-
42- @ GetMapping ("/urlConnection/sec" )
43- public String URLConnectionSec (String url ) {
44-
45- // Decline not http/https protocol
46- if (!SecurityUtil .isHttp (url )) {
47- return "[-] SSRF check failed" ;
48- }
49-
50- try {
51- SecurityUtil .startSSRFHook ();
52- return HttpUtils .URLConnection (url );
53- } catch (SSRFException | IOException e ) {
54- return e .getMessage ();
55- } finally {
56- SecurityUtil .stopSSRFHook ();
57- }
58-
59- }
60-
61-
6229 /**
6330 * The default setting of followRedirects is true.
6431 * UserAgent is Java/1.8.0_102.
You can’t perform that action at this time.
0 commit comments