in_array绕过
时间: 2024-01-30 16:02:05 浏览: 27
in_array绕过是指通过一些技巧或漏洞绕过in_array函数的检查,使其无法准确判断一个值是否在数组中存在。在引用中提到了一个例子,即通过强制类型转换来绕过in_array函数的检查。具体来说,如果使用强制类型转换将传入的值转换为与数组元素类型不匹配的类型,就可以绕过in_array函数的检查。例如,将字符串类型的值转换为数字或者将数字类型的值转换为字符串。这样即使实际上这个值并不存在于数组中,in_array函数也会返回true。在引用中给出了具体的绕过方法,分别是字符类型绕过和数字类型绕过。对于字符类型绕过,可以通过在数组中包含一个字符串类型的元素,然后传入一个与该元素类型不匹配的字符串进行绕过。对于数字类型绕过,可以在数组中包含数字类型的元素,然后传入一个与该元素类型不匹配的字符串或者符号进行绕过。这样就可以利用强制类型转换绕过in_array函数的检查。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [PHP-Audit-Labs Day1:in_array函数缺陷](https://blog.csdn.net/weixin_43872099/article/details/106927502)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [php安全特性函数以及绕过方法](https://blog.csdn.net/qq_33942040/article/details/109958431)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![xlsx](https://img-home.csdnimg.cn/images/20210720083732.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)