0
点赞
收藏
分享

微信扫一扫

C++初阶学习第六弹——string(1)——标准库中的string类

左手梦圆 2024-05-15 阅读 2

1、strcmp绕过

PHP手册:

int strcmp ( string $str1 , string $str2 )

Return Values

Returns < 0 if str1 is less than str2; > 0 if str1 is greater than str2, and 0 if they are equal

我们可以传入字符串和数组返回 0 来达到一些目的

<?php

$password=$_GET['password'];
if(strcmp('am0s',$password)){
echo 'false!';
}else{
echo 'success!';
}

?>

2、 is_numeric绕过

is_numeric()作用:判断是否是数字类型或数字字符串

is_numeric函数对于空字符%00,无论是%00放在前后都可以判断为非数值,而%20空格字符只能放在数值后

 is_numeric绕过有两个部分:

  • and连接时候绕过
  • 16进制绕过

1&

举报

相关推荐

0 条评论