|
|
|
|
|
by qntm
5064 days ago
|
|
> How about we just make a "blacklist" of these known bots, look up every user agent, and compare against the blacklist? So now every single request to your site has to do a substring match against every single term in this list. Depending on your site's implementation, this is probably not trivial to do without taking some sort of performance hit. Build a finite state machine which only accepts the terms in the blacklist. That should be a one-time operation. Then feed each request into the FSM and see if you get a match. Execution time is linear in the length of the request, regardless of the number of terms in the blacklist. |
|
There's no need to program like it's 1985 any more.