web2
GFSJ0627积分 2金币 2
91最佳Writeup由 Robert_Wei 提供
收藏
反馈
难度:2
方向:Web
题解数:108
解出人数:10185
题目来源: CTF
题目描述:
解密
题目场景:
100%
倒计时: 3时59分18秒
<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="" cid="n24" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; background-color: rgb(51, 51, 51); position: relative !important; padding: 10px 10px 10px 30px; width: inherit; caret-color: rgb(184, 191, 198); color: rgb(184, 191, 198); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><?php
$miwen="a1zLbgQsCESEIqRLwuQAyMwLyq2L5VwBxqGA3RQAyumZ0tmMvSGM2ZwB4tws";
function encode(_o=strrev(_o;
for(_0<strlen(_0++){
o,_=ord(c=chr(=c;
}
return str_rot13(strrev(base64_encode($)));
}
highlight_file(FILE);
/*
逆向加密算法,解密$miwen就是flag
*/
?> </pre>
get the flag
`
<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="php" cid="n37" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; background-color: rgb(51, 51, 51); position: relative !important; padding: 10px 10px 10px 30px; width: inherit; caret-color: rgb(184, 191, 198); color: rgb(184, 191, 198); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;"><?php
miwen;
function encode(_o=strrev(_o;
for(_0<strlen(_0++){
o,_=ord(c=chr(=c;
}
return str_rot13(strrev(base64_encode($)));
}
//highlight_file(FILE);
/*
逆向加密算法,解密str = "Uryyb Jbeyq!";
str);
echo "\n";
echo $str_rot13; // 输出 "Hello World!"
echo "\n";
echo str_rot13(miwen));
echo "\n";
echo base64_decode( strrev(str_rot13($miwen)) );
miwen)) );
for(_0<strlen(_0++){
o,_=ord(c=chr(=_c;
}
echo "\n";
echo _);
?> </pre>
`
using vscode
<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="" cid="n43" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; margin-top: 0px; margin-bottom: 20px; font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; white-space: normal; background-color: rgb(51, 51, 51); position: relative !important; padding: 10px 10px 10px 30px; width: inherit; caret-color: rgb(184, 191, 198); color: rgb(184, 191, 198); font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">a1zLbgQsCESEIqRLwuQAyMwLyq2L5VwBxqGA3RQAyumZ0tmMvSGM2ZwB4tws
test:321lZQA
Hello World!
n1mYotDfPRFRVdEYjhDNlZjYld2Y5IjOkdTN3EDNlhzM0gzZiFTZ2MjO4gjf
fjg4OjM2ZTFiZzg0MzhlNDE3NTdkOjI5Y2dlYjZlNDhjYEdVRFRPfDtoYm1n
~88:36e1bg8438e41757d:29cgeb6e48c`GUDTO|;hbmg
}77925d0af7327d30646c918bfda5d37b_FTCSN{:galf
flag:{NSCTF_b73d5adfb819c64603d7237fa0d52977}
</pre>
[图片上传失败...(image-ef16d0-1694359898826)]