web93笔记(+过滤字母)

<?php

/*
# -*- coding: utf-8 -*-
# @Author: Firebasky
# @Date:   2020-09-16 11:25:09
# @Last Modified by:   h1xa
# @Last Modified time: 2020-09-18 16:32:58
# @link: https://ctfer.com

*/

include("flag.php");
highlight_file(__FILE__);
if(isset($_GET['num'])){
    $num = $_GET['num'];
    if($num==4476){
        die("no no no!");
    }
    if(preg_match("/[a-z]/i", $num)){
        die("no no no!");
    }
    if(intval($num,0)==4476){
        echo $flag;
    }else{
        echo intval($num,0);
    }
}

没了弱比较,那就有两种方式

那我们直接用小数点即可(利用php浮点数不能直接比较相等的特性),或者8进制也行

?num=4476.1

?num=010574
 
posted @ 2025-03-17 22:03  justdoIT*  阅读(9)  评论(0)    收藏  举报