Version Description
-
English
- Improving detection of fake IPs
- Release time investment (Development & QA): 11 h
-
Deutsch
- berarbeitung der Erkennung von geflschten IPs
- Release-Zeitaufwand (Development & QA): 11 Stunden
Download this release
Release Info
| Developer | sergej.mueller |
| Plugin | |
| Version | 2.6.2 |
| Comparing to | |
| See all releases | |
Code changes from version 2.6.1 to 2.6.2
- antispam_bee.php +52 -40
- inc/gui.class.php +1 -1
- lang/antispam_bee-de_DE.mo +0 -0
- lang/antispam_bee-de_DE.po +2 -2
- readme.txt +41 -18
antispam_bee.php
CHANGED
|
@@ -8,7 +8,7 @@ Author: Sergej Müller
|
|
| 8 |
Author URI: http://wpcoder.de
|
| 9 |
Plugin URI: http://antispambee.com
|
| 10 |
License: GPLv2 or later
|
| 11 |
-
Version: 2.6.
|
| 12 |
*/
|
| 13 |
|
| 14 |
/*
|
|
@@ -323,7 +323,7 @@ class Antispam_Bee {
|
|
| 323 |
* Initialisierung der internen Variablen
|
| 324 |
*
|
| 325 |
* @since 2.4
|
| 326 |
-
* @change 2.
|
| 327 |
*/
|
| 328 |
|
| 329 |
private static function _init_internal_vars()
|
|
@@ -371,7 +371,7 @@ class Antispam_Bee {
|
|
| 371 |
'reasons' => array(
|
| 372 |
'css' => 'CSS Hack',
|
| 373 |
'empty' => 'Empty Data',
|
| 374 |
-
'server' => '
|
| 375 |
'localdb' => 'Local DB Spam',
|
| 376 |
'country' => 'Country Check',
|
| 377 |
'dnsbl' => 'DNSBL Spam',
|
|
@@ -491,7 +491,7 @@ class Antispam_Bee {
|
|
| 491 |
* Meta-Links des Plugins
|
| 492 |
*
|
| 493 |
* @since 0.1
|
| 494 |
-
* @change 2.6.
|
| 495 |
*
|
| 496 |
* @param array $input Bereits vorhandene Links
|
| 497 |
* @param string $file Aktuelle Seite
|
|
@@ -508,9 +508,9 @@ class Antispam_Bee {
|
|
| 508 |
return array_merge(
|
| 509 |
$input,
|
| 510 |
array(
|
|
|
|
| 511 |
'<a href="https://flattr.com/t/1323822" target="_blank">Flattr</a>',
|
| 512 |
-
'<a href="https://www.
|
| 513 |
-
'<a href="https://www.amazon.de/gp/registry/wishlist/2U5I7F9649LOJ/?layout=grid" target="_blank">Wishlist</a>'
|
| 514 |
)
|
| 515 |
);
|
| 516 |
}
|
|
@@ -1355,7 +1355,7 @@ class Antispam_Bee {
|
|
| 1355 |
}
|
| 1356 |
|
| 1357 |
/* Bot erkannt */
|
| 1358 |
-
if ( !empty($_POST['bee_spam']) ) {
|
| 1359 |
return array(
|
| 1360 |
'reason' => 'css'
|
| 1361 |
);
|
|
@@ -1732,52 +1732,48 @@ class Antispam_Bee {
|
|
| 1732 |
|
| 1733 |
|
| 1734 |
/**
|
| 1735 |
-
*
|
| 1736 |
*
|
| 1737 |
* @since 2.0
|
| 1738 |
-
* @change 2.
|
| 1739 |
*
|
| 1740 |
-
* @param string $ip IP
|
| 1741 |
-
* @param string $host Host [optional]
|
| 1742 |
-
* @return boolean TRUE
|
| 1743 |
*/
|
| 1744 |
|
| 1745 |
-
private static function _is_fake_ip($
|
| 1746 |
{
|
| 1747 |
/* Remote Host */
|
| 1748 |
-
$
|
| 1749 |
|
| 1750 |
/* IPv6 */
|
| 1751 |
-
if (
|
| 1752 |
-
return $
|
| 1753 |
}
|
| 1754 |
|
| 1755 |
-
/* IPv4 /
|
| 1756 |
-
if ( empty($
|
| 1757 |
-
$
|
| 1758 |
-
|
| 1759 |
-
|
| 1760 |
-
|
| 1761 |
-
|
| 1762 |
-
);
|
| 1763 |
|
| 1764 |
/* IPv4 / Trackback */
|
| 1765 |
} else {
|
| 1766 |
-
|
| 1767 |
-
if ( $hostbyip == $ip ) {
|
| 1768 |
return true;
|
| 1769 |
}
|
| 1770 |
|
| 1771 |
-
|
| 1772 |
-
|
| 1773 |
-
|
| 1774 |
-
|
| 1775 |
-
|
| 1776 |
-
)
|
| 1777 |
-
);
|
| 1778 |
}
|
| 1779 |
|
| 1780 |
-
return
|
| 1781 |
}
|
| 1782 |
|
| 1783 |
|
|
@@ -1785,7 +1781,7 @@ class Antispam_Bee {
|
|
| 1785 |
* Prüfung auf unerwünschte Sprachen
|
| 1786 |
*
|
| 1787 |
* @since 2.0
|
| 1788 |
-
* @change 2.
|
| 1789 |
*
|
| 1790 |
* @param string $content Inhalt des Kommentars
|
| 1791 |
* @return boolean TRUE bei Spam
|
|
@@ -1813,7 +1809,7 @@ class Antispam_Bee {
|
|
| 1813 |
$response = wp_remote_get(
|
| 1814 |
esc_url_raw(
|
| 1815 |
sprintf(
|
| 1816 |
-
'
|
| 1817 |
$content
|
| 1818 |
),
|
| 1819 |
'http'
|
|
@@ -1910,13 +1906,13 @@ class Antispam_Bee {
|
|
| 1910 |
|
| 1911 |
|
| 1912 |
/**
|
| 1913 |
-
*
|
| 1914 |
*
|
| 1915 |
* @since 2.4
|
| 1916 |
-
* @change 2.
|
| 1917 |
*
|
| 1918 |
-
* @param string $ip
|
| 1919 |
-
* @return integer
|
| 1920 |
*/
|
| 1921 |
|
| 1922 |
private static function _is_ipv4($ip)
|
|
@@ -1925,6 +1921,22 @@ class Antispam_Bee {
|
|
| 1925 |
}
|
| 1926 |
|
| 1927 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1928 |
/**
|
| 1929 |
* Prüfung auf Mobile
|
| 1930 |
*
|
| 8 |
Author URI: http://wpcoder.de
|
| 9 |
Plugin URI: http://antispambee.com
|
| 10 |
License: GPLv2 or later
|
| 11 |
+
Version: 2.6.2
|
| 12 |
*/
|
| 13 |
|
| 14 |
/*
|
| 323 |
* Initialisierung der internen Variablen
|
| 324 |
*
|
| 325 |
* @since 2.4
|
| 326 |
+
* @change 2.6.2
|
| 327 |
*/
|
| 328 |
|
| 329 |
private static function _init_internal_vars()
|
| 371 |
'reasons' => array(
|
| 372 |
'css' => 'CSS Hack',
|
| 373 |
'empty' => 'Empty Data',
|
| 374 |
+
'server' => 'Fake IP',
|
| 375 |
'localdb' => 'Local DB Spam',
|
| 376 |
'country' => 'Country Check',
|
| 377 |
'dnsbl' => 'DNSBL Spam',
|
| 491 |
* Meta-Links des Plugins
|
| 492 |
*
|
| 493 |
* @since 0.1
|
| 494 |
+
* @change 2.6.2
|
| 495 |
*
|
| 496 |
* @param array $input Bereits vorhandene Links
|
| 497 |
* @param string $file Aktuelle Seite
|
| 508 |
return array_merge(
|
| 509 |
$input,
|
| 510 |
array(
|
| 511 |
+
'<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZAQUT9RLPW8QN" target="_blank">PayPal</a>',
|
| 512 |
'<a href="https://flattr.com/t/1323822" target="_blank">Flattr</a>',
|
| 513 |
+
'<a href="https://www.amazon.de/registry/wishlist/2U5I7F9649LOJ/" target="_blank">Wishlist</a>'
|
|
|
|
| 514 |
)
|
| 515 |
);
|
| 516 |
}
|
| 1355 |
}
|
| 1356 |
|
| 1357 |
/* Bot erkannt */
|
| 1358 |
+
if ( ! empty($_POST['bee_spam']) ) {
|
| 1359 |
return array(
|
| 1360 |
'reason' => 'css'
|
| 1361 |
);
|
| 1732 |
|
| 1733 |
|
| 1734 |
/**
|
| 1735 |
+
* Check for a fake IP
|
| 1736 |
*
|
| 1737 |
* @since 2.0
|
| 1738 |
+
* @change 2.6.2
|
| 1739 |
*
|
| 1740 |
+
* @param string $ip Client IP
|
| 1741 |
+
* @param string $host Client Host [optional]
|
| 1742 |
+
* @return boolean TRUE if fake IP
|
| 1743 |
*/
|
| 1744 |
|
| 1745 |
+
private static function _is_fake_ip($client_ip, $client_host = false)
|
| 1746 |
{
|
| 1747 |
/* Remote Host */
|
| 1748 |
+
$host_by_ip = gethostbyaddr($client_ip);
|
| 1749 |
|
| 1750 |
/* IPv6 */
|
| 1751 |
+
if ( self::_is_ipv6($client_ip) ) {
|
| 1752 |
+
return $client_ip != $host_by_ip;
|
| 1753 |
}
|
| 1754 |
|
| 1755 |
+
/* IPv4 / Comment */
|
| 1756 |
+
if ( empty($client_host) ) {
|
| 1757 |
+
$ip_by_host = gethostbyname($host_by_ip);
|
| 1758 |
+
|
| 1759 |
+
if ( $ip_by_host === $host_by_ip ) {
|
| 1760 |
+
return false;
|
| 1761 |
+
}
|
|
|
|
| 1762 |
|
| 1763 |
/* IPv4 / Trackback */
|
| 1764 |
} else {
|
| 1765 |
+
if ( $host_by_ip === $client_ip ) {
|
|
|
|
| 1766 |
return true;
|
| 1767 |
}
|
| 1768 |
|
| 1769 |
+
$ip_by_host = gethostbyname($client_host);
|
| 1770 |
+
}
|
| 1771 |
+
|
| 1772 |
+
if ( strpos( $client_ip, self::_cut_ip($ip_by_host) ) === false ) {
|
| 1773 |
+
return true;
|
|
|
|
|
|
|
| 1774 |
}
|
| 1775 |
|
| 1776 |
+
return false;
|
| 1777 |
}
|
| 1778 |
|
| 1779 |
|
| 1781 |
* Prüfung auf unerwünschte Sprachen
|
| 1782 |
*
|
| 1783 |
* @since 2.0
|
| 1784 |
+
* @change 2.6.2
|
| 1785 |
*
|
| 1786 |
* @param string $content Inhalt des Kommentars
|
| 1787 |
* @return boolean TRUE bei Spam
|
| 1809 |
$response = wp_remote_get(
|
| 1810 |
esc_url_raw(
|
| 1811 |
sprintf(
|
| 1812 |
+
'https://translate.google.com/translate_a/t?client=x&text=%s',
|
| 1813 |
$content
|
| 1814 |
),
|
| 1815 |
'http'
|
| 1906 |
|
| 1907 |
|
| 1908 |
/**
|
| 1909 |
+
* Check for an IPv4 address
|
| 1910 |
*
|
| 1911 |
* @since 2.4
|
| 1912 |
+
* @change 2.6.2
|
| 1913 |
*
|
| 1914 |
+
* @param string $ip IP to validate
|
| 1915 |
+
* @return integer TRUE if IPv4
|
| 1916 |
*/
|
| 1917 |
|
| 1918 |
private static function _is_ipv4($ip)
|
| 1921 |
}
|
| 1922 |
|
| 1923 |
|
| 1924 |
+
/**
|
| 1925 |
+
* Check for an IPv6 address
|
| 1926 |
+
*
|
| 1927 |
+
* @since 2.6.2
|
| 1928 |
+
* @change 2.6.2
|
| 1929 |
+
*
|
| 1930 |
+
* @param string $ip IP to validate
|
| 1931 |
+
* @return boolean TRUE if IPv6
|
| 1932 |
+
*/
|
| 1933 |
+
|
| 1934 |
+
private static function _is_ipv6($ip)
|
| 1935 |
+
{
|
| 1936 |
+
return ! self::_is_ipv4($ip);
|
| 1937 |
+
}
|
| 1938 |
+
|
| 1939 |
+
|
| 1940 |
/**
|
| 1941 |
* Prüfung auf Mobile
|
| 1942 |
*
|
inc/gui.class.php
CHANGED
|
@@ -439,7 +439,7 @@ class Antispam_Bee_GUI extends Antispam_Bee {
|
|
| 439 |
<?php } ?>
|
| 440 |
|
| 441 |
<p>
|
| 442 |
-
<a href="https://
|
| 443 |
</p>
|
| 444 |
</div>
|
| 445 |
|
| 439 |
<?php } ?>
|
| 440 |
|
| 441 |
<p>
|
| 442 |
+
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZAQUT9RLPW8QN" target="_blank">PayPal</a> • <a href="https://flattr.com/t/1323822" target="_blank">Flattr</a> • <a href="https://www.amazon.de/registry/wishlist/2U5I7F9649LOJ/" target="_blank">Wishlist</a>
|
| 443 |
</p>
|
| 444 |
</div>
|
| 445 |
|
lang/antispam_bee-de_DE.mo
CHANGED
|
Binary file
|
lang/antispam_bee-de_DE.po
CHANGED
|
@@ -36,8 +36,8 @@ msgstr "Leere Daten"
|
|
| 36 |
msgid "CSS Hack"
|
| 37 |
msgstr "CSS Hack"
|
| 38 |
|
| 39 |
-
msgid "
|
| 40 |
-
msgstr "
|
| 41 |
|
| 42 |
msgid "Local DB Spam"
|
| 43 |
msgstr "Lokale Spamdatenbank"
|
| 36 |
msgid "CSS Hack"
|
| 37 |
msgstr "CSS Hack"
|
| 38 |
|
| 39 |
+
msgid "Fake IP"
|
| 40 |
+
msgstr "Gefälschte IP"
|
| 41 |
|
| 42 |
msgid "Local DB Spam"
|
| 43 |
msgstr "Lokale Spamdatenbank"
|
readme.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
=== Antispam Bee ===
|
| 2 |
Contributors: sergej.mueller
|
| 3 |
Tags: comment, spam, antispam, comments, trackback, protection, prevention
|
| 4 |
-
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=
|
| 5 |
Requires at least: 3.8
|
| 6 |
Tested up to: 4.0
|
| 7 |
Stable tag: trunk
|
|
@@ -10,7 +10,7 @@ License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
-
„...another popular solution to fight spam is Antispam Bee“ – Matt Mullenweg, Q&A WordCamp Europe 2014
|
| 14 |
|
| 15 |
|
| 16 |
|
|
@@ -69,12 +69,7 @@ Anmeldefrei und ohne lästige Captchas.
|
|
| 69 |
|
| 70 |
|
| 71 |
= Support =
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
= Systemanforderungen =
|
| 76 |
-
* PHP 5.2.4
|
| 77 |
-
* WordPress 3.8
|
| 78 |
|
| 79 |
|
| 80 |
= Inkompatibilität =
|
|
@@ -84,12 +79,12 @@ Freundlich formulierte Fragen rund um das Plugin werden per E-Mail beantwortet.
|
|
| 84 |
|
| 85 |
|
| 86 |
= Unterstützung =
|
| 87 |
-
*
|
| 88 |
-
*
|
| 89 |
-
*
|
| 90 |
|
| 91 |
|
| 92 |
-
=
|
| 93 |
* [Antispam Bee: Antispam für WordPress](http://playground.ebiene.de/antispam-bee-wordpress-plugin/)
|
| 94 |
* [Guide: Spam-Bekämpfung in WordPress](http://cup.wpcoder.de/wordpress-antispam-guide/)
|
| 95 |
|
|
@@ -109,13 +104,29 @@ Freundlich formulierte Fragen rund um das Plugin werden per E-Mail beantwortet.
|
|
| 109 |
|
| 110 |
== Changelog ==
|
| 111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
= 2.6.1 =
|
| 113 |
-
|
| 114 |
-
*
|
| 115 |
-
*
|
| 116 |
-
*
|
| 117 |
-
* *
|
| 118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
|
| 120 |
= 2.6.0 =
|
| 121 |
* DE: Optimierungen für WordPress 3.8
|
|
@@ -301,6 +312,18 @@ Freundlich formulierte Fragen rund um das Plugin werden per E-Mail beantwortet.
|
|
| 301 |
|
| 302 |
|
| 303 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 304 |
== Screenshots ==
|
| 305 |
|
| 306 |
1. Antispam Bee Optionen
|
| 1 |
=== Antispam Bee ===
|
| 2 |
Contributors: sergej.mueller
|
| 3 |
Tags: comment, spam, antispam, comments, trackback, protection, prevention
|
| 4 |
+
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZAQUT9RLPW8QN
|
| 5 |
Requires at least: 3.8
|
| 6 |
Tested up to: 4.0
|
| 7 |
Stable tag: trunk
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
+
„... another popular solution to fight spam is Antispam Bee“ – Matt Mullenweg, Q&A WordCamp Europe 2014
|
| 14 |
|
| 15 |
|
| 16 |
|
| 69 |
|
| 70 |
|
| 71 |
= Support =
|
| 72 |
+
Fragen rund ums Plugin werden gern per E-Mail beantwortet. Beachtet auch die [Guidelines](https://plus.google.com/+SergejMüller/posts/Ex2vYGN8G2L).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
|
| 74 |
|
| 75 |
= Inkompatibilität =
|
| 79 |
|
| 80 |
|
| 81 |
= Unterstützung =
|
| 82 |
+
* [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZAQUT9RLPW8QN)
|
| 83 |
+
* [Flattr](https://flattr.com/t/1323822)
|
| 84 |
+
* [Wishlist](https://www.amazon.de/registry/wishlist/2U5I7F9649LOJ/)
|
| 85 |
|
| 86 |
|
| 87 |
+
= Lesenswertes =
|
| 88 |
* [Antispam Bee: Antispam für WordPress](http://playground.ebiene.de/antispam-bee-wordpress-plugin/)
|
| 89 |
* [Guide: Spam-Bekämpfung in WordPress](http://cup.wpcoder.de/wordpress-antispam-guide/)
|
| 90 |
|
| 104 |
|
| 105 |
== Changelog ==
|
| 106 |
|
| 107 |
+
= 2.6.2 =
|
| 108 |
+
|
| 109 |
+
* **English**
|
| 110 |
+
* Improving detection of fake IPs
|
| 111 |
+
* *Release time investment (Development & QA): 11 h*
|
| 112 |
+
|
| 113 |
+
* **Deutsch**
|
| 114 |
+
* Überarbeitung der Erkennung von gefälschten IPs
|
| 115 |
+
* *Release-Zeitaufwand (Development & QA): 11 Stunden*
|
| 116 |
+
|
| 117 |
+
|
| 118 |
= 2.6.1 =
|
| 119 |
+
|
| 120 |
+
* **English**
|
| 121 |
+
* Code refactoring of options management
|
| 122 |
+
* Support for `HTTP_FORWARDED_FOR` header
|
| 123 |
+
* *Release time investment (Development & QA): 8,5 h*
|
| 124 |
+
|
| 125 |
+
* **Deutsch**
|
| 126 |
+
* Überarbeitung der Optionen-Verwaltung
|
| 127 |
+
* Berücksichtigung der Header `HTTP_FORWARDED_FOR`
|
| 128 |
+
* *Release-Zeitaufwand (Development & QA): 8,5 Stunden*
|
| 129 |
+
|
| 130 |
|
| 131 |
= 2.6.0 =
|
| 132 |
* DE: Optimierungen für WordPress 3.8
|
| 312 |
|
| 313 |
|
| 314 |
|
| 315 |
+
== Installation ==
|
| 316 |
+
|
| 317 |
+
= Requirements =
|
| 318 |
+
* WordPress 3.8 or greater
|
| 319 |
+
* PHP 5.2.4 or greater
|
| 320 |
+
|
| 321 |
+
= Installation =
|
| 322 |
+
* WordPress Dashboard > Plugins > Add New
|
| 323 |
+
* Search for *Antispam Bee* > Install
|
| 324 |
+
* Set plugin settings or leave the default values
|
| 325 |
+
|
| 326 |
+
|
| 327 |
== Screenshots ==
|
| 328 |
|
| 329 |
1. Antispam Bee Optionen
|
