Bugku各种绕过 wp

Bugku各种绕过 wp

http://123.206.87.240: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!'; 

} 
?>**

分析了php代码,需要post传值和get传值,我们可以用hackbar实现。
代码要实现的是当uname的sha1和值与passwd的sha1的值相等,但是同时他们两个的值又不能相等,同时用get传入一个id值为maigin。
在这里插入图片描述

run就得到flag了。

猜你喜欢

转载自blog.csdn.net/JulianBrandt/article/details/88625410