Version Description
- Deutsch: Aktualisierung auf Safe Browsing Lookup API 3.1
- English: Update the Google Safe Browsing Lookup API to v3.1
Download this release
Release Info
| Developer | sergej.mueller |
| Plugin | |
| Version | 1.3.7 |
| Comparing to | |
| See all releases | |
Code changes from version 1.3.5 to 1.3.7
- antivirus.php +58 -44
- readme.txt +12 -2
antivirus.php
CHANGED
|
@@ -7,7 +7,26 @@ Description: Security solution as a smart, effectively plugin to protect your bl
|
|
| 7 |
Author: Sergej Müller
|
| 8 |
Author URI: http://wpcoder.de
|
| 9 |
Plugin URI: http://wpantivirus.com
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
*/
|
| 12 |
|
| 13 |
|
|
@@ -394,7 +413,7 @@ class AntiVirus {
|
|
| 394 |
* Führt die Safe Browsing Prüfung aus
|
| 395 |
*
|
| 396 |
* @since 1.3.4
|
| 397 |
-
* @change 1.3.
|
| 398 |
*/
|
| 399 |
|
| 400 |
private static function _check_safe_browsing()
|
|
@@ -407,8 +426,8 @@ class AntiVirus {
|
|
| 407 |
/* Start request */
|
| 408 |
$response = wp_remote_get(
|
| 409 |
sprintf(
|
| 410 |
-
'https://sb-ssl.google.com/safebrowsing/api/lookup?client=wpantivirus&
|
| 411 |
-
'
|
| 412 |
urlencode( get_bloginfo('url') )
|
| 413 |
),
|
| 414 |
array(
|
|
@@ -430,7 +449,7 @@ class AntiVirus {
|
|
| 430 |
self::_send_warning_notification(
|
| 431 |
esc_html__('Safe Browsing Alert', 'antivirus'),
|
| 432 |
sprintf(
|
| 433 |
-
"%s\r\
|
| 434 |
esc_html__('Please check the Google Safe Browsing diagnostic page:', 'antivirus'),
|
| 435 |
urlencode( get_bloginfo('url') ),
|
| 436 |
substr(get_locale(), 0, 2)
|
|
@@ -475,7 +494,7 @@ class AntiVirus {
|
|
| 475 |
* Führt die Safe Browsing Prüfung aus
|
| 476 |
*
|
| 477 |
* @since 1.3.4
|
| 478 |
-
* @change 1.3.
|
| 479 |
*
|
| 480 |
* @param string $subject Betreff der E-Mail
|
| 481 |
* @param string $body Inhalt der E-Mail
|
|
@@ -484,9 +503,10 @@ class AntiVirus {
|
|
| 484 |
private static function _send_warning_notification($subject, $body)
|
| 485 |
{
|
| 486 |
/* Receiver email address */
|
| 487 |
-
|
| 488 |
-
|
| 489 |
-
|
|
|
|
| 490 |
$email = get_bloginfo('admin_email');
|
| 491 |
}
|
| 492 |
|
|
@@ -613,46 +633,30 @@ class AntiVirus {
|
|
| 613 |
* Rückgabe des aktuellen Theme
|
| 614 |
*
|
| 615 |
* @since 0.1
|
| 616 |
-
* @change 1.3.
|
| 617 |
*
|
| 618 |
* @return array $themes Array mit Theme-Eigenschaften
|
| 619 |
*/
|
| 620 |
|
| 621 |
private static function _get_current_theme()
|
| 622 |
{
|
| 623 |
-
/*
|
| 624 |
-
|
| 625 |
-
|
| 626 |
-
|
| 627 |
-
|
| 628 |
-
$slug = $theme->get_stylesheet();
|
| 629 |
-
$files = $theme->get_files('php', 1);
|
| 630 |
-
|
| 631 |
-
/* Leer? */
|
| 632 |
-
if ( empty($name) OR empty($files) ) {
|
| 633 |
-
return false;
|
| 634 |
-
}
|
| 635 |
-
|
| 636 |
-
/* Rückgabe */
|
| 637 |
-
return array(
|
| 638 |
-
'Name' => $name,
|
| 639 |
-
'Slug' => $slug,
|
| 640 |
-
'Template Files' => $files
|
| 641 |
-
);
|
| 642 |
-
/* Bis WP 3.4 */
|
| 643 |
-
} else {
|
| 644 |
-
if ( $themes = get_themes() ) {
|
| 645 |
-
/* Aktuelles Theme */
|
| 646 |
-
if ( $theme = get_current_theme() ) {
|
| 647 |
-
if ( array_key_exists((string)$theme, $themes) ) {
|
| 648 |
-
return $themes[$theme];
|
| 649 |
-
}
|
| 650 |
-
}
|
| 651 |
-
}
|
| 652 |
|
|
|
|
|
|
|
|
|
|
| 653 |
}
|
| 654 |
|
| 655 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 656 |
}
|
| 657 |
|
| 658 |
|
|
@@ -777,7 +781,7 @@ class AntiVirus {
|
|
| 777 |
break;
|
| 778 |
|
| 779 |
case 'update_white_list':
|
| 780 |
-
if ( ! empty($_POST['_file_md5']) ) {
|
| 781 |
self::_update_option(
|
| 782 |
'white_list',
|
| 783 |
implode(
|
|
@@ -1040,7 +1044,7 @@ class AntiVirus {
|
|
| 1040 |
* Prüfung einer Datei
|
| 1041 |
*
|
| 1042 |
* @since 0.1
|
| 1043 |
-
* @change 1.3.
|
| 1044 |
*
|
| 1045 |
* @param string $file Datei zur Prüfung
|
| 1046 |
* @return mixed $results Array mit Ergebnissen | FALSE im Fehlerfall
|
|
@@ -1048,6 +1052,16 @@ class AntiVirus {
|
|
| 1048 |
|
| 1049 |
private static function _check_theme_file($file)
|
| 1050 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1051 |
/* Kein File? */
|
| 1052 |
if ( ! $file ) {
|
| 1053 |
return false;
|
|
@@ -1139,7 +1153,7 @@ class AntiVirus {
|
|
| 1139 |
* Anzeige der GUI
|
| 1140 |
*
|
| 1141 |
* @since 0.1
|
| 1142 |
-
* @change 1.3.
|
| 1143 |
*/
|
| 1144 |
|
| 1145 |
public static function show_admin_menu() {
|
|
@@ -1151,7 +1165,7 @@ class AntiVirus {
|
|
| 1151 |
/* Werte zuweisen */
|
| 1152 |
$options = array(
|
| 1153 |
'cronjob_enable' => (int)(!empty($_POST['av_cronjob_enable'])),
|
| 1154 |
-
'notify_email' =>
|
| 1155 |
'safe_browsing' => (int)(!empty($_POST['av_safe_browsing']))
|
| 1156 |
);
|
| 1157 |
|
| 7 |
Author: Sergej Müller
|
| 8 |
Author URI: http://wpcoder.de
|
| 9 |
Plugin URI: http://wpantivirus.com
|
| 10 |
+
License: GPLv2 or later
|
| 11 |
+
Version: 1.3.7
|
| 12 |
+
*/
|
| 13 |
+
|
| 14 |
+
/*
|
| 15 |
+
Copyright (C) 2009-2014 Sergej Müller
|
| 16 |
+
|
| 17 |
+
This program is free software; you can redistribute it and/or modify
|
| 18 |
+
it under the terms of the GNU General Public License as published by
|
| 19 |
+
the Free Software Foundation; either version 2 of the License, or
|
| 20 |
+
(at your option) any later version.
|
| 21 |
+
|
| 22 |
+
This program is distributed in the hope that it will be useful,
|
| 23 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 24 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 25 |
+
GNU General Public License for more details.
|
| 26 |
+
|
| 27 |
+
You should have received a copy of the GNU General Public License along
|
| 28 |
+
with this program; if not, write to the Free Software Foundation, Inc.,
|
| 29 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
| 30 |
*/
|
| 31 |
|
| 32 |
|
| 413 |
* Führt die Safe Browsing Prüfung aus
|
| 414 |
*
|
| 415 |
* @since 1.3.4
|
| 416 |
+
* @change 1.3.7
|
| 417 |
*/
|
| 418 |
|
| 419 |
private static function _check_safe_browsing()
|
| 426 |
/* Start request */
|
| 427 |
$response = wp_remote_get(
|
| 428 |
sprintf(
|
| 429 |
+
'https://sb-ssl.google.com/safebrowsing/api/lookup?client=wpantivirus&key=%s&appver=1.3.7&pver=3.1&url=%s',
|
| 430 |
+
'AIzaSyALNYwuy-Pidn7vx3-In-hU0zgMH5Wr42U',
|
| 431 |
urlencode( get_bloginfo('url') )
|
| 432 |
),
|
| 433 |
array(
|
| 449 |
self::_send_warning_notification(
|
| 450 |
esc_html__('Safe Browsing Alert', 'antivirus'),
|
| 451 |
sprintf(
|
| 452 |
+
"%s\r\nhttps://www.google.com/safebrowsing/diagnostic?site=%s&hl=%s",
|
| 453 |
esc_html__('Please check the Google Safe Browsing diagnostic page:', 'antivirus'),
|
| 454 |
urlencode( get_bloginfo('url') ),
|
| 455 |
substr(get_locale(), 0, 2)
|
| 494 |
* Führt die Safe Browsing Prüfung aus
|
| 495 |
*
|
| 496 |
* @since 1.3.4
|
| 497 |
+
* @change 1.3.6
|
| 498 |
*
|
| 499 |
* @param string $subject Betreff der E-Mail
|
| 500 |
* @param string $body Inhalt der E-Mail
|
| 503 |
private static function _send_warning_notification($subject, $body)
|
| 504 |
{
|
| 505 |
/* Receiver email address */
|
| 506 |
+
$email = self::_get_option('notify_email');
|
| 507 |
+
|
| 508 |
+
/* Email address fallback */
|
| 509 |
+
if ( ! is_email($email) ) {
|
| 510 |
$email = get_bloginfo('admin_email');
|
| 511 |
}
|
| 512 |
|
| 633 |
* Rückgabe des aktuellen Theme
|
| 634 |
*
|
| 635 |
* @since 0.1
|
| 636 |
+
* @change 1.3.6
|
| 637 |
*
|
| 638 |
* @return array $themes Array mit Theme-Eigenschaften
|
| 639 |
*/
|
| 640 |
|
| 641 |
private static function _get_current_theme()
|
| 642 |
{
|
| 643 |
+
/* Init */
|
| 644 |
+
$theme = wp_get_theme();
|
| 645 |
+
$name = $theme->get('Name');
|
| 646 |
+
$slug = $theme->get_stylesheet();
|
| 647 |
+
$files = $theme->get_files('php', 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 648 |
|
| 649 |
+
/* Leer? */
|
| 650 |
+
if ( empty($name) OR empty($files) ) {
|
| 651 |
+
return false;
|
| 652 |
}
|
| 653 |
|
| 654 |
+
/* Rückgabe */
|
| 655 |
+
return array(
|
| 656 |
+
'Name' => $name,
|
| 657 |
+
'Slug' => $slug,
|
| 658 |
+
'Template Files' => $files
|
| 659 |
+
);
|
| 660 |
}
|
| 661 |
|
| 662 |
|
| 781 |
break;
|
| 782 |
|
| 783 |
case 'update_white_list':
|
| 784 |
+
if ( ! empty($_POST['_file_md5']) && preg_match('/^[a-f0-9]{32}$/', $_POST['_file_md5']) ) {
|
| 785 |
self::_update_option(
|
| 786 |
'white_list',
|
| 787 |
implode(
|
| 1044 |
* Prüfung einer Datei
|
| 1045 |
*
|
| 1046 |
* @since 0.1
|
| 1047 |
+
* @change 1.3.6
|
| 1048 |
*
|
| 1049 |
* @param string $file Datei zur Prüfung
|
| 1050 |
* @return mixed $results Array mit Ergebnissen | FALSE im Fehlerfall
|
| 1052 |
|
| 1053 |
private static function _check_theme_file($file)
|
| 1054 |
{
|
| 1055 |
+
/* Simple file path check */
|
| 1056 |
+
if ( filter_var($file, FILTER_SANITIZE_URL) !== $file ) {
|
| 1057 |
+
return false;
|
| 1058 |
+
}
|
| 1059 |
+
|
| 1060 |
+
/* Sanitize file string */
|
| 1061 |
+
if ( validate_file($file) !== 0 ) {
|
| 1062 |
+
return false;
|
| 1063 |
+
}
|
| 1064 |
+
|
| 1065 |
/* Kein File? */
|
| 1066 |
if ( ! $file ) {
|
| 1067 |
return false;
|
| 1153 |
* Anzeige der GUI
|
| 1154 |
*
|
| 1155 |
* @since 0.1
|
| 1156 |
+
* @change 1.3.6
|
| 1157 |
*/
|
| 1158 |
|
| 1159 |
public static function show_admin_menu() {
|
| 1165 |
/* Werte zuweisen */
|
| 1166 |
$options = array(
|
| 1167 |
'cronjob_enable' => (int)(!empty($_POST['av_cronjob_enable'])),
|
| 1168 |
+
'notify_email' => sanitize_email(@$_POST['av_notify_email']),
|
| 1169 |
'safe_browsing' => (int)(!empty($_POST['av_safe_browsing']))
|
| 1170 |
);
|
| 1171 |
|
readme.txt
CHANGED
|
@@ -3,8 +3,10 @@ Contributors: sergej.mueller
|
|
| 3 |
Tags: antivirus, malware, scanner, phishing, safe browsing
|
| 4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5RDDW9FEHGLG6
|
| 5 |
Requires at least: 3.8
|
| 6 |
-
Tested up to: 3.9
|
| 7 |
Stable tag: trunk
|
|
|
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
|
|
@@ -49,7 +51,7 @@ Useful plugin that will scan your theme templates for malicious injections. Auto
|
|
| 49 |
|
| 50 |
|
| 51 |
= Author =
|
| 52 |
-
* [Twitter](https://twitter.com/
|
| 53 |
* [Google+](https://plus.google.com/110569673423509816572)
|
| 54 |
* [Plugins](http://wpcoder.de)
|
| 55 |
|
|
@@ -58,6 +60,14 @@ Useful plugin that will scan your theme templates for malicious injections. Auto
|
|
| 58 |
|
| 59 |
== Changelog ==
|
| 60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
= 1.3.5 =
|
| 62 |
* Deutsch: Optimierungen für WordPress 3.8
|
| 63 |
* English: Optimizations for WordPress 3.8
|
| 3 |
Tags: antivirus, malware, scanner, phishing, safe browsing
|
| 4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5RDDW9FEHGLG6
|
| 5 |
Requires at least: 3.8
|
| 6 |
+
Tested up to: 3.9.1
|
| 7 |
Stable tag: trunk
|
| 8 |
+
License: GPLv2 or later
|
| 9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
| 11 |
|
| 12 |
|
| 51 |
|
| 52 |
|
| 53 |
= Author =
|
| 54 |
+
* [Twitter](https://twitter.com/wpseo)
|
| 55 |
* [Google+](https://plus.google.com/110569673423509816572)
|
| 56 |
* [Plugins](http://wpcoder.de)
|
| 57 |
|
| 60 |
|
| 61 |
== Changelog ==
|
| 62 |
|
| 63 |
+
= 1.3.7 =
|
| 64 |
+
* Deutsch: Aktualisierung auf Safe Browsing Lookup API 3.1
|
| 65 |
+
* English: Update the Google Safe Browsing Lookup API to v3.1
|
| 66 |
+
|
| 67 |
+
= 1.3.6 =
|
| 68 |
+
* Deutsch: Code-Revision und Datenvalidierung
|
| 69 |
+
* English: Code revision and data validation
|
| 70 |
+
|
| 71 |
= 1.3.5 =
|
| 72 |
* Deutsch: Optimierungen für WordPress 3.8
|
| 73 |
* English: Optimizations for WordPress 3.8
|
