当前位置:网站首页>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
边栏推荐
- Information Security Experiment 3: the use of PGP email encryption software
- Postman interface debugging method
- Octopus future star won a reward of 250000 US dollars | Octopus accelerator 2022 summer entrepreneurship camp came to a successful conclusion
- Run can start normally, and debug doesn't start or report an error, which seems to be stuck
- Unity shader (learn more about vertex fragment shaders)
- Mysql database transaction learning notes
- Mysql:select ... for update
- asp. How to call vb DLL function in net project
- Huawei hcip datacom core_ 03day
- LeetCode每日一题(2316. Count Unreachable Pairs of Nodes in an Undirected Graph)
猜你喜欢

12、 Sort

js逆向教程第二发-猿人学第一题

MongoDB怎么实现创建删除数据库、创建删除表、数据增删改查

What is MD5

Implementation of corner badge of Youmeng message push

Cesium does not support 4490 problem solution and cesium modified source code packaging scheme

MySql数据库-索引-学习笔记

Oracle installation enhancements error

VSCode+mingw64+cmake

Using JWT to realize login function
随机推荐
golang select机制和超时问题怎么解决
Record of structured interview
十二、排序
ComputeShader
Kubernetes cluster capacity expansion to add node nodes
第一讲:包含min函数的栈
Netease cloud wechat applet
Using JWT to realize login function
IIS redirection redirection appears eurl axd
Unity shader (learn more about vertex fragment shaders)
Unity3d interface is embedded in WPF interface (mouse and keyboard can respond normally)
MySQL common statements
Unity shader (basic concept)
Cesium load vector data
The use of recycling ideas
Unity shader (data type in cghlsl)
Esp8266 uses TF card and reads and writes data (based on Arduino)
[4g/5g/6g topic foundation-146]: Interpretation of white paper on 6G overall vision and potential key technologies-1-overall vision
Jemter operation
MySql数据库-索引-学习笔记