Image-Based Bot Detector is a variant of image-based CAPTCHAs that uses human ability to recognize a distorted region on the image he never seen before.
Licence
Download Image-Based Bot Detector
Requires .NET Framework 2.0
If you want to use template images that are placed elsewhere then a subfolder of your web application - for example, from database - you have to override GetTemplateImage method.
To check whether user passed the test IsValid property is used. Also user can be locked after a predefined number of unsuccessful attempts to pass the test (FailedAttemptsBeforeLocking property, default value is 5).
Licence
Download Image-Based Bot Detector
Requires .NET Framework 2.0
Overview, help
In order to use it you have to set TemplateImageFolder property to relative virtual path of the template images folder - for example, "~/templates" and to add registration of HttpHandler in web.config.<httpHandlers>There are 3 types of predefined distortion (Stretched, Random, Volute) and user-defined (Custom) distortion. In order to use predefined distortion it needs to set DistortionType property. User-defined distortion can be used in derived classes with overriden DrawCustom method.
<add verb="GET" path="ImageBasedBotDetector.ashx"
type="Marss.Web.UI.Controls.ImageBasedBotDetector, Marss.Web"/>
</httpHandlers>
If you want to use template images that are placed elsewhere then a subfolder of your web application - for example, from database - you have to override GetTemplateImage method.
To check whether user passed the test IsValid property is used. Also user can be locked after a predefined number of unsuccessful attempts to pass the test (FailedAttemptsBeforeLocking property, default value is 5).
Public properties | |
TemplateImageFolder | Gets or sets template image folder. |
FailedAttemptsBeforeLocking | Gets or sets the number of unsuccessful attempts before locking. |
IsValid | Gets result of test passing. |
IsLocked | Gets or sets value indicating where user is locked. |
DistortionType | Gets or sets distortion type. Available types:
|
Public events | |
Locked | Occurs when detector has been locked because of exceeding the failed attempts limit. public event EventHandler Locked |
Protected virtual methods | |
GetTemplateImage | Gets template image. protected virtual System.Drawing.Image GetTemplateImage() See example of usage. |
DrawCustom | Distorts specified rectangle of image in a user defined way. Have to be used coupled with DistortionType=Custom protected virtual void DrawCustom(System.Drawing.Bitmap bitmap, System.Drawing.Image img, Rectangle distortedRectangle) where bitmap - the output image, img - the template (input) image, distortedRectangle - area on the image to be distorted. |
Comments
Post a Comment