当前位置:网站首页>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}
边栏推荐
- scikit-learn no moudule named six
- 线上故障排查方案
- 基于 OData 模型和 JSON 模型的 SAP UI5 表格控件行项目的添加和删除实现
- Recycling rental system 100% open source without encryption Mall + recycling + rental
- SOM Network 2: Implementation of the Code
- 小程序毕设作品之微信体育馆预约小程序毕业设计成品(1)开发概要
- 365 days challenge LeetCode1000 questions - Day 046 Generate a string with odd number of each character + add two numbers + valid parentheses
- 教你VSCode如何快速对齐代码、格式化代码
- 感觉自己好傻
- [ASM] Bytecode Operation MethodWriter
猜你喜欢

feel so stupid

AI应用第一课:支付宝刷脸登录

罗克韦尔AB PLC RSLogix5000中的比较指令使用方法介绍

shell规范与变量

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

365天挑战LeetCode1000题——Day 046 生成每种字符都是奇数个的字符串 + 两数相加 + 有效的括号

ARFoundation Getting Started Tutorial U2-AR Scene Screenshot Screenshot

小程序毕设作品之微信体育馆预约小程序毕业设计成品(1)开发概要

SQL injection of WEB penetration

SOM Network 1: Principles Explained
随机推荐
Mini Program--Independent Subcontracting & Subcontracting Pre-download
blender3.2.1 unit setting
企业公众号文章写作方向:如何写出读者认可的优质内容
365 days challenge LeetCode1000 questions - Day 046 Generate a string with odd number of each character + add two numbers + valid parentheses
字符串——Trie
自建 Prometheus 采集腾讯云容器服务监控数据最佳实践
ARFoundation入门教程U2-AR场景截图截屏
【牛客刷题-SQL大厂面试真题】NO4.出行场景(某滴打车)
Analysis of the development trend of game metaverse
编曲软件FL studio20.8中文版功能和作用
feel so stupid
scikit-learn no moudule named six
shell specification and variables
46.全排列
Homework 8.1 Orphans and Zombies
一种灵活的智能合约协作方式
365天挑战LeetCode1000题——Day 046 生成每种字符都是奇数个的字符串 + 两数相加 + 有效的括号
Recycling rental system 100% open source without encryption Mall + recycling + rental
【C语言】猜数字小游戏
小程序毕设作品之微信美食菜谱小程序毕业设计成品(5)任务书