php函数漏洞

1、ereg — 正则表达式匹配

  此函数遇 %00 截断。

<?php
$a = $_GET['pwd'];
var_dump(ereg ("^[0-9]+$", $a));
?>

  访问:http://localhost/index.php?pwd=123%00abc

 2、sha1 — 计算字符串的 sha1 散列值

参数要求是 string,传入数组则返回 NULL。

var_dump(sha1(array(1,2))); //NULL

  

原文地址:https://www.cnblogs.com/natian-ws/p/7160277.html