安全狗POST SQL注入.

yzmm
632 阅读

不知为何不拦POST的/*!XXX*/ id=1 and 1=2 union select 1,user,password from mysql.user limit 0,1 id=1200000 /*!union*//*!select*/(1),user,password from mysql.user limit 0,1 <?php $conn = mysql_connect(&quot...

阅读全文

javaweb 获取请求文件绝对路径问题-getServletPath();

yzmm
887 阅读

在之前获取绝对路径用了WEB路径+RequestURI:jsp获取真实或虚拟文件绝对路径,发现这种做法麻烦而又不准确。当请求http://xxx.com/test/假设test下有index.jsp那么request.getRequestURI()是取不到index.jsp的请求的。这时候最好使用:request.getServletPath(),此方法可以获取请求的servlet路径。 getS...

阅读全文

Java获取本地IP异常问题

yzmm
621 阅读

获取本地IP往往只需要:InetAddress.getLocalHost().getHostAddress()就行了,但是今天在测试的时候发现这个方法并不怎么靠谱。服务器配置有问题导致无法通过主机名获取IP地址从而抛出了一个UnknowHostException。临时的程序解决办法是假设getLocalHost异常则用NetworkInterface方法获取IP: public InetAddre...

阅读全文

Struts2再曝高危漏洞(S2-020补丁绕过)

yzmm
613 阅读

之前S2-020漏洞利用方式见drops:Struts2 Tomcat class.classLoader.resources.dirContext.docBase赋值造成的DoS及远程代码执行利用! 暂时不清楚到底是谁发出来的补丁绕过。之前 @Nebula 发的Tomcat: http://127.0.0.1/s/example/HelloWorld.action?class.classLoad...

阅读全文

Java 后门-unicode编码

yzmm
733 阅读

Java代码默认可以直接全是unicode编码: 假设有如下未编码Java代码: public class Test { public static void main(String[] args) { System.out.println(1); } } 编码后的Java代码: \u0070\u0075\u0062\u006c\u0069\u0063 \u0063\u006c\u0061\u00...

阅读全文

Homebrew OS X 或缺的软件包管理器

yzmm
755 阅读

http://brew.sh/ 在 OS X 中找不到您想要的软件?Homebrew 给你所需。 $ brew install wget Homebrew 将软件包分装到单独的目录,然后 symlink 到/usr/local 中。 $ cd /usr/local $ find Cellar Cellar/wget/1.15 Cellar/wget/1.15/bin/wget Cellar/wge...

阅读全文