22 พฤษภาคม 2555, 15:55:21
ยินดีต้อนรับผู้เยี่ยมชม
  • noavata
  • ยินดีต้อนรับคุณ, ผู้เยี่ยมชม กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน
    เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น
Page Rank

ทำเว็บไซต์ | แต่งบอร์ด | ออกแบบ | SMF | Joomla | Drupal | WordPress | JQuery | CMS | ECommerce | Tel. +668-08577477

ส่งหัวข้อนี้พิมพ์ หน้า: 1 
icon message ผู้เขียน หัวข้อ: Anti-Bot Registration Puzzles ป้องกันฝรั่งขาย Viagra  (อ่าน 2583 ครั้ง)
0 สมาชิก และ 2 ผู้เยี่ยมชม กำลังดูหัวข้อนี้
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general เมื่อ: 17 มิถุนายน 2553, 23:27:46
  • ชื่อ: Anti-Bot Registration Puzzles
  • ผู้เขียน: Nas
  • นำเสนอโดย: DexMoreGroup
  • ประเภท: Security and Moderation
  • รองรับ: SMF 1.1.xx, 2.0.xx
  • ปรับปรุงล่าสุด: 1 มกราคม 2553
  • ต้นฉบับ: Anti-Bot Registration Puzzles

รายละเอียด
      ป้องกันชาวต่างชาติสมัครสมาชิกเข้าโพสต์สแปมคุณสมบัติแบบนี้ครับ
  • สุ่มเลือกคำปริศนา
  • คำถามเป็นรูปทรง
  • คำถามเป็นตัวเลข
  • คำถามเป็นสี
  • สุ่มคำถามในแต่ละปริศนา
  • สุ่มฟิลด์คำตอบ

ตัวอย่าง


สำหรับ SMF 1.1.xx

แก้ไขไฟล์:

file $sourcedir/Register.php

ค้นหา -->>
โค๊ด: [Select]
// Are they under age, and under age users are banned?

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Start of Anti-bot Registration Puzzles Mod
// Checks whether field was completed, if not it goes to an error screen
if(empty($_SESSION['puzzle_dynamic_input']) || empty($_POST[$_SESSION['puzzle_dynamic_input']]))
fatal_lang_error('puzzle_incomplete', false);
// If puzzle was answered incorrectly
elseif (md5(strtolower($_POST[$_SESSION['puzzle_dynamic_input']])) != $_SESSION['puzzle_code'])
fatal_lang_error('puzzle_incorrect', false);
// End of Anti-bot Registration Puzzles Mod

ค้นหา -->>
โค๊ด: [Select]
// Under age restrictions?
if (!empty($modSettings['coppaAge']))
{
$context['show_coppa'] = true;
$context['coppa_desc'] = sprintf($txt['register_age_confirmation'], $modSettings['coppaAge']);
}

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
// Start of Anti-bot Registration Puzzles Mod
$puzzles = array(
'shapes' => create_function('', '
$a = array(0 => "sides", 1 => "corners");
$b = rand(0,1);
$c = array(\'square\' => 4, \'rectangle\' => 4, \'pentagon\' => 5,
\'hexagon\' => 6, \'heptagon\' => 7, \'octagon\' => 8);

$d = array_rand($c); // randomly select a shape
$e = $c[$d]; // the answer
global $txt;
$txt[\'puzzle_shapes\'] = sprintf(($d == \'octagon\' ? $txt[\'puzzle_shapes2\'] : $txt[\'puzzle_shapes\']), $txt[\'puzzle_\'.$a[$b]], $txt[\'puzzle_\'.$d]);
return array(\'shapes\', \'\', md5($e));
'),
'math' => create_function('', '
$a = array();
$a[0] = rand(5,19);
$a[1] = rand(1,$a[0]-2);
$a[2] = rand(1,($a[0]-$a[1]-2));
$a[3] = array("+","-");
$a[4] = $a[3][array_rand($a[3])];
$a[5] = $a[3][array_rand($a[3])];
$d = "$a[0]$a[4] $a[1] $a[5] $a[2]";
eval("\$d=" . $d . ";");
return array(\'math\', "<span style=\"font-weight:bold;\">$a[0] $a[4] $a[1] $a[5] $a[2] =</span>", md5($d));
'),
'math2' => create_function('', '
$a = array();
$a[0] = rand(5,19);
$a[1] = rand(1,$a[0]-2);
$a[2] = rand(1,($a[0]-$a[1]-2));
$a[3] = array("+","-");
$a[4] = $a[3][array_rand($a[3])];
$a[5] = $a[3][array_rand($a[3])];
$c = array(rand(0,1),rand(0,1),rand(0,1));
$d = "$a[0]$a[4] $a[1] $a[5] $a[2]";
// Whats the sum/answer
eval("\$d=" . $d . ";");
// Access txt strings
global $txt;
return array(\'math\', \'<span style="font-weight:bold;">\'.($c[0] ? $a[0] : $txt[\'puzzle_\'.$a[0]]).\' \'.$a[4].\' \'.($c[1] ? $a[1] : $txt[\'puzzle_\'.$a[1]]).\' \'.$a[5].\' \'.($c[2] ? $a[2] : $txt[\'puzzle_\'.$a[2]]).\' = </span>\', md5($d));
'),
'colors' => create_function('', '
$a = array(\'red\' => \'#FF0033\', \'orange\' => \'#FF6600\', \'yellow\' => \'#FFFF33\', \'green\' => \'#006600\', \'blue\' => \'#0033FF\', \'purple\' => \'#663366\', \'pink\' => \'#FF9999\', \'black\' => \'#000000\', \'grey\' => \'#999999\');

// Select them randomly
$b = array_rand($a,8);
$c = $b[rand(0,7)]; // the answer
$d = \'\';
// Access txt strings
global $txt;
for($i=0;$i<=7;$i++)
{
// Color or hex? randomly change
$e = rand(0,1);
$j = $i+1;
if($c == $b[$i] || $c == $b[$j])
$d .= \'<span style="font-weight:bold;color:\'. ($e ? $a[$c] : $c ) .\'">\'. $txt[\'puzzle_\'.$c] .\'</span> \';
else
$d .= \'<span style="font-weight:bold;color:\'. ($e ? $a[$b[$i]] : $b[$i] ) .\'">\'. $txt[\'puzzle_\'.$b[$j]] .\'</span> \';
$i++;
}
unset($a,$b,$e,$i,$j);
return array(\'colors\', $d, md5(strtolower($txt[\'puzzle_\'.$c])));
'),
);
// Generate a new puzzle code every time
$_SESSION['puzzle_dynamic_input'] = $_SESSION['puzzle_code'] = '';

// Generate Random field name
$range1 = range('a', 'z');
$range2 = range(0, 9);
// Must start with a letter not a digit
$_SESSION['puzzle_dynamic_input'] = $range1[array_rand($range1)];
// Length over 8
$rand = rand(8,12);
for($i=0;$i<=$rand;$i++)
$_SESSION['puzzle_dynamic_input'] .= (rand(0, 1) == 0) ? $range1[array_rand($range1)] : $range2[array_rand($range2)];

unset($range1, $range2, $rand);

// Choose a puzzle
$context['puzzle'] = $puzzles[array_rand($puzzles)]();
$_SESSION['puzzle_code'] = $context['puzzle'][2];
$context['puzzle'][2] = $_SESSION['puzzle_dynamic_input'];
unset($puzzles);
// End of Anti-bot Registration Puzzles Mod

file $themedir/Register.template.php

ค้นหา -->>
โค๊ด: [Select]
// Are there age restrictions in place?
if (!empty($modSettings['coppaAge']))

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Start of Anti-bot Registration Puzzles Mod
echo '<tr valign="top">
<td width="40%" valign="top">
<b>'.$txt['puzzle_'.$context['puzzle'][0]].'</b><br />
'.$txt['puzzle_antibot'].'
</td>
<td>
'. ( empty($context['puzzle'][1]) ? '' : $context['puzzle'][1].'<br />' ) .'
<input type="text" name="'.$context['puzzle'][2].'" size="30" value="" tabindex="', $context['tabindex']++, '" />
</td>
</tr>';
// End of Anti-bot Registration Puzzles Mod

file $themedir/languages/Modifications.thai-utf8.php

เพิ่ม -->>
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

ลิงค์หัวข้อ: http://dexmore.com/topic/2008
Windows XP    Firefox 3.6.3   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 1 เมื่อ: 25 มิถุนายน 2553, 08:48:33
สำหรับ SMF 2.0.xx

แก้ไขไฟล์:

file $sourcedir/Register.php

ค้นหา -->>
โค๊ด: [Select]
// Are they under age, and under age users are banned?

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Start of Anti-bot Registration Puzzles Mod
// Checks whether field was completed, if not it goes to an error screen
if(empty($_SESSION['puzzle_dynamic_input']) || empty($_POST[$_SESSION['puzzle_dynamic_input']]))
fatal_lang_error('puzzle_incomplete', false);
// If puzzle was answered incorrectly
elseif (md5(strtolower($_POST[$_SESSION['puzzle_dynamic_input']])) != $_SESSION['puzzle_code'])
fatal_lang_error('puzzle_incorrect', false);
// End of Anti-bot Registration Puzzles Mod

ค้นหา -->>
โค๊ด: [Select]
// Under age restrictions?
if ($context['show_coppa'])
{
$context['skip_coppa'] = false;
$context['coppa_agree_above'] = sprintf($txt['agreement_agree_coppa_above'], $modSettings['coppaAge']);
$context['coppa_agree_below'] = sprintf($txt['agreement_agree_coppa_below'], $modSettings['coppaAge']);
}

เพิ่มไว้หลัง -->>
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

file $themedir/Register.template.php

ค้นหา -->>
โค๊ด: [Select]
if ($context['visual_verification'])
{
echo '
<h4 class="titlebg"><span class="left"></span>
', $txt['verification'], '
</h4>
<div class="windowbg2">
<span class="topslice"><span></span></span>
<fieldset class="content centertext">
', template_control_verification($context['visual_verification_id'], 'all'), '
</fieldset>
<span class="botslice"><span></span></span>
</div>';
}

แก้เป็น -->>
โค๊ด: [Select]
// Start of Anti-bot Registration Puzzles Mod
echo '
<h4 class="titlebg"><span class="left"></span>
', $txt['verification'], '
</h4>
<div class="windowbg2">';

echo'
<span class="topslice"><span></span></span>
<dl class="register_form" id="custom_group">
<dt>
<strong>', $txt['puzzle_'.$context['puzzle'][0]], '</strong>
<span class="smalltext">', $txt['puzzle_antibot'], '</span>
</dt>
<dl>
', (empty($context['puzzle'][1]) ? '' : $context['puzzle'][1].'<br />'), '
<input type="text" name="', $context['puzzle'][2], '" size="30" value="" tabindex="', $context['tabindex']++, '" />
</dl>
</dl>
</fieldset>

';

if ($context['visual_verification'])
{
echo'
<fieldset class="content centertext">
', template_control_verification($context['visual_verification_id'], 'all'), '
</fieldset>';
}

echo'
<span class="botslice"><span></span></span>
</div>';

// End of Anti-bot Registration Puzzles Mod

file $themedir/languages/Modifications.thai-utf8.php

เพิ่ม -->>
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

ลิงค์หัวข้อ: http://dexmore.com/topic/2008
Windows XP    Firefox 3.6.4   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
โรงานปิดคิดฮอดน้อง
*



Thailand   ชาย ออฟไลน์http://facebook.com/tumla
icon message
general ความคิดเห็นที่ 2 เมื่อ: 7 ธันวาคม 2554, 15:48:35
ถามไรหน่อยครับ ตรงคำถามที่ขึ้นมา  ว่า เลือกคำถามที่ตรงกับคำที่แสดง  พอผม ตอบตามสีที่เห็นไม่บอกว่าไม่ถูกต้อง....

ลิงค์หัวข้อ: http://dexmore.com/topic/2008
Windows XP    Firefox 8.0   see ip บันทึกการเข้า
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 3 เมื่อ: 7 ธันวาคม 2554, 16:25:24
ในตัวอย่างนี้คุณตอบว่าไงครับ


ลิงค์หัวข้อ: http://dexmore.com/topic/2008
Windows XP    Firefox 8.0   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
โรงานปิดคิดฮอดน้อง
*



Thailand   ชาย ออฟไลน์http://facebook.com/tumla
icon message
general ความคิดเห็นที่ 4 เมื่อ: 7 ธันวาคม 2554, 16:47:41
ในตัวอย่างนี้คุณตอบว่าไงครับ


แดง เทา ชมพู ฟ้า    ตามนี้ครับ

ลิงค์หัวข้อ: http://dexmore.com/topic/2008
Thx by sunny
Windows XP    Firefox 8.0   see ip บันทึกการเข้า
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 5 เมื่อ: 7 ธันวาคม 2554, 17:02:07
ตอบผิดครับ

อ่านคำถามซิครับ

เลือกคำที่ตรงกับสีที่แสดง

คำที่ตรงกับสีที่แสดงในที่นี้ก็คือ แดง

ม่วง เป็นอักษรสีเทา

เหลือง เป็นอักษรสีแสด

ส้ม เป็นอักษรสีน้ำเงิน

คำตอบที่ถูกต้องคือ แดง

ลิงค์หัวข้อ: http://dexmore.com/topic/2008
Windows XP    Firefox 8.0   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
โรงานปิดคิดฮอดน้อง
*



Thailand   ชาย ออฟไลน์http://facebook.com/tumla
icon message
general ความคิดเห็นที่ 6 เมื่อ: 7 ธันวาคม 2554, 17:16:09
OK ครับ เกจ เกจ แล้วครับท่าน................

ลิงค์หัวข้อ: http://dexmore.com/topic/2008
Windows XP    Firefox 8.0   see ip บันทึกการเข้า
*



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 7 เมื่อ: 17 มีนาคม 2555, 20:15:17
ขอลองไปทดสอบนะครับ

ลิงค์หัวข้อ: http://dexmore.com/topic/2008
Windows NT 6.1    Chrome 17.0.963.79   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
ส่งหัวข้อนี้พิมพ์ หน้า: 1 
กระโดดไป:  

Creative Commons License

SMF Thai Translation Powered by SMF © 2006–2012, Simple Machines LLC

WordPress Google เข้าเยี่ยมชมหน้านี้ล่าสุดเมื่อ : 19 พฤษภาคม 2555, 16:59:19

jQuery Plugin Copyright © 2551-2555 Themes Design & Hosting by DexMoreGroup

Sitemap | Thai Simple Machines Forum support SMF Thai

Web Begining | SMF Modifications | SMF Thai Translation Web Begining

Drupal | WordPress | CMS Joomla | jQuery Plugin | Web Graphics CMS Joomla