当前位置:网站首页>xctf attack and defense world web master advanced area web2
xctf attack and defense world web master advanced area web2
2022-08-01 22:07:00 【l8947943】
0x01. 进入环境,查看问题
如图,给了一串代码:
0x02. 问题分析
可以很清楚的看到,The problem is to decipher the ciphertextok了.Mainly code auditing,先解释一下phpfunction meaning in :
strrev(string): 反转字符串
strlen(string): 返回字符串的长度
substr(string, start, length): 返回字符串的一部分
string: the desired string
start: where the string starts
length: 可选.规定被返回字符串的长度.默认是直到字符串的结尾
ord(string): Returns the first character of the string ASCII 值
chr(): 从指定的 ASCII 值返回对应的字符
str_rot13(string): 对字符串执行 ROT13 编码.
ROT13 编码把每一个字母在字母表中向前移动 13 个字母.数字和非字母字符保持不变
Both encoding and decoding are done by this function.If you take an encoded string as a parameter,then the original string will be returned
base64_encode(string): 使用 MIME base64 对数据进行编码.
进行反解密,Thrown into the online run:
<?php
$miwen="a1zLbgQsCESEIqRLwuQAyMwLyq2L5VwBxqGA3RQAyumZ0tmMvSGM2ZwB4tws";
$flag="";
$a = base64_decode(strrev(str_rot13($miwen)));
for($_0=0;$_0<strlen($a);$_0++){
$_c=substr($a,$_0,1);
$__=ord($_c)-1;
$_c=chr($__);
$flag=$flag.$_c;
}
$b = strrev($flag);
echo($b);
?>
into the online operating address:https://www.dooccn.com/php/
solve the final answer:flag:{NSCTF_b73d5adfb819c64603d7237fa0d52977}
边栏推荐
- 如何理解 new (...args: any[]) => any
- 线程池分析
- 威纶通触摸屏如何打开并升级EB8000旧版本项目并更换触摸屏型号?
- Postman 批量测试接口详细教程
- 10 Practical Uses of NFTs (NFT System Development)
- Recycling rental system 100% open source without encryption Mall + recycling + rental
- 高等代数_证明_矩阵的行列式为特征值之积, 矩阵的迹为特征值之和
- shell programming conventions and variables
- MySQL related knowledge
- Shell programming conditional statement
猜你喜欢

一种灵活的智能合约协作方式

(翻译)按钮的对比色引导用户操作的方式

不卷了!入职字节跳动一周就果断跑了。

小程序毕设作品之微信体育馆预约小程序毕业设计成品(2)小程序功能

JS prototype hasOwnProperty in 加方法 原型终点 继承 重写父类方法

Prufer序列

Based on php animation peripheral mall management system (php graduation design)

Based on php tourism website management system acquisition (php graduation design)

小程序容器+自定义插件,可实现混合App快速开发

APP专项测试:流量测试
随机推荐
shell规范与变量
如何给 UE4 场景添加游戏角色
LeetCode952三部曲之一:解题思路和初级解法(137ms,超39%)
用户体验 | 如何度量用户体验?
How to prevent governance attacks in DAOs?
工程建筑行业数据中台指标分析
小程序毕设作品之微信美食菜谱小程序毕业设计成品(5)任务书
[机缘参悟-58]:《素书》-5-奉行仁义[遵义章第五]
小程序容器+自定义插件,可实现混合App快速开发
familiar friend
selenium无头,防检测
ARFoundation Getting Started Tutorial U2-AR Scene Screenshot Screenshot
ModuleNotFoundError: No module named ‘yaml‘
Uses of Anacoda
深度学习Course2第一周Practical aspects of Deep Learning习题整理
模拟数据之mockjs
9. SAP ABAP OData 服务如何支持删除(Delete)操作
HCIP---Multiple Spanning Tree Protocol related knowledge points
2022 edition of MySQL tutorial, top collection good, take your time
数据分析面试手册《指标篇》