Re: Antibot Form Submission Composite Behavior

2015-08-13 Thread Tom Eicher (von unterwegs)
BTW I have found I can recognize many spambots by adding a form field with a 
common name like "message" and make that invisible using css display none. If 
the field is filled in, its no regular user...
Cheers, Tom.

-- 
Gesendet vom Mobiltelefon - Bitte Tippfehler, fehlende Umlaute und Kürze 
gegebenenfalls zu entschuldigen.

Re: Antibot Form Submission Composite Behavior

2015-08-12 Thread Simon B
Hi Martin, 

Thanks for your suggestion, the thing about the bot that was accessing my
site was that it it didn't give any user agent information which leads me to
think that it was malicious.

I've put together the following behaviour (included at the end of this) and
will use that for the time being to see whether its fit for purposes in real
life.

Cheers
Simon




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Antibot-Form-Submission-Composite-Behavior-tp4671760p4671779.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Antibot Form Submission Composite Behavior

2015-08-11 Thread Martin Grigorov
Hi,

I'd recommend you to read
https://developers.google.com/webmasters/control-crawl-index/docs/robots_txt
.
I guess it is possible to disable the bot partially or completely.

About your behavior: it should contribute a JS file similar to this:
$(function() {
  var loadTime, focusTime, submitTime;

  $(window).load(function() {loadTime = Date();})

  $('input, select, textarea').focus(function() {focusTime = Date()});

  $('form').submit(function(){
 submitTime = Date();

 return isEverythingOk(loadTime, focusTime, submitTime);
  });

})


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Aug 10, 2015 at 3:38 PM, Simon B  wrote:

> Hi,
>
> I want to add a behavior to a Form object that helps stop bots successfully
> submitting the form.
>
> In order to do this I've come up with the following idea.
>
> Get a timestamp of when the web page loads
> Get a timestamp of when the form first receives user focus
> Get a timestamp of when the submit button is clicked
>
> With that information so long as there is a reasonable time difference
> between the three timestamps then allow the form to be submitted, if not
> then add a form error .
>
> I'm a bit unsure about how to go about implementing this, but was thinking
> about creating an AntibotBehaviour that I could add to a a form, the
> AntibotBehavior would wrap other AjaxEventBehaviors pinging the
> AntibotBehavior for each event (page load, form focus, form submission).
>
> Does anyone have an example of a behavior that I look at to base my
> implementation on.
>
> Alternatively does anyone have an Antibot behavior that they could show me?
>
> Cheers
> Simon
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Antibot-Form-Submission-Composite-Behavior-tp4671760.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>