Log HOSTNAME on registration

Advertise a phpBB hack or request help with an existing one.

Moderator: TerraFrost

Log HOSTNAME on registration

Postby wodfer » Tue May 02, 2006 2:51 pm

Hi and thanks for your nice log ip on registration mod.

Just wondering if it would be possible to add a host lookup or have the HOSTNAME also added into the database so that both will be easy viewable through the ACP?

Perhaps even adding both IP and HOSTNAME to the email that gets sent to the Administrator when Admin Account Activation is enabled.

I'm having trouble with spammers and I want to check a few things before people are let in.

Cheers,
Andreas :)
wodfer
Traveler
 
Posts: 1
Joined: Tue May 02, 2006 2:45 pm

Postby TerraFrost » Thu May 04, 2006 9:38 pm

Untested.

Code: Select all
#
#-----[ SQL ]-------------------------------------------
#
ALTER TABLE phpbb_users ADD user_reghost VARCHAR(255) NOT NULL DEFAULT '0';
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
# this is only a partial match
#
         $sql = "INSERT INTO " . USERS_TABLE . "
#
#-----[ IN-LINE FIND ]---------------------------------
#
 user_icq,
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------
#
 user_reghost,
#
#-----[ FIND ]------------------------------------------
# this is only a partial match
#
            VALUES ($user_id,
#
#-----[ IN-LINE FIND ]---------------------------------
#
 . "', '" . str_replace("\'", "''", $icq)
#
#-----[ IN-LINE BEFORE, ADD ]---------------------------
#
 . "', '" . gethostbyaddr(decode_ip($userdata['session_ip']))
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_users.php
#
#-----[ FIND ]------------------------------------------
#
      $icq = $this_userdata['user_icq'];
#
#-----[ BEFORE, ADD ]-----------------------------------
#
      $user_reghost = $this_userdata['user_reghost'];
#
#-----[ FIND ]------------------------------------------
#
         'YIM' => $yim,
#
#-----[ BEFORE, ADD ]-----------------------------------
#
         'USER_REGHOST' => $user_reghost,
#
#-----[ FIND ]------------------------------------------
#
         'L_ICQ_NUMBER' => $lang['ICQ'],
#
#-----[ BEFORE, ADD ]-----------------------------------
#
         'L_REGHOST' => $lang['Registration_Host'],
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/user_edit_body.tpl
#
#-----[ FIND ]------------------------------------------
#
   <tr>
     <td class="catsides" colspan="2">&nbsp;</td>
   </tr>
   <tr>
     <th class="thSides" colspan="2">{L_PROFILE_INFO}</th>
#
#-----[ BEFORE, ADD ]-----------------------------------
#
   <tr>
     <td class="row1"><span class="gen">{L_REGHOST}: </span></td>
     <td class="row2"><span class="gen">{USER_REGHOST}</span></td>
   </tr>
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
# this is a partial match
#
$lang['Install_No_PCRE']
#
#-----[ AFTER, ADD ]------------------------------------
#
$lang['Registration_IP'] = 'Registration IP Host';
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------
#
# EoM
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am


Return to phpBB Hacks and MODs

Who is online

Users browsing this forum: No registered users and 1 guest

cron