Bad Behavior - Version 2.2.8

Version Description

Download this release

Release Info

Developer error
Plugin Icon wp plugin Bad Behavior
Version 2.2.8
Comparing to
See all releases

Code changes from version 2.2.7 to 2.2.8

README.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: error, markjaquith, skeltoac
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=error%40ioerror%2eus&item_name=Bad%20Behavior%20%28From%20WordPress%20Page%29&no_shipping=1&cn=Comments%20about%20Bad%20Behavior&tax=0&currency_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8
5
  Requires at least: 3.1
6
  Tested up to: 3.4
7
- Stable tag: 2.2.7
8
 
9
  Bad Behavior prevents spammers from ever delivering their junk, and in many
10
  cases, from ever reading your site in the first place.
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=error%40ioerror%2eus&item_name=Bad%20Behavior%20%28From%20WordPress%20Page%29&no_shipping=1&cn=Comments%20about%20Bad%20Behavior&tax=0&currency_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8
5
  Requires at least: 3.1
6
  Tested up to: 3.4
7
+ Stable tag: 2.2.8
8
 
9
  Bad Behavior prevents spammers from ever delivering their junk, and in many
10
  cases, from ever reading your site in the first place.
bad-behavior-wordpress-admin.php CHANGED
@@ -267,6 +267,7 @@ function bb2_whitelist()
267
  ?>
268
  <div class="wrap">
269
  <?php
 
270
  echo bb2_donate_button(admin_url("options-general.php?page=bb2_whitelist"));
271
  ?>
272
  <h2><?php _e("Bad Behavior Whitelist"); ?></h2>
267
  ?>
268
  <div class="wrap">
269
  <?php
270
+ $whitelists = bb2_read_whitelist();
271
  echo bb2_donate_button(admin_url("options-general.php?page=bb2_whitelist"));
272
  ?>
273
  <h2><?php _e("Bad Behavior Whitelist"); ?></h2>
bad-behavior-wordpress.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: Bad Behavior
4
- Version: 2.2.7
5
  Description: Deny automated spambots access to your PHP-based Web site.
6
  Plugin URI: http://bad-behavior.ioerror.us/
7
  Author: Michael Hampton
1
  <?php
2
  /*
3
  Plugin Name: Bad Behavior
4
+ Version: 2.2.8
5
  Description: Deny automated spambots access to your PHP-based Web site.
6
  Plugin URI: http://bad-behavior.ioerror.us/
7
  Author: Michael Hampton
bad-behavior/banned.inc.php CHANGED
@@ -7,6 +7,8 @@ require_once(BB2_CORE . "/responses.inc.php");
7
 
8
  function bb2_housekeeping($settings, $package)
9
  {
 
 
10
  // FIXME Yes, the interval's hard coded (again) for now.
11
  $query = "DELETE FROM `" . $settings['log_table'] . "` WHERE `date` < DATE_SUB('" . bb2_db_date() . "', INTERVAL 7 DAY)";
12
  bb2_db_query($query);
7
 
8
  function bb2_housekeeping($settings, $package)
9
  {
10
+ if (!$settings['logging']) return;
11
+
12
  // FIXME Yes, the interval's hard coded (again) for now.
13
  $query = "DELETE FROM `" . $settings['log_table'] . "` WHERE `date` < DATE_SUB('" . bb2_db_date() . "', INTERVAL 7 DAY)";
14
  bb2_db_query($query);
bad-behavior/blacklist.inc.php CHANGED
@@ -5,11 +5,11 @@ function bb2_blacklist($package) {
5
  // Blacklisted user agents
6
  // These user agent strings occur at the beginning of the line.
7
  $bb2_spambots_0 = array(
8
- "<sc", // XSS exploit attempts
9
  "8484 Boston Project", // video poker/porn spam
10
  "adwords", // referrer spam
11
  "autoemailspider", // spam harvester
12
  "blogsearchbot-martin", // from honeypot
 
13
  "CherryPicker", // spam harvester
14
  "core-project/", // FrontPage extension exploits
15
  "Diamond", // delivers spyware/adware
@@ -28,15 +28,21 @@ function bb2_blacklist($package) {
28
  "Java/1.", // unidentified robots
29
  "libwww-perl", // unidentified robots
30
  "LWP", // unidentified robots
 
 
31
  "Microsoft URL", // unidentified robots
32
  "Missigua", // spam harvester
33
  "MJ12bot/v1.0.8", // malicious botnet
34
  "Movable Type", // customised spambots
35
  "Mozilla ", // malicious software
 
 
36
  "Mozilla/2", // malicious software
 
37
  "Mozilla/4.0(", // from honeypot
38
  "Mozilla/4.0+(compatible;+", // suspicious harvester
39
  "MSIE", // malicious software
 
40
  "NutchCVS", // unidentified robots
41
  "Nutscrape/", // misc comment spam
42
  "OmniExplorer", // spam harvester
@@ -61,6 +67,7 @@ function bb2_blacklist($package) {
61
  // These user agent strings occur anywhere within the line.
62
  $bb2_spambots = array(
63
  "\r", // A really dumb bot
 
64
  "; Widows ", // misc comment/email spam
65
  "a href=", // referrer spam
66
  "Bad Behavior Test", // Add this to your user-agent to test BB
@@ -68,6 +75,7 @@ function bb2_blacklist($package) {
68
  "compatible-", // misc comment/email spam
69
  "DTS Agent", // misc comment/email spam
70
  "Email Extractor", // spam harvester
 
71
  "Gecko/25", // revisit this in 500 years
72
  "grub-client", // search engine ignores robots.txt
73
  "hanzoweb", // very badly behaved crawler
@@ -75,6 +83,8 @@ function bb2_blacklist($package) {
75
  "MSIE 7.0; Windows NT 5.2", // Cyveillance
76
  "Murzillo compatible", // comment spam bot
77
  ".NET CLR 1)", // free poker, etc.
 
 
78
  "POE-Component-Client", // free poker, etc.
79
  "Turing Machine", // www.anonymizer.com abuse
80
  "Ubuntu/9.25", // comment spam bot
@@ -83,7 +93,16 @@ function bb2_blacklist($package) {
83
  "WebaltBot", // spam harvester
84
  "WISEbot", // spam harvester
85
  "WISEnutbot", // spam harvester
86
- "Windows NT 4.0;)", // wikispam bot
 
 
 
 
 
 
 
 
 
87
  "Windows NT 5.0;)", // wikispam bot
88
  "Windows NT 5.1;)", // wikispam bot
89
  "Windows XP 5", // spam harvester
@@ -100,6 +119,7 @@ function bb2_blacklist($package) {
100
  "/[bcdfghjklmnpqrstvwxz ]{8,}/",
101
  // "/(;\){1,2}$/", // misc spammers/harvesters
102
  // "/MSIE.*Windows XP/", // misc comment spam
 
103
  );
104
 
105
  // Do not edit below this line.
5
  // Blacklisted user agents
6
  // These user agent strings occur at the beginning of the line.
7
  $bb2_spambots_0 = array(
 
8
  "8484 Boston Project", // video poker/porn spam
9
  "adwords", // referrer spam
10
  "autoemailspider", // spam harvester
11
  "blogsearchbot-martin", // from honeypot
12
+ "BrowserEmulator/", // open proxy software
13
  "CherryPicker", // spam harvester
14
  "core-project/", // FrontPage extension exploits
15
  "Diamond", // delivers spyware/adware
28
  "Java/1.", // unidentified robots
29
  "libwww-perl", // unidentified robots
30
  "LWP", // unidentified robots
31
+ "lwp", // unidentified robots
32
+ "Microsoft Internet Explorer/", // too old; assumed robot
33
  "Microsoft URL", // unidentified robots
34
  "Missigua", // spam harvester
35
  "MJ12bot/v1.0.8", // malicious botnet
36
  "Movable Type", // customised spambots
37
  "Mozilla ", // malicious software
38
+ "Mozilla/0", // malicious software
39
+ "Mozilla/1", // malicious software
40
  "Mozilla/2", // malicious software
41
+ "Mozilla/3", // malicious software
42
  "Mozilla/4.0(", // from honeypot
43
  "Mozilla/4.0+(compatible;+", // suspicious harvester
44
  "MSIE", // malicious software
45
+ "MVAClient", // automated hacking attempts
46
  "NutchCVS", // unidentified robots
47
  "Nutscrape/", // misc comment spam
48
  "OmniExplorer", // spam harvester
67
  // These user agent strings occur anywhere within the line.
68
  $bb2_spambots = array(
69
  "\r", // A really dumb bot
70
+ "<sc", // XSS exploit attempts
71
  "; Widows ", // misc comment/email spam
72
  "a href=", // referrer spam
73
  "Bad Behavior Test", // Add this to your user-agent to test BB
75
  "compatible-", // misc comment/email spam
76
  "DTS Agent", // misc comment/email spam
77
  "Email Extractor", // spam harvester
78
+ "Firebird/", // too old; assumed robot
79
  "Gecko/25", // revisit this in 500 years
80
  "grub-client", // search engine ignores robots.txt
81
  "hanzoweb", // very badly behaved crawler
83
  "MSIE 7.0; Windows NT 5.2", // Cyveillance
84
  "Murzillo compatible", // comment spam bot
85
  ".NET CLR 1)", // free poker, etc.
86
+ ".NET CLR1", // spam harvester
87
+ "Perman Surfer", // old and very broken harvester
88
  "POE-Component-Client", // free poker, etc.
89
  "Turing Machine", // www.anonymizer.com abuse
90
  "Ubuntu/9.25", // comment spam bot
93
  "WebaltBot", // spam harvester
94
  "WISEbot", // spam harvester
95
  "WISEnutbot", // spam harvester
96
+ "Win95", // too old; assumed robot
97
+ "Win98", // too old; assumed robot
98
+ "WinME", // too old; assumed robot
99
+ "Win 9x 4.90", // too old; assumed robot
100
+ "Windows 3", // too old; assumed robot
101
+ "Windows 95", // too old; assumed robot
102
+ "Windows 98", // too old; assumed robot
103
+ "Windows NT 4", // too old; assumed robot
104
+ "Windows NT;", // too old; assumed robot
105
+ #"Windows NT 4.0;)", // wikispam bot
106
  "Windows NT 5.0;)", // wikispam bot
107
  "Windows NT 5.1;)", // wikispam bot
108
  "Windows XP 5", // spam harvester
119
  "/[bcdfghjklmnpqrstvwxz ]{8,}/",
120
  // "/(;\){1,2}$/", // misc spammers/harvesters
121
  // "/MSIE.*Windows XP/", // misc comment spam
122
+ "/MSIE [2345]/", // too old; assumed robot
123
  );
124
 
125
  // Do not edit below this line.
bad-behavior/core.inc.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php if (!defined('BB2_CWD')) die("I said no cheating!");
2
- define('BB2_VERSION', "2.2.7");
3
 
4
  // Bad Behavior entry point is bb2_start()
5
  // If you're reading this, you are probably lost.
1
  <?php if (!defined('BB2_CWD')) die("I said no cheating!");
2
+ define('BB2_VERSION', "2.2.8");
3
 
4
  // Bad Behavior entry point is bb2_start()
5
  // If you're reading this, you are probably lost.