当前位置:网站首页>php弱类型-攻防世界lottery
php弱类型-攻防世界lottery
2022-08-02 17:13:00 【NCNIPC梅苑】
lottery

php弱类型
git源码泄露
漏洞在 api.php
function buy($req)
{
require_registered();
require_min_money(2);
}
$money = $_SESSION['money'];
$numbers = $req['numbers'];
$win_numbers = random_win_nums();
$same_count = 0;
for($i=0; $i<7; $i++){
if($numbers[$i] == $win_numbers[$i]){
$same_count++;
}
}
其中 $numbers 来自用户json输入 {“action”:“buy”,“numbers”:“1111111”}
没有检查数据类型。
$win_numbers 是随机生成的数字字符串。
使用 PHP 弱类型松散比较,以"1"为例,和TRUE,1,"1"相等。 由于 json 支持布尔型数据,因此可以抓包改包,发送:


边栏推荐
- Five speakers: seventy genius_platform software platform development 】 【 turn YUY2 RGB24 implementation source code
- npm install 编译时报“Cannot read properties of null (reading ‘pickAlgorithm‘)“
- 文件上传很难搞?10分钟带你学会阿里云OSS对象存储
- NeRF:火爆科研圈的三维重建技术大揭秘
- 2022高压电工特种作业证考试题库及答案
- Smart Contract Security - delegatecall (1)
- 边界访问的空间权限
- [300+ selected big factory interview questions continue to share] Big data operation and maintenance sharp knife interview questions column (10)
- golang源码分析(10)slice
- Mysql——字符串函数
猜你喜欢

Cpolar application example of data acquisition equipment

文件上传很难搞?10分钟带你学会阿里云OSS对象存储

Mysql应用安装后找不到my.ini文件

Redis的介绍和使用

创新云集技术咖,工赋汇聚实战派:2022工赋开发者峰会

字节面试官狂问我:你没有高并发、性能调优经验,为什么录取你?

嵌入式Qt-做一个秒表

Red and blue against experience sharing: CS from kill posture

牛津硕士进碳圈,高瓴红杉经纬一起投了

golang学习之七:并发编程基础(goroutine、channel、select)
随机推荐
2022高压电工特种作业证考试题库及答案
Mysql应用安装后找不到my.ini文件
Gartner发布,年度Challenger!
Flink Learning 9: Configure the idea to develop the flink-Scala program environment
FP6606CLP5 SOP-8 USB Type-C和PD充电控制器
【无标题】
Navicat premium download and install 15 detailed tutorial
golang源码分析(12)martini源码分析
持续集成(四)Jenkins配置报警机制
文件上传很难搞?10分钟带你学会阿里云OSS对象存储
golang源码分析(2):Golang context 包
Mini Program Graduation Works WeChat Gymnasium Reservation Mini Program Graduation Design Finished Product (8) Graduation Design Thesis Template
executeScript异步执行的时候没有返回值的原因
golang源码分析(5):sync.Once
Pytest study notes
vulnhub W34kn3ss: 1
golang源码阅读(11)GO中各个目录的功能
DeepMind 首席科学家 Oriol Vinyals 最新访谈:通用 AI 的未来是强交互式元学习
什么是实时流引擎?
Flink学习9:配置idea开发flink-Scala程序环境