当前位置:网站首页>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
- dvwa 通关记录1 - 暴力破解 Brute Force
- ARFoundation Getting Started Tutorial U2-AR Scene Screenshot Screenshot
- Getting Started Database Days4
- Small program -- subcontracting
- 将vim与系统剪贴板的交互使用
- 自建 Prometheus 采集腾讯云容器服务监控数据最佳实践
- Shell programming conditional statement
- Postman 批量测试接口详细教程
- 找工作必备!如何让面试官对你刮目相看,建议收藏尝试!!
猜你喜欢
随机推荐
SOM网络2: 代码的实现
blender3.2.1 unit setting
Ten years after graduation, financial freedom: those things that are more important than hard work, no one will ever teach you
第一讲 测试知多少
User Experience | How to Measure User Experience?
【ASM】字节码操作 MethodWriter
Based on php online learning platform management system acquisition (php graduation design)
Small program -- subcontracting
小程序容器+自定义插件,可实现混合App快速开发
Safe fifth after-school exercise
小程序毕设作品之微信美食菜谱小程序毕业设计成品(7)中期检查报告
小程序毕设作品之微信美食菜谱小程序毕业设计成品(6)开题答辩PPT
MySQL related knowledge
小程序毕设作品之微信美食菜谱小程序毕业设计成品(8)毕业设计论文模板
游戏元宇宙发展趋势展望分析
LeetCode952三部曲之一:解题思路和初级解法(137ms,超39%)
【C语言实现】整数排序-四种方法,你都会了吗、
入门数据库Days4
易周金融分析 | 银行ATM机智能化改造提速;互联网贷款新规带来挑战
Uses of Anacoda









