-Extract variable code audit coverage

<?php
$flag='xxx';
extract($_GET);
if(isset($shiyan))
{
$content=trim(file_get_contents($flag));
if($shiyan==$content)
{
echo'flag{xxx}';
}
else
{
echo'Oh.no';
}
}
?>

file_get_contents () function to read the entire file into a string.

extract () function is introduced into the current array variable in the symbol table.

 

The flag is probably variable and variable unanimously flag shiyan

The contents is empty, flag and shiyan variable is empty, the condition

http://123.206.87.240:9009/1.php?shiyan=&flag=

 

flag{bugku-dmsj-p2sm3N}

Guess you like

Origin www.cnblogs.com/gaonuoqi/p/11408456.html