Protected/apps/members/controller/indexController.php
/protected/include/lib/common.function.php
跟进cp_decode函数
具体加解密算法没有进行分析,但是只要我们知道加密key就可以自己生产cookie
我们看看cookie的格式是什么样子的
跟进 set_cookie
我没有深入看cp_encode函数的算法,但是,我们现在知道了加密前cookie的格式,有了加密key,就可以人为的去生成cookie,绕过验证。
加密key默认为yx,但是有可能更改,因为加密和解密用到同一个key,属于对称加密,这里写一个脚本用来破解加密key。
解密脚本crack.php:
现在用cp_encode函数制作我们自己的cookie 。
id ,groupid,account,nickname在不同的地方有不同的用处,比如修改资料地方用id关联,发布资讯跟account关联,登录界面现实与nickname关联,根据自己需要进行修改伪造。