Anti-Malware Security and Brute-Force Firewall - Version 4.21.85

Version Description

  • Prevented infinite looping on recursive sub-directories.
  • Changed some default values.
  • Checked code for compatibility with WordPress 6.1.1 and ClassicPress 1.4.4.
Download this release

Release Info

Developer scheeeli
Plugin Icon 128x128 Anti-Malware Security and Brute-Force Firewall
Version 4.21.85
Comparing to
See all releases

Code changes from version 4.21.84 to 4.21.85

Files changed (3) hide show
  1. images/index.php +11 -9
  2. index.php +14 -10
  3. readme.txt +11 -3
images/index.php CHANGED
@@ -12,7 +12,7 @@ function GOTMLS_define($DEF, $val) {
12
  $file = basename(__FILE__);
13
  GOTMLS_define("GOTMLS_local_images_path", substr(__FILE__, 0, strlen(__FILE__) - strlen($file)));
14
  GOTMLS_define("GOTMLS_plugin_path", substr(dirname(__FILE__), 0, strlen(dirname(__FILE__)) - strlen(basename(dirname(__FILE__)))));
15
- GOTMLS_define("GOTMLS_Version", '4.21.84');
16
  GOTMLS_define("GOTMLS_require_version", "3.3");
17
 
18
  if (!function_exists("__")) {
@@ -93,6 +93,8 @@ $bad = array("eval", "preg_replace", "auth_pass");
93
  $GLOBALS["GOTMLS"] = array(
94
  "MT" => microtime(true),
95
  "tmp"=>array("HeadersError"=>"", "onLoad"=>"", "file_contents"=>"", "new_contents"=>"", "threats_found"=>array(),
 
 
96
  "skip_dirs" => array(".", ".."), "scanfiles" => array(), "nonce"=>array(),
97
  "mt" => ((isset($_REQUEST["mt"])&&is_numeric($_REQUEST["mt"]))?$_REQUEST["mt"]:microtime(true)),
98
  "threat_files" => array("htaccess"=>".htaccess","timthumb"=>"thumb.php"),
@@ -765,12 +767,12 @@ function GOTMLS_view_details($Q_post, $pretext = "") {
765
  $lt = "<"; // This local variable never changes
766
  $title = __("View Details:",'gotmls');
767
  $clean_file = $Q_post["post_title"];
768
- $size = strlen($GLOBALS["GOTMLS"]["tmp"]["file_contents"]);
769
- if (!(function_exists("mb_detect_encoding") && ($encoding = mb_detect_encoding($GLOBALS["GOTMLS"]["tmp"]["file_contents"]))))
770
  $encoding = "UTF-8";
771
  mb_internal_encoding($encoding);
772
  mb_regex_encoding($encoding);
773
- $GLOBALS["GOTMLS"]["tmp"]["file_contents"] = mb_ereg_replace("\r", "", $GLOBALS["GOTMLS"]["tmp"]["file_contents"]);
774
  $fa = GOTMLS_threats_found_meta($Q_post);
775
  $encoded_file_contents = GOTMLS_htmlentities($GLOBALS["GOTMLS"]["tmp"]["file_contents"], ENT_COMPAT, $encoding);
776
  $encoding = $GLOBALS["GOTMLS"]["tmp"]["encoding"];
@@ -787,7 +789,7 @@ function GOTMLS_view_details($Q_post, $pretext = "") {
787
  GOTMLS_html_tags(array(
788
  "div" => array(
789
  "b" => "$title",
790
- "br id='encoding' /" => "encoding: $encoding",
791
  "br id='size' /" => "size: $size bytes",
792
  "br id='infected' /" => 'infected:'.$Q_post["post_modified_gmt"],
793
  "br id='quarantined' /" => 'quarantined:'.$Q_post["post_date_gmt"]
@@ -807,7 +809,7 @@ function GOTMLS_view_details($Q_post, $pretext = "") {
807
  GOTMLS_html_tags(array(
808
  "tr" => array(
809
  "td" => array(
810
- "textarea" => "$encoded_file_contents"
811
  )
812
  )
813
  ), array(
@@ -1708,7 +1710,7 @@ function GOTMLS_readdir($dir, $current_depth = 1) {
1708
  $GLOBALS["GOTMLS"]["tmp"]["scanfiles"][GOTMLS_encode($dir)] = GOTMLS_strip4java(str_replace(dirname($GLOBALS["GOTMLS"]["log"]["scan"]["dir"]), "...", $dir));
1709
  foreach ($directories as $directory) {
1710
  $path = GOTMLS_trailingslashit($dir).$directory;
1711
- if (isset($_REQUEST["scan_depth"]) && is_numeric($_REQUEST["scan_depth"]) && ($_REQUEST["scan_depth"] != $current_depth) && !in_array($directory, $GLOBALS["GOTMLS"]["tmp"]["skip_dirs"])) {
1712
  $current_depth++;
1713
  $current_depth = GOTMLS_readdir($path, $current_depth);
1714
  } else {
@@ -1803,7 +1805,7 @@ function GOTMLS_check_file($file) {
1803
  echo "/*-->*"."/\ndocument.getElementById('status_text').innerHTML='Checking ".GOTMLS_strip4java($file)." ($filesize bytes)';\n/*<!--*"."/";
1804
  if ($filesize===false)
1805
  echo GOTMLS_return_threat("errors", "blocked", $file, GOTMLS_error_link(__("Failed to determine file size!",'gotmls'), $file));
1806
- elseif (($filesize==0) || ($filesize>((isset($_GET["eli"])&&is_numeric($_GET["eli"]))?$_GET["eli"]:1234567)))
1807
  echo GOTMLS_return_threat("skipped", "blocked", $file, GOTMLS_error_link(__("Skipped because of file size!",'gotmls')." ($filesize bytes)", $file, "potential"));
1808
  elseif (in_array(GOTMLS_get_ext($file), $GLOBALS["GOTMLS"]["tmp"]["skip_ext"]) && !(preg_match('/(shim|social[0-9]*)\.png$/i', $file)))
1809
  echo GOTMLS_return_threat("skipped", "blocked", $file, GOTMLS_error_link(__("Skipped because of file extention!",'gotmls'), $file, "potential"));
@@ -1857,7 +1859,7 @@ function GOTMLS_scandir($dir) {
1857
  if (is_file($path)) {
1858
  $file_ext = GOTMLS_get_ext($file);
1859
  $filesize = @filesize($path);
1860
- if ((in_array($file_ext, $GLOBALS["GOTMLS"]["tmp"]["skip_ext"]) && !(preg_match('/social[0-9]*\.png$/i', $file))) || ($filesize==0) || ($filesize>((isset($_GET["eli"])&&is_numeric($_GET["eli"]))?$_GET["eli"]:1234567)))
1861
  echo GOTMLS_return_threat("skipped", "blocked", $path, GOTMLS_error_link(sprintf(__('Skipped because of file size (%1$s bytes) or file extention (%2$s)!','gotmls'), $filesize, $file_ext), $file, "potential"));
1862
  else
1863
  echo "/*-->*"."/\nscanfilesArKeys.push('".GOTMLS_encode($dir)."&GOTMLS_only_file=".GOTMLS_encode($file)."');\nscanfilesArNames.push('Re-Checking ".GOTMLS_strip4java($path)."');\n/*<!--*"."/".GOTMLS_return_threat("dirs", "wait", $path);
12
  $file = basename(__FILE__);
13
  GOTMLS_define("GOTMLS_local_images_path", substr(__FILE__, 0, strlen(__FILE__) - strlen($file)));
14
  GOTMLS_define("GOTMLS_plugin_path", substr(dirname(__FILE__), 0, strlen(dirname(__FILE__)) - strlen(basename(dirname(__FILE__)))));
15
+ GOTMLS_define("GOTMLS_Version", '4.21.85');
16
  GOTMLS_define("GOTMLS_require_version", "3.3");
17
 
18
  if (!function_exists("__")) {
93
  $GLOBALS["GOTMLS"] = array(
94
  "MT" => microtime(true),
95
  "tmp"=>array("HeadersError"=>"", "onLoad"=>"", "file_contents"=>"", "new_contents"=>"", "threats_found"=>array(),
96
+ "base_page" => "GOTMLS-settings",
97
+ "pluginTitle" => "Anti-Malware",
98
  "skip_dirs" => array(".", ".."), "scanfiles" => array(), "nonce"=>array(),
99
  "mt" => ((isset($_REQUEST["mt"])&&is_numeric($_REQUEST["mt"]))?$_REQUEST["mt"]:microtime(true)),
100
  "threat_files" => array("htaccess"=>".htaccess","timthumb"=>"thumb.php"),
767
  $lt = "<"; // This local variable never changes
768
  $title = __("View Details:",'gotmls');
769
  $clean_file = $Q_post["post_title"];
770
+ $size = strlen($tmp = $GLOBALS["GOTMLS"]["tmp"]["file_contents"]);
771
+ if (!(function_exists("mb_detect_encoding") && ($encoding = $en = mb_detect_encoding($GLOBALS["GOTMLS"]["tmp"]["file_contents"]))))
772
  $encoding = "UTF-8";
773
  mb_internal_encoding($encoding);
774
  mb_regex_encoding($encoding);
775
+ // $GLOBALS["GOTMLS"]["tmp"]["file_contents"] = mb_ereg_replace("\r", "", $GLOBALS["GOTMLS"]["tmp"]["file_contents"]);
776
  $fa = GOTMLS_threats_found_meta($Q_post);
777
  $encoded_file_contents = GOTMLS_htmlentities($GLOBALS["GOTMLS"]["tmp"]["file_contents"], ENT_COMPAT, $encoding);
778
  $encoding = $GLOBALS["GOTMLS"]["tmp"]["encoding"];
789
  GOTMLS_html_tags(array(
790
  "div" => array(
791
  "b" => "$title",
792
+ "br id='encoding' /" => "encoding:$en $encoding",
793
  "br id='size' /" => "size: $size bytes",
794
  "br id='infected' /" => 'infected:'.$Q_post["post_modified_gmt"],
795
  "br id='quarantined' /" => 'quarantined:'.$Q_post["post_date_gmt"]
809
  GOTMLS_html_tags(array(
810
  "tr" => array(
811
  "td" => array(
812
+ "textarea" => mb_ereg_replace("\r", "", "$encoded_file_contents")
813
  )
814
  )
815
  ), array(
1710
  $GLOBALS["GOTMLS"]["tmp"]["scanfiles"][GOTMLS_encode($dir)] = GOTMLS_strip4java(str_replace(dirname($GLOBALS["GOTMLS"]["log"]["scan"]["dir"]), "...", $dir));
1711
  foreach ($directories as $directory) {
1712
  $path = GOTMLS_trailingslashit($dir).$directory;
1713
+ if (isset($_REQUEST["scan_depth"]) && is_numeric($_REQUEST["scan_depth"]) && ($_REQUEST["scan_depth"] != $current_depth) && (!((($Recusive = strpos(GOTMLS_trailingslashit($dir), '/'.$directory.'/')) !== FALSE) && is_dir($dir.substr($dir, $Recusive).substr($dir, $Recusive).substr($dir, $Recusive)))) && !in_array($directory, $GLOBALS["GOTMLS"]["tmp"]["skip_dirs"])) {
1714
  $current_depth++;
1715
  $current_depth = GOTMLS_readdir($path, $current_depth);
1716
  } else {
1805
  echo "/*-->*"."/\ndocument.getElementById('status_text').innerHTML='Checking ".GOTMLS_strip4java($file)." ($filesize bytes)';\n/*<!--*"."/";
1806
  if ($filesize===false)
1807
  echo GOTMLS_return_threat("errors", "blocked", $file, GOTMLS_error_link(__("Failed to determine file size!",'gotmls'), $file));
1808
+ elseif (($filesize==0) || ($filesize>((isset($_GET["eli"])&&is_numeric($_GET["eli"]))?$_GET["eli"]:2934567)))
1809
  echo GOTMLS_return_threat("skipped", "blocked", $file, GOTMLS_error_link(__("Skipped because of file size!",'gotmls')." ($filesize bytes)", $file, "potential"));
1810
  elseif (in_array(GOTMLS_get_ext($file), $GLOBALS["GOTMLS"]["tmp"]["skip_ext"]) && !(preg_match('/(shim|social[0-9]*)\.png$/i', $file)))
1811
  echo GOTMLS_return_threat("skipped", "blocked", $file, GOTMLS_error_link(__("Skipped because of file extention!",'gotmls'), $file, "potential"));
1859
  if (is_file($path)) {
1860
  $file_ext = GOTMLS_get_ext($file);
1861
  $filesize = @filesize($path);
1862
+ if ((in_array($file_ext, $GLOBALS["GOTMLS"]["tmp"]["skip_ext"]) && !(preg_match('/social[0-9]*\.png$/i', $file))) || ($filesize==0) || ($filesize>((isset($_GET["eli"])&&is_numeric($_GET["eli"]))?$_GET["eli"]:2934567)))
1863
  echo GOTMLS_return_threat("skipped", "blocked", $path, GOTMLS_error_link(sprintf(__('Skipped because of file size (%1$s bytes) or file extention (%2$s)!','gotmls'), $filesize, $file_ext), $file, "potential"));
1864
  else
1865
  echo "/*-->*"."/\nscanfilesArKeys.push('".GOTMLS_encode($dir)."&GOTMLS_only_file=".GOTMLS_encode($file)."');\nscanfilesArNames.push('Re-Checking ".GOTMLS_strip4java($path)."');\n/*<!--*"."/".GOTMLS_return_threat("dirs", "wait", $path);
index.php CHANGED
@@ -8,7 +8,7 @@ Author URI: http://wordpress.ieonly.com/category/my-plugins/anti-malware/
8
  Contributors: scheeeli, gotmls
9
  Donate link: https://gotmls.net/donate/
10
  Description: This Anti-Virus/Anti-Malware plugin searches for Malware and other Virus like threats and vulnerabilities on your server and helps you remove them. It's always growing and changing to adapt to new threats so let me know if it's not working for you.
11
- Version: 4.21.84
12
  Requires PHP: 5.6
13
  Requires CP: 1.1.1
14
  */
@@ -55,18 +55,22 @@ function GOTMLS_uninstall() {
55
  register_deactivation_hook(__FILE__, "GOTMLS_uninstall");
56
 
57
  function GOTMLS_menu() {
58
- $base_page = "GOTMLS-settings";
59
- $pluginTitle = "Anti-Malware";
60
  if (GOTMLS_user_can()) {
61
- $my_admin_page = add_menu_page("$pluginTitle ".GOTMLS_Scan_Settings_LANGUAGE, $pluginTitle, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, "GOTMLS_settings", GOTMLS_images_path.'GOTMLS-16x16.gif');
62
- add_action('load-'.$my_admin_page, 'GOTMLS_admin_add_help_tab');
63
- add_submenu_page($base_page, "$pluginTitle ".GOTMLS_Scan_Settings_LANGUAGE, GOTMLS_Scan_Settings_LANGUAGE, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, "GOTMLS_settings");
64
- add_submenu_page($base_page, "$pluginTitle Firewall Options", "Firewall Options", $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], "GOTMLS-Firewall-Options", "GOTMLS_Firewall_Options");
65
- add_submenu_page($base_page, "$pluginTitle ".GOTMLS_View_Quarantine_LANGUAGE, GOTMLS_View_Quarantine_LANGUAGE.(($Qs = GOTMLS_get_quarantine(true))?' <span class="awaiting-mod count-'.$Qs.'"><span class="awaiting-mod">'.$Qs.'</span></span>':""), $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], "GOTMLS_View_Quarantine", "GOTMLS_View_Quarantine");
66
  }
67
  }
68
- add_action("admin_menu", "GOTMLS_menu");
69
- add_action("network_admin_menu", "GOTMLS_menu");
 
 
 
 
 
 
 
70
 
71
  function GOTMLS_admin_add_help_tab() {
72
  $screen = get_current_screen();
8
  Contributors: scheeeli, gotmls
9
  Donate link: https://gotmls.net/donate/
10
  Description: This Anti-Virus/Anti-Malware plugin searches for Malware and other Virus like threats and vulnerabilities on your server and helps you remove them. It's always growing and changing to adapt to new threats so let me know if it's not working for you.
11
+ Version: 4.21.85
12
  Requires PHP: 5.6
13
  Requires CP: 1.1.1
14
  */
55
  register_deactivation_hook(__FILE__, "GOTMLS_uninstall");
56
 
57
  function GOTMLS_menu() {
 
 
58
  if (GOTMLS_user_can()) {
59
+ $GLOBALS["GOTMLS"]["tmp"]["my_admin_page"] = add_menu_page($GLOBALS["GOTMLS"]["tmp"]["pluginTitle"]." ".GOTMLS_Scan_Settings_LANGUAGE, $GLOBALS["GOTMLS"]["tmp"]["pluginTitle"], $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $GLOBALS["GOTMLS"]["tmp"]["base_page"], "GOTMLS_settings", GOTMLS_images_path.'GOTMLS-16x16.gif');
60
+ add_action('load-'.$GLOBALS["GOTMLS"]["tmp"]["my_admin_page"], 'GOTMLS_admin_add_help_tab');
61
+ add_submenu_page($GLOBALS["GOTMLS"]["tmp"]["base_page"], $GLOBALS["GOTMLS"]["tmp"]["pluginTitle"]." ".GOTMLS_Scan_Settings_LANGUAGE, GOTMLS_Scan_Settings_LANGUAGE, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $GLOBALS["GOTMLS"]["tmp"]["base_page"], "GOTMLS_settings");
62
+ add_submenu_page($GLOBALS["GOTMLS"]["tmp"]["base_page"], $GLOBALS["GOTMLS"]["tmp"]["pluginTitle"]." Firewall Options", "Firewall Options", $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], "GOTMLS-Firewall-Options", "GOTMLS_Firewall_Options");
 
63
  }
64
  }
65
+ add_action("admin_menu", "GOTMLS_menu", 8);
66
+ add_action("network_admin_menu", "GOTMLS_menu", 8);
67
+
68
+ function GOTMLS_menu_Quarantine() {
69
+ if (GOTMLS_user_can() && isset($GLOBALS["GOTMLS"]["tmp"]["my_admin_page"]))
70
+ add_submenu_page($GLOBALS["GOTMLS"]["tmp"]["base_page"], $GLOBALS["GOTMLS"]["tmp"]["pluginTitle"]." ".GOTMLS_View_Quarantine_LANGUAGE, GOTMLS_View_Quarantine_LANGUAGE.(($Qs = GOTMLS_get_quarantine(true))?' <span class="awaiting-mod count-'.$Qs.'"><span class="awaiting-mod">'.$Qs.'</span></span>':""), $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], "GOTMLS_View_Quarantine", "GOTMLS_View_Quarantine");
71
+ }
72
+ add_action("admin_menu", "GOTMLS_menu_Quarantine", 16);
73
+ add_action("network_admin_menu", "GOTMLS_menu_Quarantine", 16);
74
 
75
  function GOTMLS_admin_add_help_tab() {
76
  $screen = get_current_screen();
readme.txt CHANGED
@@ -5,10 +5,10 @@ Author URI: http://wordpress.ieonly.com/category/my-plugins/anti-malware/
5
  Contributors: scheeeli, gotmls
6
  Donate link: https://gotmls.net/donate/
7
  Tags: security, firewall, anti-malware, scanner, automatic, repair, remove, malware, virus, threat, hacked, malicious, infection, timthumb, exploit, block, brute-force, wp-login, patch, antimalware, revslider, Revolution Slider
8
- Version: 4.21.84
9
- Stable tag: 4.21.84
10
  Requires at least: 3.3
11
- Tested up to: 6.0.2
12
 
13
  This Anti-Malware scanner searches for Malware, Viruses, and other security threats and vulnerabilities on your server and it helps you fix them.
14
 
@@ -94,6 +94,11 @@ sucuri.net caches their scan results and will not refresh the scan until you cli
94
 
95
  == Changelog ==
96
 
 
 
 
 
 
97
  = 4.21.84 =
98
  * Removed the no_error_reporting option used for debugging when server errors are breaking the site.
99
  * Checked code for compatibility with WordPress 6.0.2 and ClassicPress 1.4.2.
@@ -399,6 +404,9 @@ sucuri.net caches their scan results and will not refresh the scan until you cli
399
 
400
  == Upgrade Notice ==
401
 
 
 
 
402
  = 4.21.84 =
403
  Removed the no_error_reporting debug option and checked compatibility with WordPress 6.0.2 and ClassicPress 1.4.2.
404
 
5
  Contributors: scheeeli, gotmls
6
  Donate link: https://gotmls.net/donate/
7
  Tags: security, firewall, anti-malware, scanner, automatic, repair, remove, malware, virus, threat, hacked, malicious, infection, timthumb, exploit, block, brute-force, wp-login, patch, antimalware, revslider, Revolution Slider
8
+ Version: 4.21.85
9
+ Stable tag: 4.21.85
10
  Requires at least: 3.3
11
+ Tested up to: 6.1.1
12
 
13
  This Anti-Malware scanner searches for Malware, Viruses, and other security threats and vulnerabilities on your server and it helps you fix them.
14
 
94
 
95
  == Changelog ==
96
 
97
+ = 4.21.85 =
98
+ * Prevented infinite looping on recursive sub-directories.
99
+ * Changed some default values.
100
+ * Checked code for compatibility with WordPress 6.1.1 and ClassicPress 1.4.4.
101
+
102
  = 4.21.84 =
103
  * Removed the no_error_reporting option used for debugging when server errors are breaking the site.
104
  * Checked code for compatibility with WordPress 6.0.2 and ClassicPress 1.4.2.
404
 
405
  == Upgrade Notice ==
406
 
407
+ = 4.21.85 =
408
+ Prevented infinite looping on recursive sub-directories and checked code for compatibility with WordPress 6.1.1 and ClassicPress 1.4.4.
409
+
410
  = 4.21.84 =
411
  Removed the no_error_reporting debug option and checked compatibility with WordPress 6.0.2 and ClassicPress 1.4.2.
412