{"id":407,"date":"2021-05-11T10:18:18","date_gmt":"2021-05-11T02:18:18","guid":{"rendered":"https:\/\/wp.dj47.top\/?p=407"},"modified":"2021-10-20T16:11:03","modified_gmt":"2021-10-20T08:11:03","slug":"%e8%87%aa%e5%ae%9a%e4%b9%89%e5%8a%a0%e5%af%86%e5%87%bd%e6%95%b0%e5%8f%8axss%e8%bf%87%e6%bb%a4","status":"publish","type":"post","link":"https:\/\/www.djlog.cn\/?p=407","title":{"rendered":"PHP\u81ea\u5b9a\u4e49XSS\u8fc7\u6ee4"},"content":{"rendered":"<pre class=\"language-php\"><code>\/\/xss\u8fc7\u6ee4\r\nfunction strFilter($restr){\r\n    $str = $restr;\r\n    $str = str_ireplace('`', '', $str);\r\n    $str = str_ireplace('\u00b7', '', $str);\r\n    $str = str_ireplace('~', '', $str);\r\n    $str = str_ireplace('!', '', $str);\r\n    $str = str_ireplace('\uff01', '',$str);\r\n    $str = str_ireplace('@', '', $str);\r\n    $str = str_ireplace('#', '', $str);\r\n    $str = str_ireplace('$', '', $str);\r\n    $str = str_ireplace('\uffe5', '',$str);\r\n    $str = str_ireplace('%', '', $str);\r\n    $str = str_ireplace('^', '', $str);\r\n    $str = str_ireplace('\u2026\u2026', '',$str);\r\n    $str = str_ireplace('&amp;', '', $str);\r\n    $str = str_ireplace('*', '', $str);\r\n    $str = str_ireplace('(', '', $str);\r\n    $str = str_ireplace(')', '', $str);\r\n    $str = str_ireplace('\uff08', '',$str);\r\n    $str = str_ireplace('\uff09', '',$str);\r\n    $str = str_ireplace('-', '', $str);\r\n    $str = str_ireplace('_', '', $str);\r\n    $str = str_ireplace('\u2014\u2014', '',$str);\r\n    $str = str_ireplace('+', '', $str);\r\n    $str = str_ireplace('=', '', $str);\r\n    $str = str_ireplace('|', '', $str);\r\n    $str = str_ireplace('\\\\', '',$str);\r\n    $str = str_ireplace('[', '', $str);\r\n    $str = str_ireplace(']', '', $str);\r\n    $str = str_ireplace('\u3010', '',$str);\r\n    $str = str_ireplace('\u3011', '',$str);\r\n    $str = str_ireplace('{', '', $str);\r\n    $str = str_ireplace('}', '', $str);\r\n    $str = str_ireplace(';', '', $str);\r\n    $str = str_ireplace('\uff1b', '',$str);\r\n    $str = str_ireplace(':', '', $str);\r\n    $str = str_ireplace('\uff1a', '',$str);\r\n    $str = str_ireplace('\\'', '',$str);\r\n    $str = str_ireplace('\"', '', $str);\r\n    $str = str_ireplace('\u201c', '', $str);\r\n    $str = str_ireplace('\u201d', '', $str);\r\n    $str = str_ireplace(',', '', $str);\r\n    $str = str_ireplace('\uff0c', '',$str);\r\n    $str = str_ireplace('&lt;', '', $str);\r\n    $str = str_ireplace('&gt;', '', $str);\r\n    $str = str_ireplace('\u300a', '',$str);\r\n    $str = str_ireplace('\u300b', '',$str);\r\n    $str = str_ireplace('.', '', $str);\r\n    $str = str_ireplace('\u3002', '',$str);\r\n    $str = str_ireplace('\/', '', $str);\r\n    $str = str_ireplace('\u3001', '',$str);\r\n    $str = str_ireplace('?', '', $str);\r\n    $str = str_ireplace('\uff1f', '',$str);\r\n    \/\/\u9632sql\u9632\u6ce8\u5165\u4ee3\u7801\u7684\u8fc7\u6ee4\u65b9\u6cd5\r\n    $str = str_ireplace('or','',$str);\r\n    $str = str_ireplace('and','',$str);\r\n    $str = str_ireplace('chr','',$str);\r\n    $str = str_ireplace('mid','',$str);\r\n    $str = str_ireplace('char','',$str);\r\n    $str = str_ireplace('count','',$str);\r\n    $str = str_ireplace('select','',$str);\r\n    $str = str_ireplace('create','',$str);\r\n    $str = str_ireplace('delete','',$str);\r\n    $str = str_ireplace('insert','',$str);\r\n    $str = str_ireplace('update','',$str);\r\n    $str = str_ireplace('master','',$str);\r\n    $str = str_ireplace('execute','',$str);\r\n    $str = str_ireplace('declare','',$str);\r\n    $str = str_ireplace('truncate','',$str);\r\n    return $str;\r\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/\/xss\u8fc7\u6ee4 function strFilter($restr){ $str = $restr; $str [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"class_list":["post-407","post","type-post","status-publish","format-standard","hentry","category-php"],"_links":{"self":[{"href":"https:\/\/www.djlog.cn\/index.php?rest_route=\/wp\/v2\/posts\/407","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.djlog.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.djlog.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.djlog.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.djlog.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=407"}],"version-history":[{"count":0,"href":"https:\/\/www.djlog.cn\/index.php?rest_route=\/wp\/v2\/posts\/407\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.djlog.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.djlog.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.djlog.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}