网站开发与移动开发

博客园 首页 新随笔 管理

2009年10月21日 #

摘要: meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta http-equiv="Content-Language" content="zh-CN" /> <meta content="all" name="robots" /> <meta name="author" content="盛飞, SenFe" 阅读全文
posted @ 2009-10-21 22:24 txf2004 阅读(166) 评论(0) 推荐(0) 编辑

摘要: $ip = "1.1.1.255".chr(0)."haha"; if(ereg("^[0-9]{1,3}/.[0-9]{1,3}/.[0-9]{1,3}/.[0-9]{1,3}$",$ip)) { echo $ip; } else { echo "unknown"; } 这个ereg正则限制了$ip的数据为xxx.xxx.xxx.xxx这样的形式,表面上看上面的代码应该输出"unknown",而实际却输出了"1.1.1.255haha",因为ereg函数存在NULL截断漏洞 阅读全文
posted @ 2009-10-21 22:21 txf2004 阅读(185) 评论(0) 推荐(0) 编辑