当前位置:网站首页>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}
边栏推荐
- 感觉自己好傻
- [深入研究4G/5G/6G专题-48]: 5G Link Adaption链路自适应-4-下行链路自适应DLLA-PDCCH信道
- The thing about npm
- 不卷了!入职字节跳动一周就果断跑了。
- shell specification and variables
- Yizhou Financial Analysis | The intelligent transformation of bank ATM machines is accelerated; the new Internet loan regulations bring challenges
- 论文解读(GSAT)《Interpretable and Generalizable Graph Learning via Stochastic Attention Mechanism》
- Centos7--MySQL的安装
- ImportError: `save_weights` requires h5py.问题解决
- 46.全排列
猜你喜欢
Based on php online learning platform management system acquisition (php graduation design)
教你VSCode如何快速对齐代码、格式化代码
ARFoundation入门教程U2-AR场景截图截屏
Uses of Anacoda
【C语言实现】两种计算平均成绩题型,博主精心整理,值得一读
365 days challenge LeetCode1000 questions - Day 046 Generate a string with odd number of each character + add two numbers + valid parentheses
不卷了!入职字节跳动一周就果断跑了。
scikit-learn no moudule named six
[ASM] Bytecode Operation MethodWriter
恒星的正方形问题
随机推荐
Safe fifth after-school exercise
不卷了!入职字节跳动一周就果断跑了。
ModuleNotFoundError: No module named ‘yaml‘
Raspberry Pi information display small screen, display time, IP address, CPU information, memory information (C language), four-wire i2c communication, 0.96-inch oled screen
SAP Spartacus Accessibility E2E 端到端测试
感觉自己好傻
long investment career
递归(各经典例题分析)
19 Lectures on Disassembly of Multi-merchant Mall System Functions - Invoice Management on the Platform
你居然不懂Bitmap和Drawable? 相关知识大扫盲
入门数据库Days4
Mini Program--Independent Subcontracting & Subcontracting Pre-download
论文解读(GSAT)《Interpretable and Generalizable Graph Learning via Stochastic Attention Mechanism》
SQL injection of WEB penetration
User Experience | How to Measure User Experience?
【移动Web】移动端适配
力扣第 304 场周赛复盘
SOM网络1:原理讲解
小程序毕设作品之微信美食菜谱小程序毕业设计成品(5)任务书
统计单词数