fix checkSSRF

This commit is contained in:
JoyChou
2017-09-05 21:22:07 +08:00
parent 62b4b69dc7
commit 134c127cac
2 changed files with 8 additions and 11 deletions

View File

@@ -17,8 +17,6 @@
security checkUrl = new security();
String[] urlWList = {"joychou.com", "joychou.me"};
Boolean ret = checkUrl.checkUrlWlist("http://test.joychou.me", urlWList);
System.out.println(ret);
```
## SSRF
@@ -36,11 +34,9 @@ JAVA默认dns请求会有30s的缓存所以默认不存在dns rebind问题。
### 验证代码
如果是内网IP返回false表示checkSSRF不通过否则返回true即合法返回true。
URL只支持HTTP协议。
```java
security checkUrl = new security();
ret = checkUrl.checkSSRF("http://127.0.0.1");
System.out.println(ret);
```