Anti Spam Bot

Se avete dubbi ,qualche domanda o malfunzionamenti riguardante il nostro sito postate senza paura....

Moderatori: silvietta, admin

Anti Spam Bot

Messaggioda Liam85 il mer mag 23, 2007 2:35 pm

girando per il web sono riuscito a trovare un sistema che teoricamente elimina o impedisce ai bot di scassare le palline....

Allora

Aprite il file phpbb2/includes/usercp_register.php

Cercate :

Codice: Seleziona tutto
if ( !defined('IN_PHPBB') )
{
   die("Hacking attempt");
   exit;
}
$unhtml_specialchars_match = array('#>#', '#<#', '#"#', '#&#');
$unhtml_specialchars_replace = array('>', '<', '"', '&');


Aggiungete :

Codice: Seleziona tutto
$num1=intval($HTTP_POST_VARS['num1']);
$num2=intval($HTTP_POST_VARS['num2']);
$risposta_esatta=$num1+$num2;
$risposta=intval($HTTP_POST_VARS['risposta']);


Cercate :

Codice: Seleziona tutto
else if ( $mode == 'register' )
   {
      if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email) )
      {
         $error = TRUE;
         $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
      }

   }


Sostituite con :

Codice: Seleziona tutto
else if ( $mode == 'register' )
   {
      if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email) )
      {
         $error = TRUE;
         $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
      }

      if ($risposta!=$risposta_esatta)
      {
         $error = TRUE;
         $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . "La risposta dello Spam-Bot è errata";
      }
   }


Cercate :

Codice: Seleziona tutto
//
   // Let's do an overall check for settings/versions which would prevent
   // us from doing file uploads....
   //
   $ini_val = ( phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var';
   $form_enctype = ( @$ini_val('file_uploads') == '0' || strtolower(@$ini_val('file_uploads') == 'off') || phpversion() == '4.0.4pl1' || !$board_config['allow_avatar_upload'] || ( phpversion() < '4.0.3' && @$ini_val('open_basedir') != '' ) ) ? '' : 'enctype="multipart/form-data"';


Aggiungete :

Codice: Seleziona tutto
   $num1=intval(rand(0, 5));
   $num2=intval(rand(0, 5));


Cercate :

Codice: Seleziona tutto
'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="' . append_sid("faq.$phpEx?mode=bbcode") . '" target="_phpbbcode">', '</a>'),
      'SMILIES_STATUS' => $smilies_status,


Aggiungete :

Codice: Seleziona tutto
      'NUM1' => $num1,         
      'NUM2' => $num2,


Aprite il file del template profile_add_body.tpl

Cercate :

Codice: Seleziona tutto
   <tr>
     <td class="row1"><span class="gen">{L_DATE_FORMAT}:</span><br />
      <span class="gensmall">{L_DATE_FORMAT_EXPLAIN}</span></td>
     <td class="row2">
      <input type="text" name="dateformat" value="{DATE_FORMAT}" maxlength="14" class="post" />
     </td>
   </tr>


Aggiungete :

Codice: Seleziona tutto
     <td class="row1"><span class="gen">Rispondi alla seguente domanda:</span><br />
      <span class="gensmall">Anti-Spam-Bot By Rossi46GO</span></td>
     <td class="row2">
      <span class="gensmall">Quanto fa {NUM1}+{NUM2}?</span>
      <input type="hidden" name="num1" value="{NUM1}" />
      <input type="hidden" name="num2" value="{NUM2}" />
      <input type="text" name="risposta" value="risposta" maxlength="8" class="post" />
     </td>
   </tr>
Immagine
Avatar utente
Liam85
:: Madferit Storico ::
:: Madferit Storico ::
 
Messaggi: 13858
Iscritto il: lun set 16, 2002 2:43 pm
Località: Mestrecher (VENEZIA)
Album Oasis: (What's the story?) morning glory
Tifo per: F.C. INTER
Film: Bastardi Senza Gloria

Torna a REGOLAMENTO,Bugs ,Problemi ,Domande sul Sito

Chi c’è in linea

Visitano il forum: Nessuno e 11 ospiti