header.php文件
<?php
echo 'this is example '.$adv['name'].' , this is another.....';
main.php文件
<?php
if(preg_match('/$adv[(.*?)]/',file_get_contents('header.php'),$itext)){
echo $itext[1].'';
}
显示为空
我有一个包含一些特殊字符及其HTML实体名称的CSV文件
例如:htm.csv
À,À
Á,Á
Â,Â
Ã,Ã
É,É
Ê,Ê
Í,Í
Ó,Ó
Ô,Ô
Õ,Õ
我有许多.php文件,其中包含这些特殊字符。我已经写了一个shell脚本
#!/bin/bash
IFS=","
while read orig html
do
for fl in *.php; do
我正在尝试查找字符串中包含<?、<?php或?>等字符的特殊字符。下面的代码可以在字符串中的任何位置找到"php“,无论它是PHP、php还是phpaPHPa。
<?php
$searchfor = "php";
$string = "PHP is the web scripting language of choice.";
if (preg_match("/".$searchfor."/i", $string)) {
echo "A match was found.";
我正在使用preg_match_all,尝试匹配:
[<? or <?php]
[any amount of space here, at least one, may be newline]
[legendcool]
[any amount of space]
[(] return whatever is in here [)]
[any amount of space]
[?>]
到目前为止,我有这样的想法:
index.php
$the_prophecy = file_get_contents("secret.php");
preg_match_all(
我们有一个人利用我们的网站,并给自己的资金,以作出购买,而不实际存款任何钱。当运行Vega扫描器查找漏洞时,几乎所有的页面都打开了shell注入漏洞。
该程序说,以下两个请求(基本上是在任何页面上,因为这个PHP代码在header.php中)使我们容易受到攻击。
GET /web-hosting.php?cid=1`true`
GET /web-hosting.php?cid=1"`true`"
GET /style.css?1=null`true`
GET /style.css?1=null"`true`"
在查看header.php代码时,我注意到链接的CS