Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
2 - 0 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     
style['font-size'] = "20"; $this->style['font-family'] = "courier, verdana, arial"; $this->style['color'] = "#FF0000"; $this->style['background-color'] = "#F5F5F5"; $this->style['border-width'] = "2px"; $this->style['border-style'] = "solid"; $this->style['border-color'] = "#FFCC00"; $this->style['width'] = "80px"; $this->style['line-height'] = "20px"; } /** * Method to delete the old temporary verification Images */ function free(){ // Delete the all old temporary images foreach(glob($this->path."*.png") as $tmp) unlink($tmp); } /** * Register a new session Session */ function register_session(){ // Register a new session with new value $this->sess_name = "checkSpam".session_id().$this->sess_counter; $this->sess_value = $this->create_secretcode(); $_SESSION[$this->sess_name] = $this->sess_value; $this->write_log("Session: $this->sess_name registered successfully with the value of: $this->sess_value !"); // Increment session counter $this->sess_counter++; } /** * Starts generate the secret code */ function create_secretcode(){ return substr(md5(rand()),0,4); } /** * Generate the temporary PNG image verfication */ function create_image(){ // Create the image $this->imagetext = imagecreatetruecolor(80,30); // Create the rectangle with borders imagefilledrectangle($this->imagetext, 0, 0, 80, 30, imagecolorallocate($this->imagetext,150,150,150)); imagefilledrectangle($this->imagetext, 1, 1, 78, 28, imagecolorallocate($this->imagetext,255,255,255)); //Adding some verticals lines for($i = 5; $i imagetext, rand($i - 2, $i + 2), 1, rand($i - 2, $i + 2), 28, imagecolorallocate($this->imagetext,rand(150,200),rand(150,200),rand(150,200)) ); } //Adding some horizontal lines for($i = 5; $i imagetext, 1, rand($i - 2, $i + 2), 78, rand($i - 2, $i + 2), imagecolorallocate($this->imagetext,rand(150,200),rand(150,200),rand(150,200)) ); } // Add the secret code $x = 5; // Space blank between evey character for($i = 0; $i sess_value); $i++){ imagettftext( $this->imagetext, 18, rand(-20,20), $x, rand(20,25), imagecolorallocate($this->imagetext,rand(50,200),rand(50,200),rand(50,200)), $this->path."fonts/hockey.ttf", $this->sess_value{$i} ); $x += 20; } //Applies some distortion effects imagefilter($this->imagetext, IMG_FILTER_SMOOTH, 15); // Save the temporary image into the path of the class $this->tmp_img = $this->path.$this->sess_name.time(); imagepng($this->imagetext,$this->tmp_img.".png"); } /** * Build new image/text verification */ function create_imagetext(){ // Check if the graphic mode is enabled or the GD Library Extension is available if($this->graphic && $this->check_gdlibrary()){ // Call the function to create the temporary image verfication $this->create_image(); $this->imagetext = "tmp_img.".png\" border=\"0\" alt=\"secret code\" title=\"secret code\" />"; $this->write_log("Starts create IMAGE verification !"); }else[color=FF0000]{ // Text mode $this->imagetext = "style as $key => $value){ $this->imagetext .= "$key:$value; "; } $this->imagetext .= "\">$this->sess_value"; $this->write_log("Starts create TEXT verification !"); }[/color] } /** * Check if the GD library is available * We can extends this methods to permit many other types of image format, such as JPEG, GIF and much more... */ function check_gdlibrary(){ if(function_exists('gd_info')){ $this->gd_info = gd_info(); if($this->gd_info['PNG Support']){ $this->write_log("GD Library Extension are available, version: ".$this->gd_info['GD Version']." with PNG Support !"); return true; }else{ $this->write_log("GD Library Extension are available, version: ".$this->gd_info['GD Version']." without PNG Support !"); return false; } }else{ $this->write_log("GD Library Extension are not available !"); return false; } } /** * method to write to the log * @param string $message Message to write to the log */ function write_log($message){ if(strlen($message) > 0) $this->log .= date("[m d Y - H:i]")." $message\n"; } /** * Starts or continues Session */ function init_session(){ if(!session_id() && $this->session_start){ session_start(); $this->write_log("Sessions started !"); }else{ $this->write_log("Sessions is already started !"); } } /** * Execute the complete procedure to create an anti-spam control * @param char $type (0 = Text | 1 = Image) The type of verification */ function exec_checkspam($type = 1){ // Set the type of verification $this->graphic = ($type == 1) ? true : false; // Try to init or continue a session $this->register_session(); // Starts building new code image/text verification $this->create_imagetext(); } /** * Method to print out the Image/Text verification */ function print_imagetext(){ echo $this->imagetext; } /** * Method to print out the Input Form * @param string $params Some paramters for the input form */ function print_input($params = "name=\"secretcode\""){ // Check if exist an image / text code verification to input if($this->sess_counter != 0){ echo "sess_name\" />"; echo "sess_value)."\" />"; $this->write_log("Input form printed out for: $this->sess_name !"); }else{ $this->write_log("Image or text does not exist for the verification of the code for: $this->sess_name !"); } } /** * Method to verify the code sent by the form * @param string $code The code sent by the form */ function verify($code){ // Try to retrieve information about the input if(isset($_POST["checkspam"])){ // Work with POST values $this->sess_value = $_SESSION[$_POST["checkspam"]]; }else{ if(isset($_GET["checkspam"])){ // Work with GET values $this->sess_value = $_SESSION[$_GET["checkspam"]]; }else{ // No data to check return false; } } // Check the code return ($code == $this->sess_value) ? true : false; } /** * Method to print out the log */ function print_log(){ //Print out the log var content echo "$this->log"; } } ?>[/quote] Hope it helps Regards Ashley[/quote]" />

Re: NewBB Spam Posts - Any simple challenge hack avail?
by Mamba on 2009/9/7 6:35:10

Probably dfx_comments is not compatible with PHP5

In general context, see this thread
Re: NewBB Spam Posts - Any simple challenge hack avail?
by demazero on 2009/9/7 5:21:06

Hi .. im install dfx_comments in my XOOPS 2.0.18
using php 5 and i got an error when i submitted the comment
:

Fatal error: Using $this when not in object context in C:\xampp\htdocs\portalkpk1\class\xoopsform\securityimage.php on line 497

does anyone know about this error .. thanks
Re: NewBB Spam Posts - Any simple challenge hack avail?
by Vargr on 2008/1/17 17:27:16

I have tried to upload the SecurityImage module by DuGris.

But when trying to install the module it comes with a rather strange error message:

Installing SecurityImage

ȃp? ?.???cŽc? ?..??Ƀp??admin?àÊšÜp??class?àʝÜp??fonts?àÊ©Üp??images?ʾÜp??include?ÅÜp??language?üáèâƒp? ?xoops_version.php?Æ485?߃p?d index.html?èâƒp?P+.pureftpd-upload.478f5fcb.15.10ae2.f37c2485 is not a valid SQL!

Unable to install securityimage. Error(s):
Back to Module Administration page


It looks somewhat like a doublebyte error but that would seem rather strange.

Other modules install without a problem.


XOOPS: 2.0.17.1
Software server Apache/2.0.61 (FreeBSD) PHP/5.2.5 with Suhosin-Patch
PHP version 5.2.5
MySql version 5.0.41-log


It installed just fine in my sandbox - the only different I can see being that of "status safe mode" being different between the two (an dI have no idea how to change that in my sandbox to see if it makes a difference). That and the fact taht my sandbox runs MySQL 2.2.6.


I hope somebody can help me tracking down the problem so that I may install this module.


LATER ADDITION SAME EVENING:

It works now - I don't know why it didn't work, but I think I know how I made it work, which only proves that the Gods favour the stupid.

I was playing around on my sandbox (a webserver system on my local computer) and installing SecureImage again in a duplicate setup to the one on the public server. However, my MySQL settings pointed to the public server and not the sandbox. Apparently the MySQL got updated correctly that way and now the module is installed. Sounds strange but that seems to have been what finally fooled it into working.
Re: NewBB Spam Posts - Any simple challenge hack avail?
by Tobias on 2007/4/17 1:04:55

That's scary! I'm currently protecting parts of my site with three layers: GIJoe's XoopsProtector v.3 (I've set it to discard any post with more than 2 URLs), Richard Virtue's Netquery which checks everything with Bad Behavior (well formedness of HTML requests and some other tests), plus a semantic check against Akismet (link to our discussion of it a few posts above). Incredibly enough, there're still submissions making their way through! They're, of course, pretty truncated an sometimes don't even point anywhere. All the more annoying. That's not even spam, that's just garbage.

I had actually hoped to shore things up with Captchas should it become necessary. It's a hassle for legit users, though.
Re: NewBB Spam Posts - Any simple challenge hack avail?
by THEM1060 on 2007/4/16 12:49:50

I've been getting a flood of spam over the past week even with SecurityImage installed.

Anyone else found that somehow the module's effectiveness has been compromised?

Who's Online

601 user(s) are online (324 user(s) are browsing Support Forums)


Members: 0


Guests: 601


more...

Donat-O-Meter

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

Latest GitHub Commits