Forum Moderators: open
There's a bot using a spoofed user_agent like this "LZNKRVKZ"
It goes directly to one page on my site, which happens to display a short article on a security flaw in "Sudo" Im wondering if there's any correlation, is it possible the bot is looking for keywords with Sudo to find security flaws on my site? It's weird that this seems to be the only page it grabs, and Ive seen less than friendly activity from bots that have cryptic names like "LZNKRVKZ" for user agents. Hmmmmm....
The following should work just as well. When I came up with the solution I mistakenly believed that [A-Z] would also ban spaces. Of course, it doesn't.
SetEnvIf User-Agent "^([A-Z]+)$" ban
It should work even if you don't have mod_rewrite privileges. You have to add this line in the appropriate space of your .htaccess file for it to work.
deny from env=ban
Example:SetEnvIf User-Agent "^([A-Z]+)$" ban
<Limit GET POST>
order allow,deny
allow from all
deny from env=ban
</Limit>
This will not ban any user agent which contains numbers or special characters. Only upper case alphabetical characters (letters A-Z) will trigger the ban.