HCCLogIP A Custom module for Cpanel Version 0.2.1 beta 11/MAY/2005 © 2005 Juan R. Pozo http://html.conclase.net/cp/scripts/ mailto:jrpozo@conclase.net Mailing list: http://www.conclase.net/mailman/listinfo/cpanel_conclase.net License This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Note: a copy of the GNU General Public License is available at: http://html.conclase.net/cp/scripts/license.html Installation 1) Switch to root user 2) # cd /usr/local/cpanel/ 3) # wget –N http://html.conclase.net/cp/scripts/HCCLogIP-install.pl 4) # perl HCCLogIP-install.pl 5) # rm HCCLogIP-install.pl 6) Add the following entries to your language files: // HCCLogIP (English) HCCLogIP_errstr_1=Error 1: Not invoked from CPanel (no SERVER_PORT or REMOTE_USER) HCCLogIP_errstr_2=Error 2: Not invoked from CPanel (port is not 2082 or 2083) HCCLogIP_errstr_3=Error 3: Not invoked from CPanel (REMOTE_USER is not caller's uid) HCCLogIP_errstr_4=Error 4: Wrong number of arguments HCCLogIP_errstr_5=Error 5: Failed to connect to database HCCLogIP_errstr_6=Error 6: Failed to execute query // HCCLogIP (Spanish) HCCLogIP_errstr_1=Error 1: No invocado desde CPanel (falta SERVER_PORT o REMOTE_USER) HCCLogIP_errstr_2=Error 2: No invocado desde CPanel (el puerto no es 2082 ni 2083) HCCLogIP_errstr_3=Error 3: No invocado desde CPanel (REMOTE_USER no coincide con el uid del invocador) HCCLogIP_errstr_4=Error 4: Número incorrecto de argumentos HCCLogIP_errstr_5=Error 5: No se pudo conectar con la base de datos HCCLogIP_errstr_6=Error 6: Fallo al ejecutar sentencia SQL API Reference Logs the username, remote IP address and timestamp in the HCCLogIP database created by the administrator (see installation instructions). Usernames are truncated to 8 characters. If an error occurs, $CPERROR{'HCCLogIP'} is set to 1, $CPERROR{'HCCLogIP_errno'} returns with the error code, and $CPERROR{'HCCLogIP_errstr'} returns with an error string. Note: the HCCLogIP C script is a setuid root executable. You may want to review it before running it in your server. Changelog 0.2.1 Beta – May 11, 2005 Fixed lang function to account for Cpanel's cachelang mechanism. 0.2 Beta – September 23, 2003 Changed API call name. Removes the notify parameter and uses $CPERROR variables instead. Database is now accesible by root only. The old mysql configuration file is no longer used, /root/.my.cnf is used instead. 0.1 Beta – March 25, 2003 First entry in Changelog. Please consider making a donation today. Visit my amazon.com wishlist at: http://html.conclase.net/link/wishlist Thank you :)