PHP弱类型的学习

主线

https://www.cnblogs.com/Mrsm1th/p/6745532.html
https://www.freebuf.com/articles/web/129607.html
这两个博客很详细,下面为学习过程中第一个博客搜查的内容
建议看完第一个保留疑问然后再看第二个再做复习

下面为学习过程中搜查的内容:

1.$_GET 变量
2.ctype_alpha
3.md5()函数
4.json_decode函数
5.intval()函数
6.array_search函数
7.strcmp()漏洞

1.$_GET 变量

https://www.runoob.com/php/php-get.html
同时也证明了get参数是通过URL传递并且不太安全
我们可以通过在URL后添加:?内容来提交get参数

2.ctype_alpha

https://www.php.net/manual/zh/function.ctype-alpha.php
如果在字符串中,每个字符都是一个字母,那么就返回TRUE,反之则返回FALSE

3.md5()函数

https://www.w3school.com.cn/php/func_string_md5.asp
根据true跟flase调整加密方式(针对字符串)
可利用弱类型的特点进行绕过

4.json_decode函数

附加上key,value,=>和->的解释:
Array(0=>1,1=>2,2=>3,3=>4)
那么等号左边的就是数组的下标也叫索引也叫键(key),箭头指向的便是数组的值(value)。

->:https://blog.csdn.net/qq_38275944/article/details/75576963
->是成员访问符 =>是数组的赋值符号
(面向对象的引用)
json绕后需要学习js跟面向对象(超纲了!)

先抽象学习,不纠牛角尖

5.intval()函数

https://www.php.net/intval
用于base解码

6.array_search函数

https://www.w3school.com.cn/php/func_array_search.asp

7.strcmp()漏洞

https://blog.csdn.net/cherrie007/article/details/77473817
针对低版本的php

猜你喜欢

转载自blog.csdn.net/weixin_49894103/article/details/108912583