天天看点

各种绕过

各种绕过

110

各种绕过哟

http://120.24.86.145:8002/web7/

<?php 
highlight_file('flag.php'); 
$_GET['id'] = urldecode($_GET['id']); 
$flag = 'flag{xxxxxxxxxxxxxxxxxx}'; 
if (isset($_GET['uname']) and isset($_POST['passwd'])) { 
    if ($_GET['uname'] == $_POST['passwd']) 

        print 'passwd can not be uname.'; 

    else if (sha1($_GET['uname']) === sha1($_POST['passwd'])&($_GET['id']=='margin')) 

        die('Flag: '.$flag); 

    else 

        print 'sorry!'; 

} 
?>
           
  • get 接收 id 和 uname
  • post 接收 passwd
  • sha1() 函数计算字符串的 SHA-1 散列

根据函数性质,嗯,又是构造数组就好了~

get:id=margin&&uname[]=9

post:passwd[]=8

可得flag

上一篇: mysql 学习
下一篇: 你从哪里来