当前位置:网站首页>web254
web254
2022-07-01 07:56:00 【Ginger kid】
The attached code :
<?php
/*
# -*- coding: utf-8 -*-
# @Author: h1xa
# @Date: 2020-12-02 17:44:47
# @Last Modified by: h1xa
# @Last Modified time: 2020-12-02 19:29:02
# @email: [email protected]
# @link: https://ctfer.com
*/
error_reporting(0);
highlight_file(__FILE__);
include('flag.php');
class ctfShowUser{
public $username='xxxxxx';
public $password='xxxxxx';
public $isVip=false;
public function checkVip(){
return $this->isVip;
}
public function login($u,$p){
if($this->username===$u&&$this->password===$p){
$this->isVip=true;
}
return $this->isVip;
}
public function vipOneKeyGetFlag(){
if($this->isVip){
global $flag;
echo "your flag is ".$flag;
}else{
echo "no vip, no flag";
}
}
}
$username=$_GET['username'];
$password=$_GET['password'];
if(isset($username) && isset($password)){
$user = new ctfShowUser();
if($user->login($username,$password)){
if($user->checkVip()){
$user->vipOneKeyGetFlag();
}
}else{
echo "no vip,no flag";
}
}
The problem is very simple , The general idea is to let you Get Pass on a reference username and password, Below if Yes check if it is empty , Call if it is not empty ctfShowUser Inside login Method , Incoming username Turned into $u, Incoming password Turned into $p. Below if Is judging isVip Is it ture, You can see at the beginning

Here's isVip yes false Of , So if username and password The value of and ctfShowUser Inside username and password The values of are the same , Then let isVip become Ture, We can jump to vipOneKeyGetFlag() In the middle . obtain flag
payload:
?username=xxxxxx&password=xxxxxxIt's still very simple to clarify the train of thought .
边栏推荐
- Redisson uses the full solution - redisson official documents + comments (Part 2)
- Apple account password auto fill
- base64
- [programming training] delete public characters (hash mapping) + team competition (greedy)
- Sorting out tcp/udp communication problems
- 她就是那个「别人家的HR」|ONES 人物
- Why some people earn nearly 10billion a year, while others earn 3000 a month: the details you ignore actually make the most money
- SharePoint - modify web application authentication using PowerShell
- How to troubleshoot SharePoint online map network drive failure?
- Latex table
猜你喜欢

2022制冷与空调设备运行操作国家题库模拟考试平台操作

2022 mobile crane driver test exercises and online simulation test

Basic knowledge of MATLAB

kubernetes资源对象介绍及常用命令(二)

2022危险化学品经营单位主要负责人试题及模拟考试

【网站架构】一招搞定90%的分布式事务,实打实介绍数据库事务、分布式事务的工作原理应用场景

组件的自定义事件①

Minecraft 1.16.5模组开发(五十一) 方块实体 (Tile Entity)

Huawei modelarts training alexnet model

2022电工(中级)复训题库及答案
随机推荐
Autosar 学习记录(1) – EcuM_Init
The H5 page has set the font thickness style, but the wechat access style in Huawei mobile phone doesn't take effect?
MATLAB之基础知识
[programming training] delete public characters (hash mapping) + team competition (greedy)
Saving db4i depth camera pictures with MATLAB
Redisson uses the full solution - redisson official document + comments (Part 2)
Li Kou daily question - day 31 -1502 Judge whether an arithmetic sequence can be formed
奥迪AUDI EDI 项目中供应商需要了解哪些信息?
matlab保存DB4i深度相机图片
如何让两融交易更极速
2022广东省安全员A证第三批(主要负责人)特种作业证考试题库模拟考试平台操作
Eigen matrix operation Library
Source code analysis of open source API gateway APIs IX
[kv260] generate chip temperature curve with xadc
Rk3399 platform development series explanation (network debugging) 7.30. What will affect the sending process of TCP packets?
Download xshell and xftp
浏览器本地存储
2022 Guangdong Provincial Safety Officer a certificate third batch (main person in charge) special operation certificate examination question bank simulated examination platform operation
[programming compulsory training 3] find the longest consecutive number string in the string + the number that appears more than half of the times in the array
Latex table