是否有可能通過從另一主機發送PHP變量來攻擊網站?例如:通過從另一主機發送PHP變量進行黑客攻擊
我有一個文件secure_content.php:
<?php
if($fgmembersite->Login()) //placed at the top to avoid the warning: headers already sent
{
$login = TRUE;
}
//intentionally removed {else $login === FALSE}
// echo some contents
if ($login === TRUE)
{
//echo secure data
}
else
{
echo "You are not authorised to view this content";
}
?>
而且攻擊者有一個名爲在他的網絡服務器上:hack.php
<?php
$login = TRUE;
require_once "http://mywebsite.com/secure_content.php";
?>
- 是否有可能黑客查看安全內容?
- 如何避免使用include/require從其他web服務器處理我們的腳本?
不!除非你使用'eval'函數! – undone
不應該是'$ login = TRUE;'而不是'$ login === TRUE;'? –
@MatteoTassinari你是對的。 – SCC