当前位置:网站首页>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 .
边栏推荐
- 漏刻有时API接口实战开发系列(14):身份证实名鉴权验证
- Two expressions of string
- [software] phantomjs screenshot
- web254
- 如何使用layui将数据库中的数据以表格的形式展现出来
- 2022广东省安全员A证第三批(主要负责人)特种作业证考试题库模拟考试平台操作
- IMDB practice of emotion classification (simplernn, LSTM, Gru)
- 2022年流动式起重机司机考试练习题及在线模拟考试
- How to check ad user information?
- 2022 Guangdong Provincial Safety Officer a certificate third batch (main person in charge) special operation certificate examination question bank simulated examination platform operation
猜你喜欢

源代码加密的意义和措施
![[kv260] generate chip temperature curve with xadc](/img/fc/e5e4648b09b1123b2d494b75a9f8f7.png)
[kv260] generate chip temperature curve with xadc

Gru of RNN

Microsoft stream - how to modify video subtitles

redisson使用全解——redisson官方文檔+注釋(上篇)
![[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](/img/5e/068268857b8c7c2065ba552fd23dbb.png)
[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

2022电工(中级)复训题库及答案

Caesar

Aardio - 阴影渐变文字

2022 Guangdong Provincial Safety Officer a certificate third batch (main person in charge) special operation certificate examination question bank simulated examination platform operation
随机推荐
[MySQL learning notes 28] storage function
Kickback -- find the first palindrome character in a group of characters
Conscience Amway universal wheel SolidWorks model material website
三极管是一项伟大的发明
组件的自定义事件①
2022 electrician (intermediate) recurrent training question bank and answers
Cyclic neural network
2022 tea master (intermediate) recurrent training question bank and answers
Oracle create auto increment ID
[skill] create Bat quick open web page
Apple account password auto fill
长路漫漫、技术作伴
Is it safe and reliable for Huatai Securities to open an account? How to open Huatai Securities Account
Redisson uses the complete solution - redisson official documents + Notes (Part 1)
十大劵商如何开户?另外,手机开户安全么?
Principle and process of embossing
Custom events of components ①
What information does the supplier need to know about Audi EDI project?
2022 Guangdong Provincial Safety Officer a certificate third batch (main person in charge) special operation certificate examination question bank simulated examination platform operation
base64