Exemple #1
0
        if (preg_match("/" . $ArrFiltReq . "/is", $StrFiltValue) == 1) {
            //slog("<br><br>操作IP: ".$_SERVER["REMOTE_ADDR"]."<br>操作时间: ".strftime("%Y-%m-%d %H:%M:%S")."<br>操作页面:".$_SERVER["PHP_SELF"]."<br>提交方式: ".$_SERVER["REQUEST_METHOD"]."<br>提交参数: ".$StrFiltKey."<br>提交数据: ".$StrFiltValue);
            print '<div style=\\"position:fixed;top:0px;width:100%;height:100%;background-color:white;color:green;font-weight:bold;border-bottom:5px solid #999;\\"><br>' . $type . '您的提交带有不合法参数,谢谢合作!</div>';
            exit;
        }
        if (preg_match("/" . $ArrFiltReq . "/is", $StrFiltKey) == 1) {
            //slog("<br><br>操作IP: ".$_SERVER["REMOTE_ADDR"]."<br>操作时间: ".strftime("%Y-%m-%d %H:%M:%S")."<br>操作页面:".$_SERVER["PHP_SELF"]."<br>提交方式: ".$_SERVER["REQUEST_METHOD"]."<br>提交参数: ".$StrFiltKey."<br>提交数据: ".$StrFiltValue);
            print '<div style=\\"position:fixed;top:0px;width:100%;height:100%;background-color:white;color:green;font-weight:bold;border-bottom:5px solid #999;\\"><br>' . $type . '您的提交带有不合法参数,谢谢合作!</div>';
            exit;
        }
    }
}
//$ArrPGC=array_merge($_GET,$_POST,$_COOKIE);
if (isset($_GET)) {
    foreach ($_GET as $key => $value) {
        if (strExist($value, '>') || strExist($value, 'script') || strExist($key, ';') && !strExist($key, '404;') || strExist($key, 'put') && $key != 'inputfinish' || strExist($value, 'eval') || strExist($value, '"') || strExist($value, "'")) {
            exit('not allowed words included:)');
        }
        StopAttack($key, $value, $getfilter, 'get');
    }
}
if (isset($_POST)) {
    if (!isset($_POST['except'])) {
        foreach ($_POST as $key => $value) {
            StopAttack($key, $value, $postfilter, 'post');
        }
    }
}
if (isset($_COOKIE)) {
    foreach ($_COOKIE as $key => $value) {
        StopAttack($key, $value, $cookiefilter, 'cookie');
Exemple #2
0
        if (preg_match("/" . $ArrFiltReq . "/is", $StrFiltValue) == 1) {
            //slog("<br><br>操作IP: ".$_SERVER["REMOTE_ADDR"]."<br>操作时间: ".strftime("%Y-%m-%d %H:%M:%S")."<br>操作页面:".$_SERVER["PHP_SELF"]."<br>提交方式: ".$_SERVER["REQUEST_METHOD"]."<br>提交参数: ".$StrFiltKey."<br>提交数据: ".$StrFiltValue);
            print '<div style=\\"position:fixed;top:0px;width:100%;height:100%;background-color:white;color:green;font-weight:bold;border-bottom:5px solid #999;\\"><br>' . $type . '小猪CMS演示站不允许提交html、script等代码类数据,系统在您自己的服务器上不会碰到类似问题,请测试其他功能,感谢支持。!</div>';
            exit;
        }
        if (preg_match("/" . $ArrFiltReq . "/is", $StrFiltKey) == 1) {
            //slog("<br><br>操作IP: ".$_SERVER["REMOTE_ADDR"]."<br>操作时间: ".strftime("%Y-%m-%d %H:%M:%S")."<br>操作页面:".$_SERVER["PHP_SELF"]."<br>提交方式: ".$_SERVER["REQUEST_METHOD"]."<br>提交参数: ".$StrFiltKey."<br>提交数据: ".$StrFiltValue);
            print '<div style=\\"position:fixed;top:0px;width:100%;height:100%;background-color:white;color:green;font-weight:bold;border-bottom:5px solid #999;\\"><br>' . $type . '小猪CMS演示站不允许提交html、script等代码类数据,系统在您自己的服务器上不会碰到类似问题,请测试其他功能,感谢支持</div>';
            exit;
        }
    }
}
//$ArrPGC=array_merge($_GET,$_POST,$_COOKIE);
if (isset($_GET)) {
    foreach ($_GET as $key => $value) {
        if (strExist($value, '>') || strExist($value, '<script') || strExist($key, ';') && !strExist($key, '404;') || strExist($key, 'put') && !strExist($key, 'input') || strExist($value, 'eval') || strExist($value, '"') || strExist($value, "'")) {
            //exit('not allowed words included:)');
        }
        StopAttack($key, $value, $getfilter, 'get');
    }
}
if (isset($_POST)) {
    if (!isset($_POST['except'])) {
        foreach ($_POST as $key => $value) {
            StopAttack($key, $value, $postfilter, 'post');
        }
    }
}
if (isset($_COOKIE)) {
    foreach ($_COOKIE as $key => $value) {
        StopAttack($key, $value, $cookiefilter, 'cookie');