DownloadRaw

contents

  1. ##### ### ## ### ######## ### ## ### ###TM
  2. ####### ####### ####### ######## ####### ####### #######
  3. ### ### ### ### ### ### ### ### ### ##
  4. ## ## ## ## ### ## ## ## ## ##
  5. ### ### ### ## ### ### ### ## ### ##
  6. ####### ####### ## ######## ### ####### ## #######
  7. ##### ### ## ######## ### ### ## ##
  8. #####
  9. Anti-Hammer Pro
  10. protect your valuable server resources for genuine clients..
  11. (c) 2004->tomorrow! corz.org
  12. Thanks to everyone who gave feedback on the betas!
  13. Itstory..
  14. 0.9.8.2
  15. + Improved checking for malformed referer information.
  16. 0.9.8
  17. + SEO-Aware "magic" index requests.
  18. 0.9.7.*
  19. + Added the ability to disable access for bad URL's, like /etc/passwd
  20. + Added ability to validate User Agent strings, to protect against
  21. known bad bots, spiders and so forth.
  22. + You can now also disallow access to client who send an empty user
  23. agent string.
  24. + Added ability to ban IP Addresses from a simple IP Address list.
  25. 0.9.6
  26. + Added the ability to validate referers and white/black list good
  27. and bad referers. There's a couple of new preferences (it's always
  28. worth checking new versions of software for new preferences!) and
  29. a fair chunk of new code.
  30. Search from the top for 'validate_referers' for all the juicy
  31. details.
  32. ~ Fixed a bug where new visitors could have their hammer count set to
  33. /almost/ the first trigger level.
  34. 0.9.5
  35. ~ Minor fix for potentially logging error.
  36. 0.9.4
  37. Enter Anti-Hammer Pro..
  38. + The Data set used to create the individual client ID's can now be
  39. easily configured (a simple list). You can use everything (the
  40. default), or else identify clients by a smaller set of data, even
  41. a single element, i.e. the IP address, which could be useful in a
  42. number of situations.
  43. + Improved documentation.
  44. ~ Minor clean-ups and fixes.
  45. -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=-
  46. 0.9.3.2
  47. The end of the line for Ant-Hammer FREE!
  48. + You now have the option to perform a quick DNS lookup of the
  49. IP Address of bad clients, and have this added to the logging.
  50. This was already enabled, you now have the option to *disable* it,
  51. if required.
  52. + Anti-Hammer now send a valid "Retry-After" header, which is set to
  53. the client's current hammer delay + 1 second.
  54. + Added a link to the Anti-Hammer page, should lessen the wtf-factor.
  55. 0.9.2
  56. + You can now choose whether to allow your specified clients (aka
  57. "exemptions") to either completely bypass anti-hammer (current
  58. exemption method)..
  59. $anti_hammer['allow_bots'] = true;
  60. Or else specify an integer, representing a hammer_time, in
  61. 1/100th Second, which will apply to *only* these clients..
  62. $anti_hammer['allow_bots'] = 50;
  63. This setting would enable your specified clients to hammer the site
  64. at a rate of two hits-per-second, but no faster.
  65. Effectively, we now have two hammer rates, one for known good
  66. clients, and one for everyone else.
  67. 0.9
  68. + Good bots & spiders can now be allowed to bypass the hammer. This is
  69. achieved through the use of standard spider IP lists, as published
  70. here..
  71. http://www.iplists.com/
  72. along with a simple ini file, detailing which user-agent links to
  73. which IP list. A working ini, and more details, will be included in
  74. the preference section (above), as well as the release.
  75. 0.8.*
  76. + Anti-Hammer now sends a proper 503 (service temporarily unavailable)
  77. message, rather than a 200 OK message. This will be useful in
  78. situations where valid bots are temporarily hammering, and is more
  79. correct in this scenario. The reource *will* be back, if they cut
  80. out the crazy hammering!
  81. If you are running under cgi/*suexec (non-module), the extra
  82. required header is automatically sent.
  83. In use, this causes many bots to back-off immediately. Excellent!
  84. ~ Improved the ban resetting (which needs to work independantly of the
  85. Garbage collection mechanism). After the ban time, the client's
  86. cut-off is wiped, and their start time set to *now*, just like a new
  87. client, however, their hammer_count is set to one hammer below the
  88. first trigger level. In other words, a single hammer gets them the
  89. NO Hammer! page; and to the final page quicker than new clients.
  90. Even if you use rolling triggers, Anti_hammer will still use the
  91. first ban level to calculate this number, so set that to whatever
  92. you want.
  93. ~ ban_times and ban_levels have been renamed to waiting_times and
  94. trigger_levels, to avoid confusion with the ban_time (for the new
  95. total cut-off). These also make more sense, as they are not bans,
  96. simply delays.
  97. 0.7.*
  98. + Added rolling ban times. Rather than have set limits which the
  99. client can cross, this simply increments the ban time with each and
  100. every hammer attempt. 1-2-3-4-5-6-7.. etc. cut-off still functions
  101. as before for each system (rolling or preset levels).
  102. This was, in fact, the original system, which I replaced with the
  103. level presets early on, but it's kinda fun, and the code is simple.
  104. ~ Removed the file-tools.php include statement, and put the functions
  105. directly into here (slightly renamed). I figure anyone smart enough
  106. to be including my file-tools, will be smart enough to figure out
  107. how to put that back, if required.
  108. + More things are configurable, like the page title. Why not!
  109. 0.6.*
  110. + Added capability to work with clients who do not accept, or have
  111. chosen not to accept (read: disabled) cookies.
  112. Basically, we write a "fake" session. The fake session uses a
  113. serialized array in a flat file, just like regular php sessions, and
  114. is created before they even get receive their first page. From that
  115. point on, they are known (by Anti-Hammer) by this ID.
  116. The name of the client's session ID file is the session ID itself;
  117. an MD5 of all the known usable client data concatenated together.
  118. ~ php session usage is still available as an option, if required.
  119. + Added Garbage Collection for the fake session files. Both how often
  120. this happens (every 'so-many' requests), and how old is considered
  121. "stale", are configurable.
  122. + Ban time is now configurable (in hours). Remember to ensure that
  123. Garbage Collection isn't happening before this time.
  124. + Added penultimate message for cut-off. You get one *final* warning!
  125. ~ Cleaned-up the code regarding sessions. We now make a clean break,
  126. converting whichever type of session data into a local array, and
  127. then work with that. At the end, we write the pertinent data back to
  128. whichever type of session is being utilized (built-in or php).
  129. 0.5.*
  130. + You can now configure a cut-off point. When the number of violations
  131. reaches this number, their pages simply die. This is disabled by
  132. default. This point is, of course, configurable. (actually, I got
  133. called away in the middle of this, so I'll need to check how far I
  134. got!)
  135. 0.4.*
  136. + Added user preferences for lots of the settings, voilation levels,
  137. times, etc. Added error checking for these, so they should be fairly
  138. foolproof (good movie, by the way, "Foolproof", 2003).
  139. 0.3.*
  140. + Added configurable protection skipping for certain file types
  141. (usually associated files and such). This replaces a nasty hack that
  142. lived at the top of the script.
  143. + Added skipping for generated images, too (GD images, etc.). This can
  144. also be used to skip other tpyes. See the preferences for more
  145. details.
  146. + Added configurable messages. I'll likely put this out eventually,
  147. it's kinda useful.
  148. 0.2.*
  149. + Added ignored areas, for chat scripts and such. places where either
  150. hammering is allowed, or is dealt with by the local script.
  151. */

Welcome to corz.org!

I'm always messing around with the back-end.. See a bug? Wait a minute and try again. Still see a bug? Mail Me!