当前位置:网站首页>thinkphp3.2信息泄露
thinkphp3.2信息泄露
2022-07-07 07:00:00 【qq_42307546】
日志信息泄露
thinkphp在开启debug的情况下会在Runtime目录生成日志,如果debug模式不关,可以直接输入输入路劲造成目录遍历
Thinkphp3.2结构:\Application\Runtime\Logs\Home\22_07_05.log
Thinkphp3.1:\Runtime\Logs\Home\22_07_05.log
index.php开启debug模式
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <[email protected]>
// +----------------------------------------------------------------------
// 应用入口文件
// 检测PHP环境
if(version_compare(PHP_VERSION,'5.3.0','<')) die('require PHP > 5.3.0 !');
// 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false
define('APP_DEBUG',True);
//定义网址
define('SITE_URL','http://www.tp.com:8080/index.php');
// 定义应用目录
define('APP_PATH','./Application/');
// 引入ThinkPHP入口文件
require './ThinkPHP/ThinkPHP.php';
// 亲^_^ 后面不需要任何代码了 就是如此简单
缓存泄露
F方法
S方法
<?php
namespace Home\Controller;
use Think\Controller;
class TestController extends Controller {
public function index(){
F("data","<?php phpinfo() ?>");//快速缓存,利用这个方法可以在/Data/目录下生成data.php文件内容就是 phpinfo()
S("data","123456");//利用这个方法会在Temp目录下生成一个md5为文件名的文件
}
public function login(){
$this->display();
}
}
开启调试追踪
\Application\Home\Conf\config.php
边栏推荐
- Jenkins+ant+jmeter use
- 第一讲:包含min函数的栈
- 【云原生】DevOps(一):DevOps介绍及Code工具使用
- Regular matching starts with XXX and ends with XXX
- Where is the answer? action config/Interceptor/class/servlet
- 创建一个长度为6的int型数组,要求数组元素的值都在1-30之间,且是随机赋值。同时,要求元素的值各不相同。
- Jenkins modifies the system time
- 【SVN】SVN是什么?怎么使用?
- SiteMesh getting started example
- Unity shader (basic concept)
猜你喜欢
Mysql database index study notes
Network request process
[4G/5G/6G专题基础-147]: 6G总体愿景与潜在关键技术白皮书解读-2-6G发展的宏观驱动力
Pycharm importing third-party libraries
華為HCIP-DATACOM-Core_03day
Sublime Text4 download the view in bower and set the shortcut key
MySql数据库-索引-学习笔记
如何使用clipboard.js库实现复制剪切功能
网易云微信小程序
Lecture 1: stack containing min function
随机推荐
Information Security Experiment 2: using x-scanner scanning tool
Serializer & modelserializer of DRF serialization and deserialization
Sublime Text4 download the view in bower and set the shortcut key
Impression notes finally support the default markdown preview mode
Pytest installation (command line installation)
Jmeters use
Binary tree high frequency question type
进程和线程的区别
Mysql数据库-锁-学习笔记
NATAPP内网穿透
超十万字_超详细SSM整合实践_手动实现权限管理
The configuration and options of save actions are explained in detail, and you won't be confused after reading it
js逆向教程第二发-猿人学第一题
Unity shader (data type in cghlsl)
When inputting an expression in the input box, an error is reported: incorrect string value:'\xf0\x9f... ' for column 'XXX' at row 1
[4G/5G/6G专题基础-147]: 6G总体愿景与潜在关键技术白皮书解读-2-6G发展的宏观驱动力
Implementation of corner badge of Youmeng message push
JS judge whether checkbox is selected in the project
【SVN】SVN是什么?怎么使用?
面试被问到了解哪些开发模型?看这一篇就够了