【ctf.show】--- md5

ctf.show_web9

1.用 dirsearch 扫目录:python dirsearch.py -u 网址 -e php

   发现 robots.txt

2.访问 robots.txt 文件

   发现 index.phps

3.访问 index.phps

   发现源码

<?php
        $flag="";
        $password=$_POST['password'];
        if(strlen($password)>10){
            die("password error");
        }
        $sql="select * from user where username ='admin' and password                                  ='".md5($password,true)."'";
        $result=mysqli_query($con,$sql);
            if(mysqli_num_rows($result)>0){
                    while($row=mysqli_fetch_assoc($result)){
                         echo "登陆成功<br>";
                         echo $flag;
                     }
            }
    ?>

知识点 

md5(string,raw)

 示例:

<?php
$str = 'apple';
if (md5($str) === '1f3870be274f6c49b3e31a0c6728957f') {
        echo "Would you like a green or red apple?";
}
?> 

1.content: ffifdyop

2.hex:   276f722736c95d99e921722cf9ed621c  //16 字符长度的原始二进制

3.raw:   'or'6\xc9]\x99\xe9!r,\xf9\xedb\x1c //原始二进制

4.string: 'or'6]!rb

  • 4
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值