' . __('You have the Better Detection plugin installed on your Wordpress site and it has detected that a change was made outside of the normal working process, such as a direct database update. The details of the change are below:', 'better-detect-text') . '
' . __('If you recognise this change as one that you made then please ignore this email. However, you may want to investigate to be sure that you are happy with the change that has been made.', 'better-detect-text') . '
' . __('You have the Better Detection plugin installed on your Wordpress site and this test notification was triggered. The details of the test are below:', 'better-detect-text') . '
' . __('This plugin will create and store hashes of content (eg. posts, pages, etc.) and monitor these moving forwards in order to detect when changes occur. When changes are made outside of the normal working process, such as a direct database update, this will then be detected as the hash will get out of sync with the content.', 'better-detect-text');
+ echo '
' . __('No new errors have been detected - yay!', 'better-detect-text') . '
';
+ }
+ echo '
';
+ echo '
';
+ echo ' ';
+ echo '
';
+ //echo '
';
+ //echo '
';
+ echo '
';
+ echo '
';
+}
+
+function better_detection_badge_php() {
+ $ver = better_detection_phpversion();
+ $col = "critical";
+ if(version_compare($ver,'7.2','>=')) {
+ $col = "important";
+ }
+ if(version_compare($ver,'7.3','>=')) {
+ $col = "success";
+ }
+ return 'https://img.shields.io/badge/PHP-' . $ver . '-' . $col . '.svg?logo=php&style=for-the-badge';
+}
+
+function better_detection_phpversion() {
+ return explode('-',phpversion())[0]; //trim any extra information
+}
+
+function better_detection_dbtype() {
+ global $wpdb;
+ $vers = $wpdb->get_var("SELECT VERSION() as mysql_version");
+ if(stripos($vers,'MARIA')!==false) {
+ return 'MARIA';
+ }
+ return 'MYSQL';
+}
+
+function better_detection_dbversion() {
+ global $wpdb;
+ $vers = $wpdb->get_var("SELECT VERSION() as mysql_version");
+ return explode('-',$vers)[0]; //trim any extra information
+}
+
+function better_detection_badge_mysql() {
+ $ver = better_detection_dbversion();
+ $col = "critical";
+ if(version_compare($ver,'5.6','>=')) {
+ $col = "important";
+ }
+ if(version_compare($ver,'5.7','>=')) {
+ $col = "success";
+ }
+ return 'https://img.shields.io/badge/MySQL-' . $ver . '-' . $col . '.svg?logo=mysql&style=for-the-badge';
+}
+
+function better_detection_badge_maria() {
+ $ver = better_detection_dbversion();
+ $col = "critical";
+ if(version_compare($ver,'10.0','>=')) {
+ $col = "important";
+ }
+ if(version_compare($ver,'10.1','>=')) {
+ $col = "success";
+ }
+ return 'https://img.shields.io/badge/MariaDB-' . $ver . '-' . $col . '.svg?logo=mariadb&style=for-the-badge';
+}
+
+//define output for settings section
+function better_detection_section_notify() {
+ echo '';
+}
+
+//defined output for settings
+function better_detection_notify_email() {
+ $settings = get_option('better-detection-settings');
+ $value = "";
+ if(isset($settings['better-detection-notify-email']) && $settings['better-detection-notify-email']!=="") {
+ $value = $settings['better-detection-notify-email'];
+ }
+ echo ' ';
+}
+
+function better_detection_notify_slack() {
+ $settings = get_option('better-detection-settings');
+ $value = "";
+ if(isset($settings['better-detection-notify-slack']) && $settings['better-detection-notify-slack']!=="") {
+ $value = $settings['better-detection-notify-slack'];
+ }
+ echo ' ';
+ echo ' ' . __('See Slack\'s', 'better-detect-text') . ' ' . __('Channel Settings > Add an App > Incoming WebHooks', 'better-detect-text') . ' ' . __('menu.', 'better-detect-text') . '';
+}
+
+function better_detection_notify_login() {
+ $settings = get_option('better-detection-settings');
+ $value = "";
+ if(isset($settings['better-detection-notify-login']) && $settings['better-detection-notify-login']!=="") {
+ $value = $settings['better-detection-notify-login'];
+ }
+ echo '';
+ echo ' ' . __('WARNING: No password will be required so keep these links private.', 'better-detect-text') . '';
+}
+
+function better_detection_login_option($opt,$val,$txt) {
+ return ' ';
+}
+
+//add actions
+if(is_admin()) {
+ add_action('admin_menu','better_detection_menus');
+ add_action('admin_init','better_detection_settings');
+}
+
+/*
+----------------------- Add link to admin bar ----------------------
+*/
+
+//add link to the admin bar
+function better_detection_admin_bar_render() {
+ global $wp_admin_bar;
+ global $wpdb;
+ $errors = $wpdb->prefix . "better_detection_errors";
+
+ //check if unfixed errors
+ $count = $wpdb->get_var("SELECT COUNT(*) FROM $errors WHERE fixed_date IS NULL");
+ if($count>0) {
+ $wp_admin_bar->add_menu(array(
+ 'parent' => false,
+ 'id' => 'better-detection',
+ 'title' => "Better Detection ($count)",
+ 'href' => admin_url('options-general.php') . '?page=better-detection-settings',
+ 'meta' => false
+ ));
+ }
+}
+add_action('wp_before_admin_bar_render', 'better_detection_admin_bar_render');
+
+/*
+--------------------- Add links to plugins page ---------------------
+*/
+
+//show settings link
+function better_detection_links($links) {
+ $links[] = sprintf('%s',admin_url('options-general.php?page=better-detection-settings'), __('Settings', 'better-detect-text'));
+ return $links;
+}
+
+//show Pro link
+function better_detection_meta($links, $file) {
+ if($file===plugin_basename(__FILE__)) {
+ $links[] = '' . __('Check out Better Security Pro', 'better-detect-text') . '';
+ }
+ return $links;
+}
+
+//add actions
+if(is_admin()) {
+ add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'better_detection_links');
+ //add_filter('plugin_row_meta', 'better_detection_meta', 10, 2);
+}
+
+/*
+----------------------------- The End ------------------------------
+*/
diff --git a/svn/tags/1.4/header.png b/svn/tags/1.4/header.png
new file mode 100644
index 0000000..167fa17
Binary files /dev/null and b/svn/tags/1.4/header.png differ
diff --git a/svn/tags/1.4/icon-36x36.png b/svn/tags/1.4/icon-36x36.png
new file mode 100644
index 0000000..a718b08
Binary files /dev/null and b/svn/tags/1.4/icon-36x36.png differ
diff --git a/svn/tags/1.4/icon-white-36x36.png b/svn/tags/1.4/icon-white-36x36.png
new file mode 100644
index 0000000..71e75bf
Binary files /dev/null and b/svn/tags/1.4/icon-white-36x36.png differ
diff --git a/svn/tags/1.4/images/ui-bg_glass_55_fbf9ee_1x400.png b/svn/tags/1.4/images/ui-bg_glass_55_fbf9ee_1x400.png
new file mode 100644
index 0000000..ff8f19f
Binary files /dev/null and b/svn/tags/1.4/images/ui-bg_glass_55_fbf9ee_1x400.png differ
diff --git a/svn/tags/1.4/images/ui-bg_glass_65_ffffff_1x400.png b/svn/tags/1.4/images/ui-bg_glass_65_ffffff_1x400.png
new file mode 100644
index 0000000..294fe27
Binary files /dev/null and b/svn/tags/1.4/images/ui-bg_glass_65_ffffff_1x400.png differ
diff --git a/svn/tags/1.4/images/ui-bg_glass_75_dadada_1x400.png b/svn/tags/1.4/images/ui-bg_glass_75_dadada_1x400.png
new file mode 100644
index 0000000..0d22132
Binary files /dev/null and b/svn/tags/1.4/images/ui-bg_glass_75_dadada_1x400.png differ
diff --git a/svn/tags/1.4/images/ui-bg_glass_75_e6e6e6_1x400.png b/svn/tags/1.4/images/ui-bg_glass_75_e6e6e6_1x400.png
new file mode 100644
index 0000000..f35a6bd
Binary files /dev/null and b/svn/tags/1.4/images/ui-bg_glass_75_e6e6e6_1x400.png differ
diff --git a/svn/tags/1.4/images/ui-bg_glass_95_fef1ec_1x400.png b/svn/tags/1.4/images/ui-bg_glass_95_fef1ec_1x400.png
new file mode 100644
index 0000000..a076359
Binary files /dev/null and b/svn/tags/1.4/images/ui-bg_glass_95_fef1ec_1x400.png differ
diff --git a/svn/tags/1.4/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/svn/tags/1.4/images/ui-bg_highlight-soft_75_cccccc_1x100.png
new file mode 100644
index 0000000..181801a
Binary files /dev/null and b/svn/tags/1.4/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ
diff --git a/svn/tags/1.4/images/ui-icons_222222_256x240.png b/svn/tags/1.4/images/ui-icons_222222_256x240.png
new file mode 100644
index 0000000..e9c8e16
Binary files /dev/null and b/svn/tags/1.4/images/ui-icons_222222_256x240.png differ
diff --git a/svn/tags/1.4/images/ui-icons_454545_256x240.png b/svn/tags/1.4/images/ui-icons_454545_256x240.png
new file mode 100644
index 0000000..d6169e8
Binary files /dev/null and b/svn/tags/1.4/images/ui-icons_454545_256x240.png differ
diff --git a/svn/tags/1.4/images/ui-icons_888888_256x240.png b/svn/tags/1.4/images/ui-icons_888888_256x240.png
new file mode 100644
index 0000000..d3e6e02
Binary files /dev/null and b/svn/tags/1.4/images/ui-icons_888888_256x240.png differ
diff --git a/svn/tags/1.4/index.php b/svn/tags/1.4/index.php
new file mode 100644
index 0000000..cf879a5
--- /dev/null
+++ b/svn/tags/1.4/index.php
@@ -0,0 +1,2 @@
+").hide().siblings("input[type=button]").hide();
+ jQuery.post(ajax_object.url, data, function(response) {
+ if(response==="Success") {
+ inp.closest("tr").fadeOut("slow",function() { //remove row
+ jQuery(this).remove();
+ var trs = jQuery("#better-detection-tabs-errors").find("tr");
+ if(trs.length===2) {
+ jQuery("#better-detection-tabs-errors").html("
No new errors have been detected - yay!
"); //if only header/footer left then show message
+ }
+ better_detection_error_count();
+ });
+ }
+ else {
+ inp.siblings("img").remove(); //remove working image
+ inp.siblings("input").addBack().show(); //restore buttons
+ }
+ });
+ }
+ });
+});
diff --git a/svn/tags/1.4/readme.txt b/svn/tags/1.4/readme.txt
new file mode 100644
index 0000000..0eafafc
--- /dev/null
+++ b/svn/tags/1.4/readme.txt
@@ -0,0 +1,15 @@
+=== Better Detection ===
+Contributors: bettersecurity, riklewis
+Tags: better, better, security, detection, content, scanner
+Requires at least: 3.5
+Tested up to: 5.3
+Stable tag: trunk
+Requires PHP: 5.6
+License: GPLv3
+License URI: https://www.gnu.org/licenses/gpl-3.0.html
+
+Improve the security of your website by detecting unexpected changes to content
+
+== Description ==
+
+This plugin will create and store hashes of content (eg. posts, pages, etc.) and monitor these moving forwards in order to detect when changes occur. When changes are made outside of the normal working process, such as a direct database update, this will then be detected as the hash will get out of sync with the content.
diff --git a/svn/tags/1.4/working.gif b/svn/tags/1.4/working.gif
new file mode 100644
index 0000000..d1f329d
Binary files /dev/null and b/svn/tags/1.4/working.gif differ
diff --git a/svn/trunk/working.gif b/svn/trunk/working.gif
new file mode 100644
index 0000000..d1f329d
Binary files /dev/null and b/svn/trunk/working.gif differ