donqo88682 2017-07-29 19:39
浏览 64

警告:preg_match():第76行的E:\ xampp \ htdocs \ forum \ hacker.php中的未知修饰符'/'[重复]

This question already has an answer here:

Alright, I have now a problem on file hacker.php

<?php

function post_security($copyright , $activate){

if($copyright == "razor_forum"){

if ($activate == true){

if ($_SERVER["REQUEST_METHOD"] == "POST"){

$y = explode("/",$GLOBALS["HTTP_REFERER"]);

$x = explode("/",$GLOBALS["HTTP_HOST"]);

if ($y[2] != $x[0]){

die("");

}

}

}

}

}

function xss_security($copyright , $activate){

if($copyright == "razor_forum"){

if ($activate == true){

foreach($_GET as $xss_get){

if ((preg_match("/<[^>]script\"?[^>]*>/", $xss_get)) or (preg_match("/<[^>]object\"?[^>]*>/", $xss_get)) or (preg_match("/<[^>]iframe\"?[^>]*>/", $xss_get)) or (preg_match("/<[^>]applet\"?[^>]*>/", $xss_get)) or (preg_match("/<[^>]meta\"?[^>]*>/", $xss_get)) or (preg_match("/<[^>]style\"?[^>]*>/", $xss_get)) or (preg_match("/<[^>]form\"?[^>]*>/", $xss_get)) or (preg_match("/<[^>]img\"?[^>]*>/", $xss_get))){

die("");

}

}

unset($xss_get);

}

}

}

function url_security($copyright , $activate){

if($copyright == "razor_forum"){

if ($activate == true){

foreach($_GET as $url){

if ((preg_match("/<[^>]script\"?[^>]*>/", $url)) or (preg_match("/<[^>]object\"?[^>]*>/", $url)) or (preg_match("/<[^>]iframe\"?[^>]*>/", $url)) or (preg_match("/<[^>]applet\"?[^>]*>/", $url)) or (preg_match("/<[^>]meta\"?[^>]*>/", $url)) or (preg_match("/<[^>]style\"?[^>]*>/", $url)) or (preg_match("/<[^>]form\"?[^>]*>/", $url)) or (preg_match("/<[^>]img\"?[^>]*>/", $url)) or (preg_match("/<[^>]noscript\"?[^>]*>/", $url)) or (preg_match("/<[^>]applet\"?[^>]*>/", $url)) or (preg_match("/<[^>]vbscript\"?[^>]*>/", $url)) or (preg_match("/<[^>]embed\"?[^>]*>/", $url)) or (preg_match("/<[^>]frame\"?[^>]*>/", $url)) or (preg_match("/<[^>]style\"?[^>]*>/", $url)) or (preg_match("/<[^>]frameset\"?[^>]*>/", $url)) or (preg_match("/<[^>]html\"?[^>]*>/", $url)) or (preg_match("/<[^>]body\"?[^>]>/", $url)) or (preg_match("/<[^>]!DOCTYPE*\"?[^>]*>/", $url)) or (preg_match("/<[^>]form\"?[^>]*>/", $url)) or (preg_match("/<[^>]link\"?[^>]*>/", $url)) or (preg_match("/<[^>]title\"?[^>]*>/", $url)) or (preg_match("/<[^>]bgsound\"?[^>]*>/", $url)) or (preg_match("/<[^>]layer\"?[^>]*>/", $url)) or (preg_match("/<[^>]XSS\"?[^>]*>/", $url)) or (preg_match("/<[^>]background\"?[^>]*>/", $url)) or (preg_match("/<[^>]mocha\"?[^>]*>/", $url)) or (preg_match("/<[^>]livescript\"?[^>]>/", $url)) or (preg_match("/([^>]\"?[^)]*)/", $url)) or (preg_match("/javascript/", $url)) or (preg_match("/onmouseover/", $url)) or (preg_match("/onmouseout/", $url)) or (preg_match("/document.write/", $url)) or (preg_match("/.php/", $url)) or (preg_match("/.txt/", $url)) or (preg_match("/.cgi/", $url)) or (preg_match("/.xml/", $url)) or (preg_match("/cmd/", $url)) or (preg_match("/.js/", $url)) or (preg_match("/src=\"/", $url)) or (preg_match("/http:///", $url)) or (preg_match("/\"/", $url))){

exit(header("location: customavatars/.php"));

}

}

unset($url);

}

}

}

function sql_security($copyright , $activate){

if($copyright == "razor_forum"){

if ($activate == true){

foreach ($_GET as $Sql_get){

if ((preg_match("/select/", $Sql_get)) or (preg_match("/union/", $Sql_get)) or (preg_match("/%/", $Sql_get))){

die("");

}

}

unset($Sql_get);

}

}

}

function cracker_security($copyright , $activate){

if($copyright == "razor_forum"){

if ($activate == true){

$crack_Track = $_SERVER["QUERY_STRING"];

$ct_Rules = array('chr(', 'chr=', 'chr%20', '%20chr', 'wget%20', '%20wget', 'wget(','cmd=', '%20cmd', 'cmd%20', 'rush=', '%20rush', 'rush%20','union%20', '%20union', 'union(', 'union=', 'echr(', '%20echr', 'echr%20', 'echr=','esystem(', 'esystem%20', 'cp%20', '%20cp', 'cp(', 'mdir%20', '%20mdir', 'mdir(','mcd%20', 'mrd%20', 'rm%20', '%20mcd', '%20mrd', '%20rm','mcd(', 'mrd(', 'rm(', 'mcd=', 'mrd=', 'mv%20', 'rmdir%20', 'mv(', 'rmdir(','chmod(', 'chmod%20', '%20chmod', 'chmod(', 'chmod=', 'chown%20', 'chgrp%20', 'chown(', 'chgrp(','locate%20', 'grep%20', 'locate(', 'grep(', 'diff%20', 'kill%20', 'kill(', 'killall','passwd%20', '%20passwd', 'passwd(', 'telnet%20', 'vi(', 'vi%20','insert%20into', 'select%20', 'nigga(', '%20nigga', 'nigga%20', 'fopen', 'fwrite', '%20like', 'like%20','$_request', '$_get', '$request', '$get', '.system', 'HTTP_server1', '&aim', '%20getenv', 'getenv%20','new_password', '/etc/password','/etc/shadow', '/etc/groups', '/etc/gshadow','HTTP_USER_AGENT', 'HTTP_HOST', '/bin/ps', 'wget%20', 'uname\x20-a', '/usr/bin/id','/bin/print', '/bin/kill', '/bin/', '/chgrp', '/chown', '/usr/bin', 'g++', 'bin/python','bin/tclsh', 'bin/nasm', 'perl%20', 'traceroute%20', 'ping%20', '.pl', '/usr/X11R6/bin/xterm', 'lsof%20','/bin/mail', '.conf', 'motd%20', 'HTTP/1.', '.inc.php', 'config.php', 'cgi-', '.eml','file://', 'window.open', '', 'javascript://','img src', 'img%20src','.jsp','ftp.exe','xp_enumdsn', 'xp_availablemedia', 'xp_filelist', 'xp_cmdshell', 'nc.exe', '.htpasswd','servlet', '/etc/passwd', 'wwwacl', '~root', '~ftp', '.js', '.jsp', '.history','bash_history', '.bash_history', '~nobody', 'server-info', 'server-status', 'reboot%20', 'halt%20','powerdown%20', '/home/ftp', '/home/www', 'secure_site, ok', 'chunked', 'org.apache', '/servlet/con','', 'sql=','global', 'global', 'global[', 'server', 'server', 'server[', 'phpadmin','root_path', 'globals', 'globals', 'globals[', 'ISO-8859-1', 'http://www.google.de/search', '?hl=','.txt', '.exe', 'union','google.de/search', 'yahoo.de', 'lycos.de', 'fireball.de', 'ISO-', 'document.cookie', 'Cscript', 'C/script' , '"' , "'");

$crack_Track = strtolower($crack_Track);

$checkworm = str_replace($ct_Rules, "*", $crack_Track);

if($crack_Track != $checkworm){

$temp = @$_SERVER["argv"];

$temp = @array_Pop($temp);

if($temp != ""){$_SERVER["PHP_SELF"] .= "?" . $temp;}

unset($temp);

unset($crack_Track , $ct_rules , $checkworm);

exit(header("location: error.php"));

}

}

}

}

?>

</div>
  • 写回答

1条回答 默认 最新

  • dousi6087 2017-07-29 19:48
    关注

    The problem is in:

    preg_match("/http:///", $url)
    

    The slash character (/) is used as delimiter in regex. In order to use it inside the regex you have to escape it (\/).

    Or, even better, you can use a different delimiter; there are several alternatives allowed:

    preg_match('#http://#', $url)
    

    won't trigger any error.

    Read about Perl Compatible Regular Expressions in PHP.

    评论

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?