当前位置:网站首页>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
边栏推荐
- [SVN] what is SVN? How do you use it?
- asp. How to call vb DLL function in net project
- Lesson 1: finding the minimum of a matrix
- How does mongodb realize the creation and deletion of databases, the creation of deletion tables, and the addition, deletion, modification and query of data
- [cloud native] Devops (I): introduction to Devops and use of code tool
- 信息安全实验一:DES加密算法的实现
- Impression notes finally support the default markdown preview mode
- IIS redirection redirection appears eurl axd
- stm32和电机开发(从单机版到网络化)
- Information Security Experiment 3: the use of PGP email encryption software
猜你喜欢
In fact, it's very simple. It teaches you to easily realize the cool data visualization big screen
NATAPP内网穿透
Network request process
超十万字_超详细SSM整合实践_手动实现权限管理
nlohmann json
華為HCIP-DATACOM-Core_03day
Regular matching starts with XXX and ends with XXX
Unittest simple project
数据建模中利用3σ剔除异常值进行数据清洗
Netease Cloud Wechat applet
随机推荐
细说Mysql MVCC多版本控制
Jmeters use
[SVN] what is SVN? How do you use it?
信息安全实验一:DES加密算法的实现
Regular matching starts with XXX and ends with XXX
Pick up the premise idea of programming
Pycharm create a new file and add author information
Communication mode between processes
Mysql database index study notes
面试被问到了解哪些开发模型?看这一篇就够了
第一讲:包含min函数的栈
十二、排序
H5网页播放器EasyPlayer.js如何实现直播视频实时录像?
Some pit avoidance guidelines for using Huawei ECS
ViewPager2和VIewPager的区别以及ViewPager2实现轮播图
Unity shader (data type in cghlsl)
VSCode+mingw64
MySql数据库-索引-学习笔记
4、 Fundamentals of machine learning
Octopus future star won a reward of 250000 US dollars | Octopus accelerator 2022 summer entrepreneurship camp came to a successful conclusion