adworld-web2

web2

外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传GFSJ0627积分 2金币 2

91最佳Writeup由 Robert_Wei 提供

收藏

反馈

难度:2

方向:Web

题解数:108

解出人数:10185

题目来源: CTF

题目描述:

解密

题目场景:

http://61.147.171.105:56591

100%

倒计时: 35918

 

get the flag

`

 
$miwen="a1zLbgQsCESEIqRLwuQAyMwLyq2L5VwBxqGA3RQAyumZ0tmMvSGM2ZwB4tws"; 
echo $miwen;
function encode($str){ 
    $_o=strrev($str); 
    echo $_o; 
         
    for($_0=0;$_0<strlen($_o);$_0++){ 
        
        $_c=substr($_o,$_0,1); 
        $__=ord($_c)+1; 
        $_c=chr($__); 
        $_=$_.$_c;    
    }  
    return str_rot13(strrev(base64_encode($_))); 
} 

//highlight_file(__FILE__); 
/* 
   逆向加密算法,解密$miwen就是flag 
*/ 
echo "\n";
echo "test:";
echo encode("123");
$str = "Uryyb Jbeyq!";
    $str_rot13 = str_rot13($str);
    echo "\n";
    echo $str_rot13; // 输出 "Hello World!"

echo "\n";
echo str_rot13($miwen);
echo "\n";
echo strrev(str_rot13($miwen));
echo "\n";
echo base64_decode(  strrev(str_rot13($miwen)) );

$_o=base64_decode(  strrev(str_rot13($miwen)) );

for($_0=0;$_0<strlen($_o);$_0++){ 
        
    $_c=substr($_o,$_0,1); 
    $__=ord($_c)-1; 
    $_c=chr($__); 
    $_=$_.$_c;    
}

echo "\n";
echo $_;
echo "\n";
echo strrev($_);


?> 

`

using vscode

a1zLbgQsCESEIqRLwuQAyMwLyq2L5VwBxqGA3RQAyumZ0tmMvSGM2ZwB4tws
test:321lZQA
Hello World!
n1mYotDfPRFRVdEYjhDNlZjYld2Y5IjOkdTN3EDNlhzM0gzZiFTZ2MjO4gjf
fjg4OjM2ZTFiZzg0MzhlNDE3NTdkOjI5Y2dlYjZlNDhjYEdVRFRPfDtoYm1n
~88:36e1bg8438e41757d:29cgeb6e48c`GUDTO|;hbmg
}77925d0af7327d30646c918bfda5d37b_FTCSN{:galf
flag:{NSCTF_b73d5adfb819c64603d7237fa0d52977} 


adworld-web2_第1张图片

你可能感兴趣的:(ctf,攻防世界CTF,web,安全,ctf,网络)