1
irmtfan
Local Math Captcha Hack (to provide more protection against spams)
  • 2013/4/15 8:44

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


Local Math Captcha Hack - irmtfan - www.xoops.org - www.xoops.ir
===========================
This is a very simple hack to change the XOOPS math captcha from figures to local words to provide more protection against spams.
Example: {3} + {4} = ? will be changed to {three} + {four} = ? in english
This hack had been introduced about one year ago in XOOPS255 persian release and was completely effective in persian websites. eg: I had not one single spam in my website for more than a year while previously I had 5 or 6 daily spams.
I hope this hack will be useful in other local communities and even english websites.
Please try it and report the result in xoops.org forums.

Install
--------------------------
Just copy 2 files in this package
1- ./htdocs/class/captcha/text.php

2- ./htdocs/language/english/locale.php

Note:
--------------------------
In XOOPS255 the captcha is set to "image" by default. You should change the captcha mode to "text" in XOOPS255/class/captcha/config.php
'mode' => 'text',  // default mode, you can choose 'text', 'image', 'recaptcha'(requires api key)


You can back to old figures by changing the setting in ./htdocs/language/english/locale.php
define("_NUM_TYPE","word"); // you can choose "figure","word","image"

]

Translation:
----------------
You can implement this hack for your own language by:
1- Copying ./htdocs/language/english/locale.php into ./htdocs/language/YOUR_LANG/locale.php
2- Translate figures to your own language (currently you only need to translate 1-9):
$_numWords = array(    '0'=> '' ,
                    
'1'=> 'one' ,
                    
'2'=> 'two' ,
                    
'3' => 'three',
                    
'4' => 'four',
                    
'5' => 'five',
                    
'6' => 'six',
                    
'7' => 'seven',
                    
'8' => 'eight',
                    
'9' => 'nine',
                    
'10' => 'ten',
                    
'11' => 'eleven',
                    
'12' => 'twelve',
                    
'13' => 'thirteen',
                    
'14' => 'fouteen',
                    
'15' => 'fifteen',
                    
'16' => 'sixteen',
                    
'17' => 'seventeen',
                    
'18' => 'eighteen',
                    
'19' => 'nineteen',
                    
'20' => 'twenty',
                    
'30' => 'thirty',
                    
'40' => 'fourty',
                    
'50' => 'fifty',
                    
'60' => 'sixty',
                    
'70' => 'seventy',
                    
'80' => 'eighty',
                    
'90' => 'ninty',
                    
'100' => 'hundred &',
                    
'1000' => 'thousand &',
                    
'1000000' => 'million',
                    
'1000000000' => 'billion');


TO DO:
---------------------
show numbers as figure images.

Download:
---------------------
www.jadoogaran.org/test255/local_math_captcha_hack_255_256.zip

2
Alen
Re: Local Math Captcha Hack (to provide more protection against spams)
  • 2014/9/11 10:03

  • Alen

  • Just popping in

  • Posts: 3

  • Since: 2012/4/15


excuse me!
Where can download the ocal Math Captcha Hack files?

The requested URL /test255/local_math_captcha_hack_255_256.zip was not found on this server.

thanks

3
Cifug
Re: Local Math Captcha Hack (to provide more protection against spams)
  • 2014/9/17 7:55

  • Cifug

  • Quite a regular

  • Posts: 208

  • Since: 2007/12/13


Nice, just found this because of Alen's bump.

Thanks irmtfan

Cheers,
Marty

Login

Who's Online

170 user(s) are online (106 user(s) are browsing Support Forums)


Members: 0


Guests: 170


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits