Hi folks,

I have written a new class for generating better Captcha images for osTicket. I wrote and tested it on a clean installation of v1.11 however it appears that as the code for Captcha generation has remained unchanged since v1.8.0 that it should work just fine from that version onwards (possibly earlier versions too) - but I make no guarantees there!

The mod consists of a drop-in replacement for the /includes/class.captcha.php file which is part of the osTicket core. You Captcha uses a background generated from random colour/brightness pixels and you can configure various aspects of the Captcha, including:

• You can specify the font face with a file (default is arial.ttf)
• You can specify the font size
• Characters can be rendered in colour or grayscale
• Background can be generated from random colour or random grayscale pixels
• Characters can be generated in fixed or random colour/random grayscale
• You can set the upper and lower RGB/grayscale intensity for background pixels, to adjust contrast between
the background and the text
• You can customise pixel size for the randomly generated background (default is 6x6 pixel squares)
• You can set (or disable with 0) a random rotation range for characters
• You can adjust the margin for the character cells/random character placement routines

You can download this from my github at: https://github.com/the-wazir/osTicket/tree/master/osTicketCaptchaV2

I will create a new plugin soon which integrates Google ReCaptcha and also the custom generation which this mod currently performs (which has it's own use cases apart from ReCapthca) so keep an eye on my top level GitHub repo for updates!

Thanks for this awesome tool, I hope my work helps out some of you in the community ?

Write a Reply...