当前位置:网站首页>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}
边栏推荐
猜你喜欢
随机推荐
ARFoundation入门教程U2-AR场景截图截屏
编曲软件FL studio20.8中文版功能和作用
微软校园大使喊你来秋招啦!
Based on php online music website management system acquisition (php graduation design)
Uses of Anacoda
【C语言实现】两种计算平均成绩题型,博主精心整理,值得一读
VGUgarbage collector(垃圾回收器)的实现原理
User Experience | How to Measure User Experience?
【C语言实现】求两个整数的较大值
AI应用第一课:支付宝刷脸登录
今年的很美味
自建 Prometheus 采集腾讯云容器服务监控数据最佳实践
xctf攻防世界 Web高手进阶区 web2
kubernetes CoreDNS全解析
线程池分析
(*゚ヮ゚)*【精品C语言整理】*(゚ヮ゚*)女盆友缠着你让你教她写代码怎么办?安排,三万字博文带你走遍C语言,从此不再害怕编程
你居然不懂Bitmap和Drawable? 相关知识大扫盲
三、mysql 存储引擎-建库建表操作
模拟数据之mockjs
ModuleNotFoundError: No module named 'yaml'








