Version Description
- Google Authenticator-Two Factor Authentication (2FA) : Antivirus : Fixing Cache issues and adding nonce.
Download this release
Release Info
Developer | cyberlord92 |
Plugin | Google Authenticator – WordPress Two Factor Authentication (2FA) |
Version | 5.3.22 |
Comparing to | |
See all releases |
Code changes from version 5.3.21 to 5.3.22
- controllers/malware_scanner/malware_scan_ajax.php +5 -12
- database/database_functions.php +1 -1
- handler/malware_scanner/malware_scanner_cron.php +60 -64
- handler/malware_scanner/scanner_set_cron.php +8 -9
- helper/constants.php +4 -0
- helper/messages.php +1 -1
- includes/css/style_settings.css +41 -0
- miniorange_2_factor_settings.php +12 -8
- readme.txt +8 -2
- uninstall.php +1 -0
- views/account/register.php +1 -1
- views/malware_scanner/scan_settings_view.php +43 -17
- views/malware_scanner/scan_summary_view.php +240 -120
- views/navbar.php +7 -5
controllers/malware_scanner/malware_scan_ajax.php
CHANGED
@@ -51,14 +51,6 @@ class Mo_wpns_scan_malware
|
|
51 |
else{
|
52 |
|
53 |
|
54 |
-
isset($POSTED['scan_plugin']) ? update_option('mo_wpns_scan_plugins',sanitize_text_field($POSTED['scan_plugin'])) : update_option('mo_wpns_scan_plugins',0);
|
55 |
-
isset($POSTED['scan_themes']) ? update_option('mo_wpns_scan_themes',sanitize_text_field($POSTED['scan_themes'])) : update_option('mo_wpns_scan_themes',0);
|
56 |
-
isset($POSTED['scan_core']) ? update_option('mo_wpns_scan_wp_files',sanitize_text_field($POSTED['scan_core'])) : update_option('mo_wpns_scan_wp_files',0);
|
57 |
-
update_option('mo_wpns_scan_files_extensions',sanitize_text_field($POSTED['file_type']));
|
58 |
-
isset($POSTED['vulnerable_check']) ? update_option('mo_wpns_check_vulnerable_code',sanitize_text_field($POSTED['vulnerable_check'])) : update_option('mo_wpns_check_vulnerable_code',0);
|
59 |
-
isset($POSTED['sql_check']) ? update_option('mo_wpns_check_sql_injection',sanitize_text_field($POSTED['sql_check'])) : update_option('mo_wpns_check_sql_injection',0);
|
60 |
-
isset($POSTED['ext_link']) ? update_option('mo_wpns_check_external_link',sanitize_text_field($POSTED['ext_link'])) : update_option('mo_wpns_check_external_link',0);
|
61 |
-
isset($POSTED['repo_check']) ? update_option('mo_wpns_scan_files_with_repo',sanitize_text_field($POSTED['repo_check'])) : update_option('mo_wpns_scan_files_with_repo',0);
|
62 |
$mo_wpns_scan_plugins=isset($POSTED['scan_plugin']) ? sanitize_text_field($POSTED['scan_plugin']) : 0;
|
63 |
$mo_wpns_scan_themes=isset($POSTED['scan_themes']) ? sanitize_text_field($POSTED['scan_themes']) : 0;
|
64 |
$mo_wpns_scan_wp_files= isset($POSTED['scan_core']) ? sanitize_text_field($POSTED['scan_core']) : 0;
|
@@ -67,7 +59,7 @@ class Mo_wpns_scan_malware
|
|
67 |
$mo_wpns_check_sql_injection=isset($POSTED['sql_check']) ? sanitize_text_field($POSTED['sql_check']) : 0;
|
68 |
$mo_wpns_check_external_link=isset($POSTED['ext_link']) ? sanitize_text_field($POSTED['ext_link']) : 0;
|
69 |
$mo_wpns_scan_files_with_repo=isset($POSTED['repo_check']) ? sanitize_text_field($POSTED['repo_check']) : 0;
|
70 |
-
$folders_to_skip= $POSTED['skip_path'];
|
71 |
$folders_to_skip = str_replace('\\\\', '/', $folders_to_skip);
|
72 |
$str="";
|
73 |
|
@@ -87,10 +79,10 @@ class Mo_wpns_scan_malware
|
|
87 |
wp_send_json('path_error');
|
88 |
}
|
89 |
}
|
90 |
-
|
91 |
$mo_wpns_skip_folders=$str;
|
92 |
}else{
|
93 |
-
|
94 |
$mo_wpns_skip_folders=$folders_to_skip;
|
95 |
}
|
96 |
|
@@ -138,6 +130,7 @@ class Mo_wpns_scan_malware
|
|
138 |
update_option('mo_wpns_last_themes', $theme_current);
|
139 |
|
140 |
update_option('mo2f_scan_initialize', 0);
|
|
|
141 |
|
142 |
$mo_wpns_malware_scan_in_progress="IN PROGRESS";
|
143 |
$mo_wpns_files_scanned=0;
|
@@ -265,7 +258,7 @@ class Mo_wpns_scan_malware
|
|
265 |
|
266 |
|
267 |
public function mo_wpns_get_progress(){
|
268 |
-
|
269 |
$decoded_scan_status=json_decode(get_option('mo_wpns_scan_status'));
|
270 |
$status= $decoded_scan_status->scan_progress;;
|
271 |
$files_scanned= $decoded_scan_status->files_scanned;
|
51 |
else{
|
52 |
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
$mo_wpns_scan_plugins=isset($POSTED['scan_plugin']) ? sanitize_text_field($POSTED['scan_plugin']) : 0;
|
55 |
$mo_wpns_scan_themes=isset($POSTED['scan_themes']) ? sanitize_text_field($POSTED['scan_themes']) : 0;
|
56 |
$mo_wpns_scan_wp_files= isset($POSTED['scan_core']) ? sanitize_text_field($POSTED['scan_core']) : 0;
|
59 |
$mo_wpns_check_sql_injection=isset($POSTED['sql_check']) ? sanitize_text_field($POSTED['sql_check']) : 0;
|
60 |
$mo_wpns_check_external_link=isset($POSTED['ext_link']) ? sanitize_text_field($POSTED['ext_link']) : 0;
|
61 |
$mo_wpns_scan_files_with_repo=isset($POSTED['repo_check']) ? sanitize_text_field($POSTED['repo_check']) : 0;
|
62 |
+
$folders_to_skip= sanitize_text_field($POSTED['skip_path']);
|
63 |
$folders_to_skip = str_replace('\\\\', '/', $folders_to_skip);
|
64 |
$str="";
|
65 |
|
79 |
wp_send_json('path_error');
|
80 |
}
|
81 |
}
|
82 |
+
|
83 |
$mo_wpns_skip_folders=$str;
|
84 |
}else{
|
85 |
+
|
86 |
$mo_wpns_skip_folders=$folders_to_skip;
|
87 |
}
|
88 |
|
130 |
update_option('mo_wpns_last_themes', $theme_current);
|
131 |
|
132 |
update_option('mo2f_scan_initialize', 0);
|
133 |
+
update_option('mo_wpns_hide_malware_popup', 1);
|
134 |
|
135 |
$mo_wpns_malware_scan_in_progress="IN PROGRESS";
|
136 |
$mo_wpns_files_scanned=0;
|
258 |
|
259 |
|
260 |
public function mo_wpns_get_progress(){
|
261 |
+
|
262 |
$decoded_scan_status=json_decode(get_option('mo_wpns_scan_status'));
|
263 |
$status= $decoded_scan_status->scan_progress;;
|
264 |
$files_scanned= $decoded_scan_status->files_scanned;
|
database/database_functions.php
CHANGED
@@ -664,7 +664,7 @@
|
|
664 |
$malware_count = $record->malware_count;
|
665 |
}
|
666 |
if($record->repo_issues < 0){
|
667 |
-
$warning_count = $record->
|
668 |
}else{
|
669 |
$warning_count = $record->repo_issues + $record->malicious_links;
|
670 |
}
|
664 |
$malware_count = $record->malware_count;
|
665 |
}
|
666 |
if($record->repo_issues < 0){
|
667 |
+
$warning_count = $record->malicious_links;
|
668 |
}else{
|
669 |
$warning_count = $record->repo_issues + $record->malicious_links;
|
670 |
}
|
handler/malware_scanner/malware_scanner_cron.php
CHANGED
@@ -20,17 +20,19 @@ class Mo_wpns_Scan_Handler_Cron{
|
|
20 |
update_option('mo_stop_scan','0');
|
21 |
$base = get_home_path();
|
22 |
$hostname = 'wordpress.org';
|
23 |
-
$wordpress_server_status = $this->mo_wpns_check_malware_server_status($hostname); //check only if writable
|
24 |
$uploads_dir = wp_upload_dir();
|
25 |
$uploads_path= $uploads_dir['basedir'];
|
26 |
-
if (!is_writable($uploads_path)) {
|
27 |
$scan_config['check_repo'] = 0;
|
28 |
$repo_check_status_code = -97;
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
}
|
30 |
-
|
31 |
-
$scan_config['check_repo'] = 0;
|
32 |
-
$repo_check_status_code = -98;
|
33 |
-
}
|
34 |
if($scan_config['core_scan'] == 1){
|
35 |
$folderpaths['base'] = $base;
|
36 |
$folderNames .= "WP Files;";
|
@@ -54,9 +56,6 @@ class Mo_wpns_Scan_Handler_Cron{
|
|
54 |
$reportid = $mo2f_malware_db_handler->create_scan_report($folderNames, $scan_config['type_scan'], $start_time, $repo_check_status_code);
|
55 |
update_option('mo2f_report_id', $reportid);
|
56 |
|
57 |
-
$scan_handler_obj = new mo2f_scanner_parts;
|
58 |
-
|
59 |
-
//wp remote get
|
60 |
$scanverification=$this->createKeyCurrentScan($scan_config['type_scan'],$reportid);
|
61 |
|
62 |
$response=$this->mo2f_wp_remote_get($scan_config['type_scan'], $reportid, $scanverification, 1);
|
@@ -73,9 +72,10 @@ class Mo_wpns_Scan_Handler_Cron{
|
|
73 |
|
74 |
function mo2f_wp_remote_get($scan_mode, $reportid, $scanverification,$scan_stage_complete=1){
|
75 |
//set time out based on time left or 10 secs
|
76 |
-
|
|
|
77 |
$http_header_array =array("Content-Type"=>"application/json","charset"=>"UTF-8","Authorization"=>"Basic");
|
78 |
-
$url = get_site_url()."?scan_request=1"."&scanverification=".$scanverification."&reportid=".$reportid."&scan_stage_complete=".$scan_stage_complete."&scan_mode=".$scan_mode;//scanverification,report_id, scan_stage_complete and scan_mode
|
79 |
|
80 |
$args = array(
|
81 |
'method' => 'GET',
|
@@ -87,7 +87,6 @@ class Mo_wpns_Scan_Handler_Cron{
|
|
87 |
'headers' => $http_header_array
|
88 |
);
|
89 |
$response= wp_remote_get($url,$args);
|
90 |
-
//$response->errors['http_request_failed']['0'];
|
91 |
|
92 |
}
|
93 |
|
@@ -96,7 +95,6 @@ class Mo_wpns_Scan_Handler_Cron{
|
|
96 |
$repo_check_status = $scan_config['check_repo'];
|
97 |
$repo_check_status_code=get_option('mo2f_repo_status');
|
98 |
$wp_repo_file=get_option('mo2f_repo_path');
|
99 |
-
|
100 |
if ( ! function_exists( 'get_plugins' ) ) {
|
101 |
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
102 |
}
|
@@ -585,9 +583,8 @@ class Mo_wpns_Scan_Handler_Cron{
|
|
585 |
if(is_dir($source_file_path)){
|
586 |
continue;
|
587 |
}
|
588 |
-
$
|
589 |
-
|
590 |
-
$arr= explode(DIRECTORY_SEPARATOR, $source_file_path);
|
591 |
$theme_path=get_theme_root();
|
592 |
if ($value == $base && ($scan_config['core_scan'] == 1)){
|
593 |
// $arr = explode(DIRECTORY_SEPARATOR, $iterator->getSubPathName());
|
@@ -656,9 +653,9 @@ class Mo_wpns_Scan_Handler_Cron{
|
|
656 |
$repo_issue_count = 0;
|
657 |
$malicious_link_count = 0;
|
658 |
$file_ext = $scan_config['file_extension'];
|
659 |
-
$host =
|
660 |
$extensions = array();
|
661 |
-
$hostname =
|
662 |
$malware_server_status = $this->mo_wpns_check_malware_server_status($hostname);
|
663 |
if(empty($file_ext)){
|
664 |
}else{
|
@@ -695,8 +692,15 @@ class Mo_wpns_Scan_Handler_Cron{
|
|
695 |
$nooffiles++;
|
696 |
continue;
|
697 |
}
|
|
|
|
|
|
|
698 |
$ext = pathinfo($source_file_path, PATHINFO_EXTENSION);
|
699 |
$ext= strtolower($ext);
|
|
|
|
|
|
|
|
|
700 |
$extns = $enable_extns ? true : (in_array($ext, $extensions) ? true : false);
|
701 |
if($extns){
|
702 |
$nooffiles++;
|
@@ -711,53 +715,52 @@ class Mo_wpns_Scan_Handler_Cron{
|
|
711 |
|
712 |
$hash_of_file= md5_file($source_file_path);
|
713 |
$res=$mo2f_malware_db_handler->check_hash($hash_of_file);
|
714 |
-
|
715 |
$datascan = empty($res)?true:(isset($res[0]->scan_data) ? unserialize($res[0]->scan_data):false);
|
716 |
$scanmalware = is_array($datascan)?$datascan['malware']==0:(!empty($datascan) ? $datascan: true);
|
717 |
$malware_status = $scanmalware? 0 : 1;
|
718 |
|
719 |
-
if(!empty($res) && !$scanmalware ){
|
720 |
-
|
721 |
else{
|
722 |
$flag_update=0;
|
723 |
-
|
|
|
724 |
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
|
|
|
|
750 |
}else{
|
751 |
-
$
|
|
|
|
|
752 |
}
|
753 |
-
}else{
|
754 |
-
$infected_files=get_option('mo_wpns_infected_files');
|
755 |
-
$infected_files++;
|
756 |
-
update_option('mo_wpns_infected_files', $infected_files);
|
757 |
}
|
758 |
-
|
759 |
-
|
760 |
-
$scanresults[$source_file_path]=$scanresult;
|
761 |
|
762 |
}
|
763 |
|
@@ -783,7 +786,6 @@ class Mo_wpns_Scan_Handler_Cron{
|
|
783 |
|
784 |
$nooffiles=0;
|
785 |
$malicious_link_count=0;
|
786 |
-
// $repo_issue_count=0;
|
787 |
foreach ($files_to_scan as $value) {
|
788 |
$status=$this->check_exec_limit($start_time, $time_limit);//check limit for each file.
|
789 |
if(!$status){//wp_remote_get
|
@@ -792,7 +794,6 @@ class Mo_wpns_Scan_Handler_Cron{
|
|
792 |
$encoded_scan_status=json_encode($decoded_scan_status);
|
793 |
update_option('mo_wpns_scan_status', $encoded_scan_status);
|
794 |
return array('file_count'=> $nooffiles, 'malicious_link'=>$malicious_link_count, 'scan'=>$scanresults);
|
795 |
-
//time limit close by. Returned status of current scan. Update DB and make next request.
|
796 |
}
|
797 |
$flag_update=0;
|
798 |
$nooffiles++;
|
@@ -803,15 +804,13 @@ class Mo_wpns_Scan_Handler_Cron{
|
|
803 |
update_option('mo_wpns_scan_status', $encoded_scan_status);
|
804 |
}
|
805 |
$source_file_path=$value->path;
|
806 |
-
if(!file_exists($source_file_path) || filesize($source_file_path) > 5242880){
|
807 |
continue;
|
808 |
}
|
809 |
$hash_of_file= md5_file($source_file_path);
|
810 |
$res=$mo2f_malware_db_handler->check_hash($hash_of_file);
|
811 |
$datascan = empty($res)?true:(isset($res[0]->scan_data) ? unserialize($res[0]->scan_data):false);
|
812 |
-
//$repocheck = is_array($datascan)?$datascan['repo']==0:(!empty($datascan) ? $datascan: true);
|
813 |
$extlink = is_array($datascan)?$datascan['ext_link']==0:(!empty($datascan) ? $datascan: true);
|
814 |
-
//$repo_status = $repocheck? 0 : 1;
|
815 |
$link_status = $extlink? 0 : 1;
|
816 |
if(is_array($datascan)){
|
817 |
$malware_status= $datascan['malware'];
|
@@ -832,9 +831,7 @@ class Mo_wpns_Scan_Handler_Cron{
|
|
832 |
}
|
833 |
}
|
834 |
|
835 |
-
//repo check code to be added
|
836 |
if($flag_update == 0){
|
837 |
-
//$repo_status = $scan_config['check_repo'] && $repo_status ? 1 : 0;
|
838 |
$link_status = $scan_config['ext_link_check'] && $link_status ? 1: 0;
|
839 |
$repo_status=0;
|
840 |
|
@@ -961,11 +958,10 @@ class Mo_wpns_Scan_Handler_Cron{
|
|
961 |
$scanresult['repo']=$issues;
|
962 |
$flag_update=1;
|
963 |
}
|
964 |
-
|
965 |
|
966 |
if($flag_update == 0){
|
967 |
$repo_status = $scan_config['check_repo'] && $repo_status ? 1 : 0;
|
968 |
-
//$link_status = $scan_config['ext_link_check'] && $link_status ? 1: 0;
|
969 |
|
970 |
$scan_data = array('malware'=>$malware_status, 'repo'=>$repo_status, 'ext_link'=>$link_status);
|
971 |
$infected_array=$mo2f_malware_db_handler->get_detail_report_with_id($reportid);
|
20 |
update_option('mo_stop_scan','0');
|
21 |
$base = get_home_path();
|
22 |
$hostname = 'wordpress.org';
|
|
|
23 |
$uploads_dir = wp_upload_dir();
|
24 |
$uploads_path= $uploads_dir['basedir'];
|
25 |
+
if (!is_writable($uploads_path)) {
|
26 |
$scan_config['check_repo'] = 0;
|
27 |
$repo_check_status_code = -97;
|
28 |
+
}else{
|
29 |
+
$wordpress_server_status = $this->mo_wpns_check_malware_server_status($hostname);
|
30 |
+
if (!$wordpress_server_status) {
|
31 |
+
$scan_config['check_repo'] = 0;
|
32 |
+
$repo_check_status_code = -98;
|
33 |
+
}
|
34 |
}
|
35 |
+
|
|
|
|
|
|
|
36 |
if($scan_config['core_scan'] == 1){
|
37 |
$folderpaths['base'] = $base;
|
38 |
$folderNames .= "WP Files;";
|
56 |
$reportid = $mo2f_malware_db_handler->create_scan_report($folderNames, $scan_config['type_scan'], $start_time, $repo_check_status_code);
|
57 |
update_option('mo2f_report_id', $reportid);
|
58 |
|
|
|
|
|
|
|
59 |
$scanverification=$this->createKeyCurrentScan($scan_config['type_scan'],$reportid);
|
60 |
|
61 |
$response=$this->mo2f_wp_remote_get($scan_config['type_scan'], $reportid, $scanverification, 1);
|
72 |
|
73 |
function mo2f_wp_remote_get($scan_mode, $reportid, $scanverification,$scan_stage_complete=1){
|
74 |
//set time out based on time left or 10 secs
|
75 |
+
|
76 |
+
$scan_nonce=rand(10,100000);
|
77 |
$http_header_array =array("Content-Type"=>"application/json","charset"=>"UTF-8","Authorization"=>"Basic");
|
78 |
+
$url = get_site_url()."?scan_request=1"."&scanverification=".$scanverification."&reportid=".$reportid."&scan_stage_complete=".$scan_stage_complete."&scan_mode=".$scan_mode."&scan_nonce=".$scan_nonce;//scanverification,report_id, scan_stage_complete and scan_mode
|
79 |
|
80 |
$args = array(
|
81 |
'method' => 'GET',
|
87 |
'headers' => $http_header_array
|
88 |
);
|
89 |
$response= wp_remote_get($url,$args);
|
|
|
90 |
|
91 |
}
|
92 |
|
95 |
$repo_check_status = $scan_config['check_repo'];
|
96 |
$repo_check_status_code=get_option('mo2f_repo_status');
|
97 |
$wp_repo_file=get_option('mo2f_repo_path');
|
|
|
98 |
if ( ! function_exists( 'get_plugins' ) ) {
|
99 |
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
100 |
}
|
583 |
if(is_dir($source_file_path)){
|
584 |
continue;
|
585 |
}
|
586 |
+
$source_file_path_for_explode = str_replace('/', '\\', $source_file_path);
|
587 |
+
$arr= explode('\\', $source_file_path_for_explode);
|
|
|
588 |
$theme_path=get_theme_root();
|
589 |
if ($value == $base && ($scan_config['core_scan'] == 1)){
|
590 |
// $arr = explode(DIRECTORY_SEPARATOR, $iterator->getSubPathName());
|
653 |
$repo_issue_count = 0;
|
654 |
$malicious_link_count = 0;
|
655 |
$file_ext = $scan_config['file_extension'];
|
656 |
+
$host = MoWpnsConstants::$host;
|
657 |
$extensions = array();
|
658 |
+
$hostname = MoWpnsConstants::$hostname;
|
659 |
$malware_server_status = $this->mo_wpns_check_malware_server_status($hostname);
|
660 |
if(empty($file_ext)){
|
661 |
}else{
|
692 |
$nooffiles++;
|
693 |
continue;
|
694 |
}
|
695 |
+
|
696 |
+
$source_file_path_size = str_replace("\\", "/", $source_file_path);
|
697 |
+
|
698 |
$ext = pathinfo($source_file_path, PATHINFO_EXTENSION);
|
699 |
$ext= strtolower($ext);
|
700 |
+
if(!((filesize($source_file_path_size) < 1048576)) ){
|
701 |
+
$nooffiles++;
|
702 |
+
continue;
|
703 |
+
}
|
704 |
$extns = $enable_extns ? true : (in_array($ext, $extensions) ? true : false);
|
705 |
if($extns){
|
706 |
$nooffiles++;
|
715 |
|
716 |
$hash_of_file= md5_file($source_file_path);
|
717 |
$res=$mo2f_malware_db_handler->check_hash($hash_of_file);
|
|
|
718 |
$datascan = empty($res)?true:(isset($res[0]->scan_data) ? unserialize($res[0]->scan_data):false);
|
719 |
$scanmalware = is_array($datascan)?$datascan['malware']==0:(!empty($datascan) ? $datascan: true);
|
720 |
$malware_status = $scanmalware? 0 : 1;
|
721 |
|
722 |
+
if(!empty($res) && !$scanmalware ){
|
723 |
+
}
|
724 |
else{
|
725 |
$flag_update=0;
|
726 |
+
if((filesize($source_file_path_size) < 1048576) ){
|
727 |
+
$file_content=file_get_contents($source_file_path);
|
728 |
|
729 |
+
if(($scan_config['check_vulnerable'] == 1 || $scan_config['check_sql'] == 1) && !in_array($ext, array('zip','sitx','7z','rar','gz','tar.gz','jpg','jpeg','png','gif','svg','tiff','raw')) && filesize($source_file_path_size) < 1048576 && $malware_server_status && $extns && $scanmalware){
|
730 |
+
$malware_status = 1;
|
731 |
+
$cfile=curl_file_create($source_file_path, 'test/plain', time().basename($source_file_path));
|
732 |
+
$postdata = array('file' => $cfile);
|
733 |
+
|
734 |
+
$content_type = 'multipart/form-data';
|
735 |
+
$issues = $this->mo_wpns_malware_scan_request($postdata, $host, $content_type);
|
736 |
+
if ($issues) {
|
737 |
+
$scan_malware_count++;
|
738 |
+
$scanresult['scan'] = $issues;
|
739 |
+
$flag_update=1;
|
740 |
+
}
|
741 |
+
}else{
|
742 |
+
|
743 |
+
}
|
744 |
+
}
|
745 |
+
|
746 |
+
if($flag_update == 0){
|
747 |
+
$malware_status = ($scan_config['check_vulnerable'] || $scan_config['check_sql']) && $malware_status ? 1 : 0;
|
748 |
+
$repo_status=0;
|
749 |
+
$link_status=0;
|
750 |
+
$scan_data = array('malware'=>$malware_status, 'repo'=>$repo_status, 'ext_link'=>$link_status);
|
751 |
+
if(empty($res)){
|
752 |
+
$mo2f_malware_db_handler->insert_hash($source_file_path, $hash_of_file, $scan_data);
|
753 |
+
}else{
|
754 |
+
$mo2f_malware_db_handler->update_hash($source_file_path, $hash_of_file, $scan_data);
|
755 |
+
}
|
756 |
}else{
|
757 |
+
$infected_files=get_option('mo_wpns_infected_files');
|
758 |
+
$infected_files++;
|
759 |
+
update_option('mo_wpns_infected_files', $infected_files);
|
760 |
}
|
|
|
|
|
|
|
|
|
761 |
}
|
762 |
+
if(!empty($scanresult))
|
763 |
+
$scanresults[$source_file_path]=$scanresult;
|
|
|
764 |
|
765 |
}
|
766 |
|
786 |
|
787 |
$nooffiles=0;
|
788 |
$malicious_link_count=0;
|
|
|
789 |
foreach ($files_to_scan as $value) {
|
790 |
$status=$this->check_exec_limit($start_time, $time_limit);//check limit for each file.
|
791 |
if(!$status){//wp_remote_get
|
794 |
$encoded_scan_status=json_encode($decoded_scan_status);
|
795 |
update_option('mo_wpns_scan_status', $encoded_scan_status);
|
796 |
return array('file_count'=> $nooffiles, 'malicious_link'=>$malicious_link_count, 'scan'=>$scanresults);
|
|
|
797 |
}
|
798 |
$flag_update=0;
|
799 |
$nooffiles++;
|
804 |
update_option('mo_wpns_scan_status', $encoded_scan_status);
|
805 |
}
|
806 |
$source_file_path=$value->path;
|
807 |
+
if(!file_exists($source_file_path) || filesize($source_file_path) > 5242880){
|
808 |
continue;
|
809 |
}
|
810 |
$hash_of_file= md5_file($source_file_path);
|
811 |
$res=$mo2f_malware_db_handler->check_hash($hash_of_file);
|
812 |
$datascan = empty($res)?true:(isset($res[0]->scan_data) ? unserialize($res[0]->scan_data):false);
|
|
|
813 |
$extlink = is_array($datascan)?$datascan['ext_link']==0:(!empty($datascan) ? $datascan: true);
|
|
|
814 |
$link_status = $extlink? 0 : 1;
|
815 |
if(is_array($datascan)){
|
816 |
$malware_status= $datascan['malware'];
|
831 |
}
|
832 |
}
|
833 |
|
|
|
834 |
if($flag_update == 0){
|
|
|
835 |
$link_status = $scan_config['ext_link_check'] && $link_status ? 1: 0;
|
836 |
$repo_status=0;
|
837 |
|
958 |
$scanresult['repo']=$issues;
|
959 |
$flag_update=1;
|
960 |
}
|
961 |
+
}
|
962 |
|
963 |
if($flag_update == 0){
|
964 |
$repo_status = $scan_config['check_repo'] && $repo_status ? 1 : 0;
|
|
|
965 |
|
966 |
$scan_data = array('malware'=>$malware_status, 'repo'=>$repo_status, 'ext_link'=>$link_status);
|
967 |
$infected_array=$mo2f_malware_db_handler->get_detail_report_with_id($reportid);
|
handler/malware_scanner/scanner_set_cron.php
CHANGED
@@ -31,6 +31,8 @@ class mo2f_scanner_parts
|
|
31 |
exit;
|
32 |
//abort
|
33 |
}
|
|
|
|
|
34 |
$scan_mode = isset( $_GET['scan_mode'] ) ? $_GET['scan_mode'] : false;
|
35 |
$scan_stage_complete = isset( $_GET['scan_stage_complete'] ) ? $_GET['scan_stage_complete'] : false;
|
36 |
$reportid = isset( $_GET['reportid'] ) ? $_GET['reportid'] : false;
|
@@ -51,7 +53,7 @@ class mo2f_scanner_parts
|
|
51 |
} elseif ( $scan_mode == 'Standard Scan' ) {
|
52 |
$scan_config = MoWpnsConstants::$standard_scan_configuration;
|
53 |
} else {
|
54 |
-
$scan_config = get_option( 'mo2f_custom_scan_config' );
|
55 |
}
|
56 |
|
57 |
$repo_status_code = get_option('mo2f_repo_status');
|
@@ -71,6 +73,7 @@ class mo2f_scanner_parts
|
|
71 |
$repo_file_path = $uploads_path . DIRECTORY_SEPARATOR . "miniorangescan";
|
72 |
$current_time = time();
|
73 |
$time_limit = ini_get( 'max_execution_time' );
|
|
|
74 |
switch ( $scan_stage_complete ) {
|
75 |
case 1:
|
76 |
$this->mo2f_scan_with_service( $scan_config, $reportid, $scanverification);
|
@@ -103,8 +106,7 @@ class mo2f_scanner_parts
|
|
103 |
$files_to_scan=$mo2f_malware_db_handler->get_files_in_parts();
|
104 |
$mo_wpns_scan_handler = new Mo_wpns_Scan_Handler_Cron();
|
105 |
|
106 |
-
if(empty($files_to_scan)){
|
107 |
-
error_log("scan with service ended");
|
108 |
|
109 |
$last_report = $mo2f_malware_db_handler->get_report_with_id($reportid);
|
110 |
$scan_malware_count=$last_report[0]->malware_count;
|
@@ -118,14 +120,11 @@ class mo2f_scanner_parts
|
|
118 |
$content_type = 'application/x-www-form-urlencoded';
|
119 |
$lastRequest = $mo_wpns_scan_handler->mo_wpns_malware_scan_request($postdata, $host, $content_type);
|
120 |
}
|
121 |
-
//start link check
|
122 |
$Mo_wpns_Scan_Handler_Cron = new Mo_wpns_Scan_Handler_Cron();
|
123 |
$response=$Mo_wpns_Scan_Handler_Cron->mo2f_wp_remote_get($scan_config['type_scan'], $reportid, $scanverification, 2);
|
124 |
|
125 |
}else{//sending next 100 files
|
126 |
error_log("sending next 100 files");
|
127 |
-
ini_set('memory_limit', '-1');
|
128 |
-
ini_set('max_execution_time', 0);
|
129 |
$current_time= time();
|
130 |
$time_limit= ini_get('max_execution_time');
|
131 |
$result=$mo_wpns_scan_handler->get_scan_result_parts($mo2f_malware_db_handler, $files_to_scan, $scan_config, $current_time, $time_limit);
|
@@ -199,7 +198,7 @@ class mo2f_scanner_parts
|
|
199 |
$mo2f_malware_db_handler = new MoWpnsDB();
|
200 |
$response=array();
|
201 |
$repo_status = get_option('mo2f_repo_status');
|
202 |
-
if($repo_status != 0){
|
203 |
if($repo_status == -99 || $repo_status == -100){
|
204 |
$last_report = $mo2f_malware_db_handler->get_report_with_id($reportid);
|
205 |
if(!empty($last_report)){
|
@@ -214,9 +213,9 @@ class mo2f_scanner_parts
|
|
214 |
exit;
|
215 |
}else{
|
216 |
$files_to_scan=$mo2f_malware_db_handler->get_files_for_repo();
|
217 |
-
if(empty($files_to_scan)){
|
218 |
$this->mo2f_end_scan();
|
219 |
-
}else{
|
220 |
$mo_wpns_scan_handler = new Mo_wpns_Scan_Handler_Cron();
|
221 |
$current_time= time();
|
222 |
$time_limit= ini_get('max_execution_time');
|
31 |
exit;
|
32 |
//abort
|
33 |
}
|
34 |
+
ini_set('memory_limit', '-1');
|
35 |
+
ini_set('max_execution_time', 0);
|
36 |
$scan_mode = isset( $_GET['scan_mode'] ) ? $_GET['scan_mode'] : false;
|
37 |
$scan_stage_complete = isset( $_GET['scan_stage_complete'] ) ? $_GET['scan_stage_complete'] : false;
|
38 |
$reportid = isset( $_GET['reportid'] ) ? $_GET['reportid'] : false;
|
53 |
} elseif ( $scan_mode == 'Standard Scan' ) {
|
54 |
$scan_config = MoWpnsConstants::$standard_scan_configuration;
|
55 |
} else {
|
56 |
+
$scan_config = get_option( 'mo2f_custom_scan_config' );
|
57 |
}
|
58 |
|
59 |
$repo_status_code = get_option('mo2f_repo_status');
|
73 |
$repo_file_path = $uploads_path . DIRECTORY_SEPARATOR . "miniorangescan";
|
74 |
$current_time = time();
|
75 |
$time_limit = ini_get( 'max_execution_time' );
|
76 |
+
usleep(10000);//10miliseconds
|
77 |
switch ( $scan_stage_complete ) {
|
78 |
case 1:
|
79 |
$this->mo2f_scan_with_service( $scan_config, $reportid, $scanverification);
|
106 |
$files_to_scan=$mo2f_malware_db_handler->get_files_in_parts();
|
107 |
$mo_wpns_scan_handler = new Mo_wpns_Scan_Handler_Cron();
|
108 |
|
109 |
+
if(empty($files_to_scan)){
|
|
|
110 |
|
111 |
$last_report = $mo2f_malware_db_handler->get_report_with_id($reportid);
|
112 |
$scan_malware_count=$last_report[0]->malware_count;
|
120 |
$content_type = 'application/x-www-form-urlencoded';
|
121 |
$lastRequest = $mo_wpns_scan_handler->mo_wpns_malware_scan_request($postdata, $host, $content_type);
|
122 |
}
|
|
|
123 |
$Mo_wpns_Scan_Handler_Cron = new Mo_wpns_Scan_Handler_Cron();
|
124 |
$response=$Mo_wpns_Scan_Handler_Cron->mo2f_wp_remote_get($scan_config['type_scan'], $reportid, $scanverification, 2);
|
125 |
|
126 |
}else{//sending next 100 files
|
127 |
error_log("sending next 100 files");
|
|
|
|
|
128 |
$current_time= time();
|
129 |
$time_limit= ini_get('max_execution_time');
|
130 |
$result=$mo_wpns_scan_handler->get_scan_result_parts($mo2f_malware_db_handler, $files_to_scan, $scan_config, $current_time, $time_limit);
|
198 |
$mo2f_malware_db_handler = new MoWpnsDB();
|
199 |
$response=array();
|
200 |
$repo_status = get_option('mo2f_repo_status');
|
201 |
+
if($repo_status != 0){
|
202 |
if($repo_status == -99 || $repo_status == -100){
|
203 |
$last_report = $mo2f_malware_db_handler->get_report_with_id($reportid);
|
204 |
if(!empty($last_report)){
|
213 |
exit;
|
214 |
}else{
|
215 |
$files_to_scan=$mo2f_malware_db_handler->get_files_for_repo();
|
216 |
+
if(empty($files_to_scan)){
|
217 |
$this->mo2f_end_scan();
|
218 |
+
}else{
|
219 |
$mo_wpns_scan_handler = new Mo_wpns_Scan_Handler_Cron();
|
220 |
$current_time= time();
|
221 |
$time_limit= ini_get('max_execution_time');
|
helper/constants.php
CHANGED
@@ -44,6 +44,10 @@
|
|
44 |
|
45 |
public static $repo_status_code = array(-96 => 'Maximum execution time exceeded while downloading files from repository. Please contact miniOrange.', -97 => '<i>Uploads Folder</i> permission denied', -98 => '2 Factor authentication plugin unable to reach wordpress repository files. Please contact miniOrange.', -99 => 'Unable to download Wordpress, plugins and themes from Repository', -100 => 'Unable to unzip the Wordpress, plugins and themes');
|
46 |
|
|
|
|
|
|
|
|
|
47 |
public static $quick_scan_configuration = array('plugin_scan' => 1 ,
|
48 |
'theme_scan' => 1,
|
49 |
'core_scan' => 0,
|
44 |
|
45 |
public static $repo_status_code = array(-96 => 'Maximum execution time exceeded while downloading files from repository. Please contact miniOrange.', -97 => '<i>Uploads Folder</i> permission denied', -98 => '2 Factor authentication plugin unable to reach wordpress repository files. Please contact miniOrange.', -99 => 'Unable to download Wordpress, plugins and themes from Repository', -100 => 'Unable to unzip the Wordpress, plugins and themes');
|
46 |
|
47 |
+
public static $host = 'http://scanner.api.xecurify.com/malwareservice/rest/file/upload';
|
48 |
+
|
49 |
+
public static $hostname = 'scanner.api.xecurify.com';
|
50 |
+
|
51 |
public static $quick_scan_configuration = array('plugin_scan' => 1 ,
|
52 |
'theme_scan' => 1,
|
53 |
'core_scan' => 0,
|
helper/messages.php
CHANGED
@@ -131,4 +131,4 @@
|
|
131 |
|
132 |
}
|
133 |
|
134 |
-
?>
|
131 |
|
132 |
}
|
133 |
|
134 |
+
?>
|
includes/css/style_settings.css
CHANGED
@@ -417,6 +417,20 @@ h2.mo_wpns_nav-tab-wrapper
|
|
417 |
text-align: left;
|
418 |
box-shadow: 0 0px 0px 0 rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.19);
|
419 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
420 |
.mo_wpns_sub_nav_tab {
|
421 |
/*overflow: hidden;*/
|
422 |
/*border: 1px solid #ccc;*/
|
@@ -1676,6 +1690,19 @@ a{
|
|
1676 |
outline: 0;
|
1677 |
|
1678 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1679 |
|
1680 |
.mo_wpns_modal-content {
|
1681 |
position: relative;
|
@@ -1833,6 +1860,20 @@ padding-right: 11px;
|
|
1833 |
-webkit-transition-duration: 0.4s; /* Safari */
|
1834 |
transition-duration: 0.4s;
|
1835 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1836 |
.mo_wpns_deep_scan_button {
|
1837 |
background-color: #20b2aa; /* Green */
|
1838 |
border: none;
|
417 |
text-align: left;
|
418 |
box-shadow: 0 0px 0px 0 rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.19);
|
419 |
}
|
420 |
+
.mo_wpns_setting_layout_scan
|
421 |
+
{
|
422 |
+
margin: 5px;
|
423 |
+
padding: 5px 20px 30px 20px;
|
424 |
+
background-color: #FFFFFF;
|
425 |
+
border: 2px solid #20b2aa;
|
426 |
+
float: left;
|
427 |
+
width: 80%;
|
428 |
+
margin-left: 10%;
|
429 |
+
|
430 |
+
overflow: hidden;
|
431 |
+
text-align: left;
|
432 |
+
box-shadow: 0 0px 0px 0 rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.19);
|
433 |
+
}
|
434 |
.mo_wpns_sub_nav_tab {
|
435 |
/*overflow: hidden;*/
|
436 |
/*border: 1px solid #ccc;*/
|
1690 |
outline: 0;
|
1691 |
|
1692 |
}
|
1693 |
+
.mo_scan_confirm_modal{
|
1694 |
+
display: none; /* Hidden by default */
|
1695 |
+
position: fixed; /* Stay in place */
|
1696 |
+
z-index: 1; /* Sit on top */
|
1697 |
+
padding-top: 200px; /* Location of the box */
|
1698 |
+
left: 0;
|
1699 |
+
top: 0;
|
1700 |
+
width: 100%; /* Full width */
|
1701 |
+
height: 100%; /* Full height */
|
1702 |
+
overflow: auto; /* Enable scroll if needed */
|
1703 |
+
background-color: rgb(0,0,0); /* Fallback color */
|
1704 |
+
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
1705 |
+
}
|
1706 |
|
1707 |
.mo_wpns_modal-content {
|
1708 |
position: relative;
|
1860 |
-webkit-transition-duration: 0.4s; /* Safari */
|
1861 |
transition-duration: 0.4s;
|
1862 |
}
|
1863 |
+
.mo_wpns_scan_modal_button {
|
1864 |
+
background-color: #20b2aa; /* Green */
|
1865 |
+
border: none;
|
1866 |
+
color: white;
|
1867 |
+
padding: 5px 80px;
|
1868 |
+
text-align: center;
|
1869 |
+
text-decoration: none;
|
1870 |
+
display: inline-block;
|
1871 |
+
font-size: 20px;
|
1872 |
+
margin: 4px 2px;
|
1873 |
+
cursor: pointer;
|
1874 |
+
-webkit-transition-duration: 0.4s; /* Safari */
|
1875 |
+
transition-duration: 0.4s;
|
1876 |
+
}
|
1877 |
.mo_wpns_deep_scan_button {
|
1878 |
background-color: #20b2aa; /* Green */
|
1879 |
border: none;
|
miniorange_2_factor_settings.php
CHANGED
@@ -3,13 +3,13 @@
|
|
3 |
* Plugin Name: miniOrange 2 Factor Authentication
|
4 |
* Plugin URI: https://miniorange.com
|
5 |
* Description: This plugin provides various two-factor authentication methods as an additional layer of security after the default wordpress login. We Support Google/Authy/LastPass Authenticator, QR Code, Push Notification, Soft Token and Security Questions(KBA) for 1 User in the free version of the plugin.
|
6 |
-
* Version: 5.3.
|
7 |
* Author: miniOrange
|
8 |
* Author URI: https://miniorange.com
|
9 |
* License: GPL2
|
10 |
*/
|
11 |
define( 'MO_HOST_NAME', 'https://login.xecurify.com' );
|
12 |
-
define( 'MO2F_VERSION', '5.3.
|
13 |
define( 'MO2F_TEST_MODE', false );
|
14 |
class Miniorange_twoFactor{
|
15 |
|
@@ -26,8 +26,11 @@
|
|
26 |
add_action('admin_notices',array( $this, 'mo_wpns_malware_notices' ) );
|
27 |
if(get_option('mo2f_disable_file_editing')) define('DISALLOW_FILE_EDIT', true);
|
28 |
$this->includes();
|
29 |
-
|
30 |
-
|
|
|
|
|
|
|
31 |
}
|
32 |
// As on plugins.php page not in the plugin
|
33 |
function feedback_request() {
|
@@ -128,11 +131,12 @@
|
|
128 |
add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Advanced Blocking' ,'administrator','mo_2fa_advancedblocking' , array( $this, 'mo_wpns'));
|
129 |
add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Notifications' ,'administrator','mo_2fa_notifications' , array( $this, 'mo_wpns'));
|
130 |
add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Reports' ,'administrator','mo_2fa_reports' , array( $this, 'mo_wpns'));
|
|
|
|
|
131 |
add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Troubleshooting' ,'administrator','mo_2fa_troubleshooting' , array( $this, 'mo_wpns'));
|
132 |
add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Account' ,'administrator','mo_2fa_account' , array( $this, 'mo_wpns'));
|
133 |
-
|
134 |
-
|
135 |
-
}
|
136 |
|
137 |
function checkSecurity(){
|
138 |
|
@@ -297,4 +301,4 @@
|
|
297 |
}
|
298 |
|
299 |
new Miniorange_twoFactor;
|
300 |
-
?>
|
3 |
* Plugin Name: miniOrange 2 Factor Authentication
|
4 |
* Plugin URI: https://miniorange.com
|
5 |
* Description: This plugin provides various two-factor authentication methods as an additional layer of security after the default wordpress login. We Support Google/Authy/LastPass Authenticator, QR Code, Push Notification, Soft Token and Security Questions(KBA) for 1 User in the free version of the plugin.
|
6 |
+
* Version: 5.3.22
|
7 |
* Author: miniOrange
|
8 |
* Author URI: https://miniorange.com
|
9 |
* License: GPL2
|
10 |
*/
|
11 |
define( 'MO_HOST_NAME', 'https://login.xecurify.com' );
|
12 |
+
define( 'MO2F_VERSION', '5.3.22' );
|
13 |
define( 'MO2F_TEST_MODE', false );
|
14 |
class Miniorange_twoFactor{
|
15 |
|
26 |
add_action('admin_notices',array( $this, 'mo_wpns_malware_notices' ) );
|
27 |
if(get_option('mo2f_disable_file_editing')) define('DISALLOW_FILE_EDIT', true);
|
28 |
$this->includes();
|
29 |
+
if(get_option("mo_wpns_2fa_with_network_security"))
|
30 |
+
{
|
31 |
+
$notify = new miniorange_security_notification;
|
32 |
+
add_action('wp_dashboard_setup', array($notify,'my_custom_dashboard_widgets'));
|
33 |
+
}
|
34 |
}
|
35 |
// As on plugins.php page not in the plugin
|
36 |
function feedback_request() {
|
131 |
add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Advanced Blocking' ,'administrator','mo_2fa_advancedblocking' , array( $this, 'mo_wpns'));
|
132 |
add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Notifications' ,'administrator','mo_2fa_notifications' , array( $this, 'mo_wpns'));
|
133 |
add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Reports' ,'administrator','mo_2fa_reports' , array( $this, 'mo_wpns'));
|
134 |
+
}
|
135 |
+
|
136 |
add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Troubleshooting' ,'administrator','mo_2fa_troubleshooting' , array( $this, 'mo_wpns'));
|
137 |
add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Account' ,'administrator','mo_2fa_account' , array( $this, 'mo_wpns'));
|
138 |
+
add_submenu_page( $menu_slug ,'miniOrange 2-Factor' ,'Upgrade' ,'administrator','mo_2fa_upgrade' , array( $this, 'mo_wpns'));
|
139 |
+
}
|
|
|
140 |
|
141 |
function checkSecurity(){
|
142 |
|
301 |
}
|
302 |
|
303 |
new Miniorange_twoFactor;
|
304 |
+
?>
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Donate link: https://miniorange.com/
|
|
6 |
Requires at least: 3.0.1
|
7 |
Tested up to: 5.3
|
8 |
Requires PHP: 5.3.0
|
9 |
-
Stable tag: 5.3.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -272,6 +272,9 @@ miniOrange authentication service has 15+ authentication methods.One time passco
|
|
272 |
|
273 |
== Changelog ==
|
274 |
|
|
|
|
|
|
|
275 |
= 5.3.21 =
|
276 |
* Google Authenticator-Two Factor Authentication (2FA) : Two Factor : Choice between Two factor and Security.
|
277 |
|
@@ -727,6 +730,9 @@ More descriptive setup messages and UI changes.
|
|
727 |
|
728 |
== Upgrade Notice ==
|
729 |
|
|
|
|
|
|
|
730 |
= 5.3.21 =
|
731 |
* Google Authenticator-Two Factor Authentication (2FA) : Two Factor : Choice between Two factor and Security.
|
732 |
|
@@ -1153,4 +1159,4 @@ More descriptive setup messages and UI changes.
|
|
1153 |
* Two Factor Authentication ( 2FA ): Added email ID verification during registration.
|
1154 |
|
1155 |
= 1.0.0 =
|
1156 |
-
First version of Two Factor Authentication ( 2FA ) plugin.
|
6 |
Requires at least: 3.0.1
|
7 |
Tested up to: 5.3
|
8 |
Requires PHP: 5.3.0
|
9 |
+
Stable tag: 5.3.22
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
272 |
|
273 |
== Changelog ==
|
274 |
|
275 |
+
= 5.3.22 =
|
276 |
+
* Google Authenticator-Two Factor Authentication (2FA) : Antivirus : Fixing Cache issues and adding nonce.
|
277 |
+
|
278 |
= 5.3.21 =
|
279 |
* Google Authenticator-Two Factor Authentication (2FA) : Two Factor : Choice between Two factor and Security.
|
280 |
|
730 |
|
731 |
== Upgrade Notice ==
|
732 |
|
733 |
+
= 5.3.22 =
|
734 |
+
* Google Authenticator-Two Factor Authentication (2FA) : Antivirus : Fixing Cache issues and adding nonce.
|
735 |
+
|
736 |
= 5.3.21 =
|
737 |
* Google Authenticator-Two Factor Authentication (2FA) : Two Factor : Choice between Two factor and Security.
|
738 |
|
1159 |
* Two Factor Authentication ( 2FA ): Added email ID verification during registration.
|
1160 |
|
1161 |
= 1.0.0 =
|
1162 |
+
First version of Two Factor Authentication ( 2FA ) plugin.
|
uninstall.php
CHANGED
@@ -359,6 +359,7 @@
|
|
359 |
delete_option( 'mo2f_download_done');
|
360 |
delete_option( 'downloaded_wordpress_repo_name');
|
361 |
delete_option( 'mo_wpns_scan_status');
|
|
|
362 |
delete_option( 'mo_wpns_scan_configuration');
|
363 |
|
364 |
?>
|
359 |
delete_option( 'mo2f_download_done');
|
360 |
delete_option( 'downloaded_wordpress_repo_name');
|
361 |
delete_option( 'mo_wpns_scan_status');
|
362 |
+
delete_option( 'mo_wpns_hide_malware_popup');
|
363 |
delete_option( 'mo_wpns_scan_configuration');
|
364 |
|
365 |
?>
|
views/account/register.php
CHANGED
@@ -54,4 +54,4 @@ echo'<!--Register with miniOrange-->
|
|
54 |
|
55 |
|
56 |
|
57 |
-
</script>
|
54 |
|
55 |
|
56 |
|
57 |
+
</script>
|
views/malware_scanner/scan_settings_view.php
CHANGED
@@ -1,17 +1,43 @@
|
|
1 |
<?php
|
2 |
-
$
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
$mo_wpns_skip_folders_array = array();
|
6 |
if(!empty($mo_wpns_skip_folders)){
|
7 |
$mo_wpns_skip_folders_array = explode(";",$mo_wpns_skip_folders);
|
8 |
}
|
9 |
-
$mo_wpns_white_url = get_option('mo_wpns_white_url');
|
10 |
$mo_wpns_white_urls_array = array();
|
11 |
if(!empty($mo_wpns_white_url)){
|
12 |
$mo_wpns_white_urls_array = explode(";",$mo_wpns_white_url);
|
13 |
}
|
14 |
-
$mo_wpns_custom_sign = get_option('mo_wpns_custom_sign');
|
15 |
$mo_wpns_custom_sign_array = array();
|
16 |
if(!empty($mo_wpns_custom_sign)){
|
17 |
$mo_wpns_custom_sign_array = explode(";",$mo_wpns_custom_sign);
|
@@ -26,9 +52,9 @@
|
|
26 |
<tr>
|
27 |
<td style="width:30%"><b>Select Folders to Scan : </b></td>
|
28 |
<td>
|
29 |
-
<input type="checkbox" name="mo_wpns_scan_plugins" id="mo_wpns_scan_plugins" value="1" <?php checked(
|
30 |
-
<input type="checkbox" name="mo_wpns_scan_themes" id="mo_wpns_scan_themes" value="1" <?php checked(
|
31 |
-
<input type="checkbox" name="mo_wpns_scan_wp_files" id="mo_wpns_scan_wp_files" value="1" <?php checked(
|
32 |
</td>
|
33 |
</tr>
|
34 |
<tr><td> </td><td></td></tr>
|
@@ -40,23 +66,23 @@
|
|
40 |
<tr>
|
41 |
<td style="width:30%"><b>Select Scan Level : </b></td>
|
42 |
<td>
|
43 |
-
<input type="checkbox" name="mo_wpns_check_vulnerable_code" id="mo_wpns_check_vulnerable_code" value="1" <?php checked(
|
44 |
Checks if your website has a code which is kept hidden or obfuscated to harm your website.<br><br>
|
45 |
-
<input type="checkbox" name="mo_wpns_check_sql_injection" id="mo_wpns_check_sql_injection" value="1" <?php checked(
|
46 |
Checks for injected SQL queries which can harm your database and injected shell scripts which can harm your server by executing any commands.<br><br>
|
47 |
-
<input type="checkbox" name="mo_wpns_check_external_link" id="mo_wpns_check_external_link" value="1" <?php checked(
|
48 |
Checks if anyone creating backlinks from your website. Backlinks to blacklisted sites can add your website to spam websites list.<br><br>
|
49 |
-
<input type="checkbox" name="mo_wpns_scan_files_with_repo" id="mo_wpns_scan_files_with_repo" value="1" <?php checked(
|
50 |
Check the Wordpress, plugin and theme files with its repository. It is helpful to determine if extra files added to or missing any of repository files.<br><br>
|
51 |
-
<input type="checkbox" name="mo_wpns_check_remote_file_inclusion" id="mo_wpns_check_remote_file_inclusion" value="1" <?php checked(
|
52 |
Inclusion of remote files can be harmful as code return in remote files will be executed on your server.<br><br>
|
53 |
-
<input type="checkbox" name="mo_wpns_adv_sign" id="mo_wpns_adv_sign" value="1" <?php checked(
|
54 |
Advanced Signatures help to scan your website better. miniOrange has it own premium signatures used to detect more advanced malwares in the files.<br><br>
|
55 |
-
<input type="checkbox" name="mo_wpns_check_domain" id="mo_wpns_check_domain" value="1" <?php checked(
|
56 |
Checks for links to Blacklisted Domains so that your site does not get a bad reputation.<br><br>
|
57 |
-
<input type="checkbox" name="mo_wpns_trojan_check" id="mo_wpns_trojan_check" value="1" <?php checked(
|
58 |
Checks for presence of Trojans in your system. It looks like a normal file but can help the attacker gain remote access to your system.<br><br>
|
59 |
-
<input type="checkbox" name="mo_wpns_backdoor_check" id="mo_wpns_backdoor_check" value="1" <?php checked(
|
60 |
Checks for presence of Backdoors in your code. A backdoor is a malware type that dodges the authentication process to gain remote access.
|
61 |
</td>
|
62 |
</tr>
|
1 |
<?php
|
2 |
+
$scan_configuration = json_decode(get_option('mo_wpns_scan_configuration'));
|
3 |
+
if(is_null($scan_configuration)){
|
4 |
+
$mo_wpns_scan_files_extensions = "";
|
5 |
+
$mo_wpns_skip_folders = "";
|
6 |
+
$mo_wpns_scan_plugins = 1;
|
7 |
+
$mo_wpns_scan_themes = 1;
|
8 |
+
$mo_wpns_core_scan = 0;
|
9 |
+
$mo_wpns_check_vulnerable = 1;
|
10 |
+
$mo_wpns_check_sql = 1;
|
11 |
+
$mo_wpns_check_extl = 0;
|
12 |
+
$mo_wpns_check_repo = 0;
|
13 |
+
}else{
|
14 |
+
$mo_wpns_scan_files_extensions = $scan_configuration->file_extension;
|
15 |
+
$mo_wpns_skip_folders = $scan_configuration->path_skip;
|
16 |
+
$mo_wpns_scan_plugins = $scan_configuration->plugin_scan;
|
17 |
+
$mo_wpns_scan_themes = $scan_configuration->theme_scan;
|
18 |
+
$mo_wpns_core_scan = $scan_configuration->core_scan;
|
19 |
+
$mo_wpns_check_vulnerable = $scan_configuration->check_vulnerable;
|
20 |
+
$mo_wpns_check_sql = $scan_configuration->check_sql;
|
21 |
+
$mo_wpns_check_extl = $scan_configuration->ext_link_check;
|
22 |
+
$mo_wpns_check_repo = $scan_configuration->check_repo;
|
23 |
+
}
|
24 |
+
//$mo_wpns_scan_files_extensions = get_option('mo_wpns_scan_files_extensions');
|
25 |
+
$mo_wpns_check_rfi = 0;
|
26 |
+
$mo_wpns_adv_sign = 0;
|
27 |
+
$mo_wpns_check_domain = 0;
|
28 |
+
$mo_wpns_check_trojan = 0;
|
29 |
+
$mo_wpns_check_backdoor = 0;
|
30 |
+
//$mo_wpns_skip_folders = get_option('mo_wpns_skip_folders');
|
31 |
$mo_wpns_skip_folders_array = array();
|
32 |
if(!empty($mo_wpns_skip_folders)){
|
33 |
$mo_wpns_skip_folders_array = explode(";",$mo_wpns_skip_folders);
|
34 |
}
|
35 |
+
$mo_wpns_white_url = "";//get_option('mo_wpns_white_url');
|
36 |
$mo_wpns_white_urls_array = array();
|
37 |
if(!empty($mo_wpns_white_url)){
|
38 |
$mo_wpns_white_urls_array = explode(";",$mo_wpns_white_url);
|
39 |
}
|
40 |
+
$mo_wpns_custom_sign = "";//get_option('mo_wpns_custom_sign');
|
41 |
$mo_wpns_custom_sign_array = array();
|
42 |
if(!empty($mo_wpns_custom_sign)){
|
43 |
$mo_wpns_custom_sign_array = explode(";",$mo_wpns_custom_sign);
|
52 |
<tr>
|
53 |
<td style="width:30%"><b>Select Folders to Scan : </b></td>
|
54 |
<td>
|
55 |
+
<input type="checkbox" name="mo_wpns_scan_plugins" id="mo_wpns_scan_plugins" value="1" <?php checked($mo_wpns_scan_plugins == 1);?>> WordPress Plugins folder<br>
|
56 |
+
<input type="checkbox" name="mo_wpns_scan_themes" id="mo_wpns_scan_themes" value="1" <?php checked($mo_wpns_scan_themes == 1);?>> WordPress Themes folder<br>
|
57 |
+
<input type="checkbox" name="mo_wpns_scan_wp_files" id="mo_wpns_scan_wp_files" value="1" <?php checked($mo_wpns_core_scan == 1);?>> WordPress files
|
58 |
</td>
|
59 |
</tr>
|
60 |
<tr><td> </td><td></td></tr>
|
66 |
<tr>
|
67 |
<td style="width:30%"><b>Select Scan Level : </b></td>
|
68 |
<td>
|
69 |
+
<input type="checkbox" name="mo_wpns_check_vulnerable_code" id="mo_wpns_check_vulnerable_code" value="1" <?php checked($mo_wpns_check_vulnerable == 1);?>> <b>Check PHP files vulnerable code <span class="mo_green">( Highly Recommeded )</span></b><br>
|
70 |
Checks if your website has a code which is kept hidden or obfuscated to harm your website.<br><br>
|
71 |
+
<input type="checkbox" name="mo_wpns_check_sql_injection" id="mo_wpns_check_sql_injection" value="1" <?php checked($mo_wpns_check_sql == 1);?>> <b>SQL Injection and injected shell script check <span class="mo_green">( Highly Recommeded )</span></b><br>
|
72 |
Checks for injected SQL queries which can harm your database and injected shell scripts which can harm your server by executing any commands.<br><br>
|
73 |
+
<input type="checkbox" name="mo_wpns_check_external_link" id="mo_wpns_check_external_link" value="1" <?php checked($mo_wpns_check_extl == 1);?>> <b>External Links Detection</b><br>
|
74 |
Checks if anyone creating backlinks from your website. Backlinks to blacklisted sites can add your website to spam websites list.<br><br>
|
75 |
+
<input type="checkbox" name="mo_wpns_scan_files_with_repo" id="mo_wpns_scan_files_with_repo" value="1" <?php checked($mo_wpns_check_repo == 1);?>> <b>Check Files with repository</b><br>
|
76 |
Check the Wordpress, plugin and theme files with its repository. It is helpful to determine if extra files added to or missing any of repository files.<br><br>
|
77 |
+
<input type="checkbox" name="mo_wpns_check_remote_file_inclusion" id="mo_wpns_check_remote_file_inclusion" value="1" <?php checked($mo_wpns_check_rfi == 1);?>> <b>Remote File Inclusion</b><b class="mo_red"> (Deep Scan) </b><br>
|
78 |
Inclusion of remote files can be harmful as code return in remote files will be executed on your server.<br><br>
|
79 |
+
<input type="checkbox" name="mo_wpns_adv_sign" id="mo_wpns_adv_sign" value="1" <?php checked($mo_wpns_adv_sign == 1);?>> <b>Use Advanced Signatures For Malware Detection.</b><b class="mo_red"> (Deep Scan) </b><br>
|
80 |
Advanced Signatures help to scan your website better. miniOrange has it own premium signatures used to detect more advanced malwares in the files.<br><br>
|
81 |
+
<input type="checkbox" name="mo_wpns_check_domain" id="mo_wpns_check_domain" value="1" <?php checked($mo_wpns_check_domain == 1);?>> <b>Check For Blacklisted Domains.</b><b class="mo_red"> (Deep Scan) </b><br>
|
82 |
Checks for links to Blacklisted Domains so that your site does not get a bad reputation.<br><br>
|
83 |
+
<input type="checkbox" name="mo_wpns_trojan_check" id="mo_wpns_trojan_check" value="1" <?php checked($mo_wpns_check_trojan == 1);?>> <b>Check For Trojans.</b><b class="mo_red"> (Deep Scan) </b><br>
|
84 |
Checks for presence of Trojans in your system. It looks like a normal file but can help the attacker gain remote access to your system.<br><br>
|
85 |
+
<input type="checkbox" name="mo_wpns_backdoor_check" id="mo_wpns_backdoor_check" value="1" <?php checked($mo_wpns_check_backdoor == 1);?>> <b>Check For Backdoors.</b><b class="mo_red"> (Deep Scan) </b><br>
|
86 |
Checks for presence of Backdoors in your code. A backdoor is a malware type that dodges the authentication process to gain remote access.
|
87 |
</td>
|
88 |
</tr>
|
views/malware_scanner/scan_summary_view.php
CHANGED
@@ -59,6 +59,21 @@ add_action('admin_footer','mo_wpns_start_scan');
|
|
59 |
<input type="button" name="mo_stop_button" id="mo_stop_button" class="mo_wpns_scan_button" value="Stop Scan" style="margin-left: 45%;">
|
60 |
</div >
|
61 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
<?php
|
64 |
function mo_wpns_start_scan(){
|
@@ -77,6 +92,9 @@ function mo_wpns_start_scan(){
|
|
77 |
<script>
|
78 |
var progress_bar,scan_progress,stop_scan_progress;
|
79 |
jQuery(document).ready(function(){
|
|
|
|
|
|
|
80 |
scan_progress= "<?php echo $status; ?>";
|
81 |
stop_scan_progress= "<?php echo get_option('mo_stop_scan'); ?>";
|
82 |
if(scan_progress=="IN PROGRESS"){
|
@@ -117,105 +135,200 @@ function mo_wpns_start_scan(){
|
|
117 |
jQuery('input[name="quick_scan_button"]').click(function(){
|
118 |
document.getElementById("quick_scan_button").value = "Scanning...";
|
119 |
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
|
|
|
|
|
|
|
|
127 |
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
jQuery("#mo_scan_message").addClass("notice notice-error is-dismissible");
|
148 |
-
jQuery("#mo_scan_message").append("A scan is currently ongoing.");
|
149 |
-
window.scrollTo({ top: 0, behavior: "smooth"});
|
150 |
-
document.getElementById("quick_scan_button").value = "Quick Scan";
|
151 |
-
document.getElementById('quick_scan_button').style.backgroundColor = '#b0d2cf';
|
152 |
-
}else{
|
153 |
-
if(response=="ERROR"){
|
154 |
jQuery("#mo_scan_message").addClass("notice notice-error is-dismissible");
|
155 |
-
jQuery("#mo_scan_message").append("
|
156 |
window.scrollTo({ top: 0, behavior: "smooth"});
|
|
|
|
|
157 |
}else{
|
158 |
-
|
159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
}
|
161 |
-
}
|
162 |
-
|
163 |
-
|
164 |
-
});
|
165 |
});
|
166 |
|
167 |
jQuery('input[name="standard_scan_button"]').click(function(){
|
168 |
document.getElementById("standard_scan_button").value = "Scanning...";
|
169 |
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
|
|
|
|
|
|
|
|
184 |
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
jQuery("#mo_scan_message").addClass("notice notice-error is-dismissible");
|
198 |
-
jQuery("#mo_scan_message").append("A scan is currently ongoing.");
|
199 |
-
window.scrollTo({ top: 0, behavior: "smooth"});
|
200 |
-
document.getElementById("standard_scan_button").value = "Standard Scan";
|
201 |
-
document.getElementById('standard_scan_button').style.backgroundColor = '#b0d2cf';
|
202 |
-
}else{
|
203 |
-
if(response=="ERROR"){
|
204 |
jQuery("#mo_scan_message").addClass("notice notice-error is-dismissible");
|
205 |
-
jQuery("#mo_scan_message").append("
|
206 |
window.scrollTo({ top: 0, behavior: "smooth"});
|
|
|
|
|
207 |
}else{
|
208 |
-
|
209 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
}
|
211 |
-
|
212 |
-
|
213 |
-
}
|
214 |
});
|
215 |
|
216 |
jQuery('input[name="custom_scan_button"]').click(function(){
|
217 |
document.getElementById("custom_scan_button").value = "Scanning...";
|
218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
document.getElementById("mo_progress").style.display="block";
|
220 |
document.getElementById("progress_message").innerHTML = "Scan progress...";
|
221 |
jQuery('input[name="mo_stop_button"]').val("Stop Scan");
|
@@ -223,20 +336,41 @@ function mo_wpns_start_scan(){
|
|
223 |
document.getElementById("mo_wpns_progress_bar").style.width= 0 + "%";
|
224 |
document.getElementById("mo_wpns_progress_bar").innerHTML= 0 + "%";
|
225 |
progress_bar= setInterval(status_progress, 10000);
|
226 |
-
|
227 |
jQuery('input[name="quick_scan_button"]').attr('disabled', true);
|
228 |
jQuery('input[name="custom_scan_button"]').attr('disabled', true);
|
229 |
jQuery('input[name="standard_scan_button"]').attr('disabled', true);
|
230 |
-
|
231 |
-
document.getElementById('
|
232 |
-
document.getElementById('standard_scan_button').
|
233 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
var data={
|
235 |
'action':'mo_wpns_malware_redirect',
|
236 |
'call_type':'malware_scan_initiate',
|
237 |
'scan':'scan_start',
|
238 |
-
'scantype':
|
239 |
-
'nonce':
|
|
|
240 |
};
|
241 |
jQuery.post(ajaxurl, data, function(response){
|
242 |
jQuery('#mo_scan_message').show();
|
@@ -246,17 +380,11 @@ function mo_wpns_start_scan(){
|
|
246 |
jQuery("#mo_scan_message").addClass("notice notice-error is-dismissible");
|
247 |
jQuery("#mo_scan_message").append("A scan is currently ongoing.");
|
248 |
window.scrollTo({ top: 0, behavior: "smooth"});
|
249 |
-
document.getElementById("custom_scan_button").value = "Custom Scan";
|
250 |
-
document.getElementById('custom_scan_button').style.backgroundColor = '#b0d2cf';
|
251 |
}else{
|
252 |
if(response=="ERROR"){
|
253 |
jQuery("#mo_scan_message").addClass("notice notice-error is-dismissible");
|
254 |
jQuery("#mo_scan_message").append("Nonce did not match.");
|
255 |
window.scrollTo({ top: 0, behavior: "smooth"});
|
256 |
-
}else if(response=="RECONFIGURE"){
|
257 |
-
jQuery("#mo_scan_message").addClass("notice notice-error is-dismissible");
|
258 |
-
jQuery("#mo_scan_message").append("Please save your custom configuration again");
|
259 |
-
window.scrollTo({ top: 0, behavior: "smooth"});
|
260 |
}else{
|
261 |
jQuery("#mo_scan_message").addClass("notice notice-success is-dismissible");
|
262 |
jQuery("#mo_scan_message").append("Malware Scan has started. You can see the results in scan reports tab after it is completed.");
|
@@ -264,36 +392,29 @@ function mo_wpns_start_scan(){
|
|
264 |
}
|
265 |
|
266 |
});
|
267 |
-
});
|
268 |
|
269 |
-
|
270 |
-
var button_value = document.getElementById("mo_stop_button").value;
|
271 |
-
if(button_value == 'Stop Scan'){
|
272 |
-
jQuery('input[name="mo_stop_button"]').attr('disabled', true);
|
273 |
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
};
|
280 |
-
jQuery("#mo_scan_message").removeClass("notice-error notice-success");
|
281 |
-
jQuery.post(ajaxurl, data, function(response){
|
282 |
-
jQuery('#mo_scan_message').show();
|
283 |
-
jQuery('#mo_scan_message').empty();
|
284 |
-
jQuery("#mo_scan_message").addClass("notice notice-success is-dismissible");
|
285 |
-
jQuery("#mo_scan_message").append("Scan is stopping...");
|
286 |
-
window.scrollTo({ top: 0, behavior: "smooth" });
|
287 |
-
});
|
288 |
-
}else{
|
289 |
-
document.getElementById("mo_progress").style.display="none";
|
290 |
-
jQuery('#mo_scan_message').hide();
|
291 |
-
jQuery('#mo_scan_message').empty();
|
292 |
-
jQuery("#mo_scan_message").removeClass("notice-error notice-success");
|
293 |
-
}
|
294 |
});
|
|
|
|
|
295 |
});
|
296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
function status_progress(){
|
298 |
var data={
|
299 |
'action':'mo_wpns_malware_redirect',
|
@@ -369,13 +490,12 @@ function mo_wpns_start_scan(){
|
|
369 |
var width= (response['scanned']/response['total'])*100;
|
370 |
width = Math.round(width);
|
371 |
}
|
372 |
-
|
373 |
bar.style.width= width + "%";
|
374 |
if(response['repo_scan']==1 && width==85){
|
375 |
document.getElementById("progress_message").innerHTML= "Downloading plugins/themes/wordpress files from repository...";
|
376 |
bar.innerHTML = width + "%";
|
377 |
}else{
|
378 |
-
document.getElementById("progress_message").innerHTML= "Scan progress...";
|
379 |
bar.innerHTML = width + "%";
|
380 |
}
|
381 |
}
|
@@ -400,8 +520,8 @@ function show_summary(){
|
|
400 |
$total_malicious=$mo_wpns_db_handler->count_malicious_files();
|
401 |
$last_scan=$mo_wpns_db_handler->count_files_last_scan($send_id);
|
402 |
// $malicious_last_scan=$mo_wpns_db_handler->count_malicious_last_scan($send_id);
|
403 |
-
$malicious_last_scan = get_option('mo_wpns_infected_files');
|
404 |
-
$warning_last_scan = get_option('mo_wpns_warning_files');
|
405 |
if($total_scan > 999){
|
406 |
$total_scan=($total_scan/1000);
|
407 |
$total_scan= round($total_scan,1)."k";
|
59 |
<input type="button" name="mo_stop_button" id="mo_stop_button" class="mo_wpns_scan_button" value="Stop Scan" style="margin-left: 45%;">
|
60 |
</div >
|
61 |
</div>
|
62 |
+
<div id='mo2f_scan_confirm_modal' class="mo_scan_confirm_modal" style="display: none;">
|
63 |
+
<div class="mo_wpns_divided_layout" style="margin-left: 13%;">
|
64 |
+
<div class="mo_wpns_setting_layout_scan">
|
65 |
+
|
66 |
+
<h1 style="font-size: large; text-align: center;">The first scan would take time. It is advised to do it when your website is not expecting much traffic. Click continue to proceed with the scan.</h1><br>
|
67 |
+
<hr>
|
68 |
+
<div>
|
69 |
+
<input id="mo2f_scan_continue" type="button" name="mo2f_scan_continue" class="mo_wpns_scan_modal_button" value="Continue" style="margin-left: 225px; margin-right: 100px;">
|
70 |
+
<input id="mo2f_scan_cancel" type="button" name="mo2f_scan_cancel" class="mo_wpns_scan_modal_button" value="Cancel">
|
71 |
+
</div>
|
72 |
+
<br>
|
73 |
+
<input type="checkbox" name="popup_hide" id="popup_hide" value="1"><b style="font-size: medium;">Do not ask for confirmation again(Checking this would start the scan without confirming henceforth).</b></input>
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
</div>
|
77 |
|
78 |
<?php
|
79 |
function mo_wpns_start_scan(){
|
92 |
<script>
|
93 |
var progress_bar,scan_progress,stop_scan_progress;
|
94 |
jQuery(document).ready(function(){
|
95 |
+
var pop_up = "<?php echo get_option('mo_wpns_hide_malware_popup'); ?>";
|
96 |
+
var newURL = location.href.split("&")[0];
|
97 |
+
window.history.pushState('object', document.title, newURL);
|
98 |
scan_progress= "<?php echo $status; ?>";
|
99 |
stop_scan_progress= "<?php echo get_option('mo_stop_scan'); ?>";
|
100 |
if(scan_progress=="IN PROGRESS"){
|
135 |
jQuery('input[name="quick_scan_button"]').click(function(){
|
136 |
document.getElementById("quick_scan_button").value = "Scanning...";
|
137 |
|
138 |
+
|
139 |
+
if(pop_up == false){
|
140 |
+
document.getElementById("mo2f_scan_confirm_modal").style.display="block";
|
141 |
+
}else{
|
142 |
+
document.getElementById("mo_progress").style.display="block";
|
143 |
+
document.getElementById("progress_message").innerHTML = "Scan progress...";
|
144 |
+
jQuery('input[name="mo_stop_button"]').val("Stop Scan");
|
145 |
+
document.getElementById('mo_stop_button_div').style.display="block";
|
146 |
+
document.getElementById("mo_wpns_progress_bar").style.width= 0 + "%";
|
147 |
+
document.getElementById("mo_wpns_progress_bar").innerHTML= 0 + "%";
|
148 |
+
progress_bar= setInterval(status_progress, 10000);
|
149 |
|
150 |
+
jQuery('input[name="quick_scan_button"]').attr('disabled', true);
|
151 |
+
jQuery('input[name="custom_scan_button"]').attr('disabled', true);
|
152 |
+
jQuery('input[name="standard_scan_button"]').attr('disabled', true);
|
153 |
+
document.getElementById('quick_scan_button').style.backgroundColor = '#20b2aa';
|
154 |
+
document.getElementById('custom_scan_button').style.backgroundColor = '#b0d2cf';
|
155 |
+
document.getElementById('standard_scan_button').style.backgroundColor = '#b0d2cf';
|
156 |
|
157 |
+
var data={
|
158 |
+
'action':'mo_wpns_malware_redirect',
|
159 |
+
'call_type':'malware_scan_initiate',
|
160 |
+
'scan':'scan_start',
|
161 |
+
'scantype':'quick_scan',
|
162 |
+
'nonce':jQuery('#wpns_quick_scan_nonce').val()
|
163 |
+
};
|
164 |
+
jQuery.post(ajaxurl, data, function(response){
|
165 |
+
jQuery('#mo_scan_message').show();
|
166 |
+
jQuery('#mo_scan_message').empty();
|
167 |
+
jQuery("#mo_scan_message").removeClass("notice-error notice-success");
|
168 |
+
if(response == "scanning_already"){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
jQuery("#mo_scan_message").addClass("notice notice-error is-dismissible");
|
170 |
+
jQuery("#mo_scan_message").append("A scan is currently ongoing.");
|
171 |
window.scrollTo({ top: 0, behavior: "smooth"});
|
172 |
+
document.getElementById("quick_scan_button").value = "Quick Scan";
|
173 |
+
document.getElementById('quick_scan_button').style.backgroundColor = '#b0d2cf';
|
174 |
}else{
|
175 |
+
if(response=="ERROR"){
|
176 |
+
jQuery("#mo_scan_message").addClass("notice notice-error is-dismissible");
|
177 |
+
jQuery("#mo_scan_message").append("Nonce did not match.");
|
178 |
+
window.scrollTo({ top: 0, behavior: "smooth"});
|
179 |
+
}else{
|
180 |
+
jQuery("#mo_scan_message").addClass("notice notice-success is-dismissible");
|
181 |
+
jQuery("#mo_scan_message").append("Malware Scan has started. You can see the results in scan reports tab after it is completed.");
|
182 |
+
}
|
183 |
}
|
184 |
+
});
|
185 |
+
}
|
|
|
|
|
186 |
});
|
187 |
|
188 |
jQuery('input[name="standard_scan_button"]').click(function(){
|
189 |
document.getElementById("standard_scan_button").value = "Scanning...";
|
190 |
|
191 |
+
//var pop_up = "<?php echo get_option('mo_wpns_hide_malware_popup'); ?>";
|
192 |
+
if(pop_up == false){
|
193 |
+
document.getElementById("mo2f_scan_confirm_modal").style.display="block";
|
194 |
+
}else{
|
195 |
+
document.getElementById("mo_progress").style.display="block";
|
196 |
+
document.getElementById("progress_message").innerHTML = "Scan progress...";
|
197 |
+
jQuery('input[name="mo_stop_button"]').val("Stop Scan");
|
198 |
+
document.getElementById('mo_stop_button_div').style.display="block";
|
199 |
+
document.getElementById("mo_wpns_progress_bar").style.width= 0 + "%";
|
200 |
+
document.getElementById("mo_wpns_progress_bar").innerHTML= 0 + "%";
|
201 |
+
progress_bar= setInterval(status_progress, 10000);
|
202 |
+
|
203 |
+
jQuery('input[name="quick_scan_button"]').attr('disabled', true);
|
204 |
+
jQuery('input[name="custom_scan_button"]').attr('disabled', true);
|
205 |
+
jQuery('input[name="standard_scan_button"]').attr('disabled', true);
|
206 |
+
document.getElementById('quick_scan_button').style.backgroundColor = '#b0d2cf';
|
207 |
+
document.getElementById('custom_scan_button').style.backgroundColor = '#b0d2cf';
|
208 |
+
document.getElementById('standard_scan_button').style.backgroundColor = '#20b2aa';
|
209 |
|
210 |
+
var data={
|
211 |
+
'action':'mo_wpns_malware_redirect',
|
212 |
+
'call_type':'malware_scan_initiate',
|
213 |
+
'scan':'scan_start',
|
214 |
+
'scantype':'standard_scan',
|
215 |
+
'nonce':jQuery('#wpns_standard_scan_nonce').val()
|
216 |
+
};
|
217 |
+
jQuery.post(ajaxurl, data, function(response){
|
218 |
+
jQuery('#mo_scan_message').show();
|
219 |
+
jQuery('#mo_scan_message').empty();
|
220 |
+
jQuery("#mo_scan_message").removeClass("notice-error notice-success");
|
221 |
+
if(response == "scanning_already"){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
jQuery("#mo_scan_message").addClass("notice notice-error is-dismissible");
|
223 |
+
jQuery("#mo_scan_message").append("A scan is currently ongoing.");
|
224 |
window.scrollTo({ top: 0, behavior: "smooth"});
|
225 |
+
document.getElementById("standard_scan_button").value = "Standard Scan";
|
226 |
+
document.getElementById('standard_scan_button').style.backgroundColor = '#b0d2cf';
|
227 |
}else{
|
228 |
+
if(response=="ERROR"){
|
229 |
+
jQuery("#mo_scan_message").addClass("notice notice-error is-dismissible");
|
230 |
+
jQuery("#mo_scan_message").append("Nonce did not match.");
|
231 |
+
window.scrollTo({ top: 0, behavior: "smooth"});
|
232 |
+
}else{
|
233 |
+
jQuery("#mo_scan_message").addClass("notice notice-success is-dismissible");
|
234 |
+
jQuery("#mo_scan_message").append("Malware scan has started. You can see the results in scan reports tab after it is completed.");
|
235 |
+
}
|
236 |
}
|
237 |
+
|
238 |
+
});
|
239 |
+
}
|
240 |
});
|
241 |
|
242 |
jQuery('input[name="custom_scan_button"]').click(function(){
|
243 |
document.getElementById("custom_scan_button").value = "Scanning...";
|
244 |
|
245 |
+
//var pop_up = "<?php echo get_option('mo_wpns_hide_malware_popup'); ?>";
|
246 |
+
if(pop_up == false){
|
247 |
+
document.getElementById("mo2f_scan_confirm_modal").style.display="block";
|
248 |
+
}else{
|
249 |
+
document.getElementById("mo_progress").style.display="block";
|
250 |
+
document.getElementById("progress_message").innerHTML = "Scan progress...";
|
251 |
+
jQuery('input[name="mo_stop_button"]').val("Stop Scan");
|
252 |
+
document.getElementById('mo_stop_button_div').style.display="block";
|
253 |
+
document.getElementById("mo_wpns_progress_bar").style.width= 0 + "%";
|
254 |
+
document.getElementById("mo_wpns_progress_bar").innerHTML= 0 + "%";
|
255 |
+
progress_bar= setInterval(status_progress, 10000);
|
256 |
+
|
257 |
+
jQuery('input[name="quick_scan_button"]').attr('disabled', true);
|
258 |
+
jQuery('input[name="custom_scan_button"]').attr('disabled', true);
|
259 |
+
jQuery('input[name="standard_scan_button"]').attr('disabled', true);
|
260 |
+
document.getElementById('quick_scan_button').style.backgroundColor = '#b0d2cf';
|
261 |
+
document.getElementById('custom_scan_button').style.backgroundColor = '#20b2aa';
|
262 |
+
document.getElementById('standard_scan_button').style.backgroundColor = '#b0d2cf';
|
263 |
+
|
264 |
+
var data={
|
265 |
+
'action':'mo_wpns_malware_redirect',
|
266 |
+
'call_type':'malware_scan_initiate',
|
267 |
+
'scan':'scan_start',
|
268 |
+
'scantype':'custom_scan',
|
269 |
+
'nonce':jQuery('#wpns_custom_scan_nonce').val()
|
270 |
+
};
|
271 |
+
jQuery.post(ajaxurl, data, function(response){
|
272 |
+
jQuery('#mo_scan_message').show();
|
273 |
+
jQuery('#mo_scan_message').empty();
|
274 |
+
jQuery("#mo_scan_message").removeClass("notice-error notice-success");
|
275 |
+
if(response == "scanning_already"){
|
276 |
+
jQuery("#mo_scan_message").addClass("notice notice-error is-dismissible");
|
277 |
+
jQuery("#mo_scan_message").append("A scan is currently ongoing.");
|
278 |
+
window.scrollTo({ top: 0, behavior: "smooth"});
|
279 |
+
document.getElementById("custom_scan_button").value = "Custom Scan";
|
280 |
+
document.getElementById('custom_scan_button').style.backgroundColor = '#b0d2cf';
|
281 |
+
}else{
|
282 |
+
if(response=="ERROR"){
|
283 |
+
jQuery("#mo_scan_message").addClass("notice notice-error is-dismissible");
|
284 |
+
jQuery("#mo_scan_message").append("Nonce did not match.");
|
285 |
+
window.scrollTo({ top: 0, behavior: "smooth"});
|
286 |
+
}else if(response=="RECONFIGURE"){
|
287 |
+
jQuery("#mo_scan_message").addClass("notice notice-error is-dismissible");
|
288 |
+
jQuery("#mo_scan_message").append("Please save your custom configuration again");
|
289 |
+
window.scrollTo({ top: 0, behavior: "smooth"});
|
290 |
+
}else{
|
291 |
+
jQuery("#mo_scan_message").addClass("notice notice-success is-dismissible");
|
292 |
+
jQuery("#mo_scan_message").append("Malware Scan has started. You can see the results in scan reports tab after it is completed.");
|
293 |
+
}
|
294 |
+
}
|
295 |
+
|
296 |
+
});
|
297 |
+
}
|
298 |
+
});
|
299 |
+
|
300 |
+
jQuery('input[name="mo_stop_button"]').click(function(){
|
301 |
+
var button_value = document.getElementById("mo_stop_button").value;
|
302 |
+
if(button_value == 'Stop Scan'){
|
303 |
+
jQuery('input[name="mo_stop_button"]').attr('disabled', true);
|
304 |
+
|
305 |
+
jQuery('input[name="mo_stop_button"]').val("Stop Scanning...");
|
306 |
+
document.getElementById('mo_stop_button').style.backgroundColor = '#b0d2cf';
|
307 |
+
var data={
|
308 |
+
'action':'mo_wpns_malware_redirect',
|
309 |
+
'call_type':'malware_scan_terminate'
|
310 |
+
};
|
311 |
+
jQuery("#mo_scan_message").removeClass("notice-error notice-success");
|
312 |
+
jQuery.post(ajaxurl, data, function(response){
|
313 |
+
jQuery('#mo_scan_message').show();
|
314 |
+
jQuery('#mo_scan_message').empty();
|
315 |
+
jQuery("#mo_scan_message").addClass("notice notice-success is-dismissible");
|
316 |
+
jQuery("#mo_scan_message").append("Scan is stopping...");
|
317 |
+
window.scrollTo({ top: 0, behavior: "smooth" });
|
318 |
+
});
|
319 |
+
}else{
|
320 |
+
document.getElementById("mo_progress").style.display="none";
|
321 |
+
jQuery('#mo_scan_message').hide();
|
322 |
+
jQuery('#mo_scan_message').empty();
|
323 |
+
jQuery("#mo_scan_message").removeClass("notice-error notice-success");
|
324 |
+
}
|
325 |
+
});
|
326 |
+
|
327 |
+
jQuery('input[name="mo2f_scan_continue"]').click(function(){
|
328 |
+
var scan_type, nonce;
|
329 |
+
|
330 |
+
document.getElementById("mo2f_scan_confirm_modal").style.display="none";
|
331 |
+
|
332 |
document.getElementById("mo_progress").style.display="block";
|
333 |
document.getElementById("progress_message").innerHTML = "Scan progress...";
|
334 |
jQuery('input[name="mo_stop_button"]').val("Stop Scan");
|
336 |
document.getElementById("mo_wpns_progress_bar").style.width= 0 + "%";
|
337 |
document.getElementById("mo_wpns_progress_bar").innerHTML= 0 + "%";
|
338 |
progress_bar= setInterval(status_progress, 10000);
|
339 |
+
|
340 |
jQuery('input[name="quick_scan_button"]').attr('disabled', true);
|
341 |
jQuery('input[name="custom_scan_button"]').attr('disabled', true);
|
342 |
jQuery('input[name="standard_scan_button"]').attr('disabled', true);
|
343 |
+
|
344 |
+
var quick_scan_value = document.getElementById('quick_scan_button').value;
|
345 |
+
var std_scan_value = document.getElementById('standard_scan_button').value;
|
346 |
+
var custom_scan_value = document.getElementById('custom_scan_button').value;
|
347 |
+
if(quick_scan_value == 'Scanning...'){
|
348 |
+
document.getElementById('quick_scan_button').style.backgroundColor = '#20b2aa';
|
349 |
+
document.getElementById('custom_scan_button').style.backgroundColor = '#b0d2cf';
|
350 |
+
document.getElementById('standard_scan_button').style.backgroundColor = '#b0d2cf';
|
351 |
+
scan_type = 'quick_scan';
|
352 |
+
nonce = jQuery('#wpns_quick_scan_nonce').val();
|
353 |
+
}else if(std_scan_value == 'Scanning...'){
|
354 |
+
document.getElementById('quick_scan_button').style.backgroundColor = '#b0d2cf';
|
355 |
+
document.getElementById('custom_scan_button').style.backgroundColor = '#b0d2cf';
|
356 |
+
document.getElementById('standard_scan_button').style.backgroundColor = '#20b2aa';
|
357 |
+
scan_type = 'standard_scan';
|
358 |
+
nonce = jQuery('#wpns_standard_scan_nonce').val();
|
359 |
+
}else{
|
360 |
+
document.getElementById('quick_scan_button').style.backgroundColor = '#b0d2cf';
|
361 |
+
document.getElementById('custom_scan_button').style.backgroundColor = '#20b2aa';
|
362 |
+
document.getElementById('standard_scan_button').style.backgroundColor = '#b0d2cf';
|
363 |
+
scan_type = 'custom_scan';
|
364 |
+
nonce = jQuery('#wpns_custom_scan_nonce').val();
|
365 |
+
}
|
366 |
+
var popup_state = jQuery("input[name= popup_hide]:checked").val();
|
367 |
var data={
|
368 |
'action':'mo_wpns_malware_redirect',
|
369 |
'call_type':'malware_scan_initiate',
|
370 |
'scan':'scan_start',
|
371 |
+
'scantype':scan_type,
|
372 |
+
'nonce':nonce,
|
373 |
+
'hide_popup':popup_state
|
374 |
};
|
375 |
jQuery.post(ajaxurl, data, function(response){
|
376 |
jQuery('#mo_scan_message').show();
|
380 |
jQuery("#mo_scan_message").addClass("notice notice-error is-dismissible");
|
381 |
jQuery("#mo_scan_message").append("A scan is currently ongoing.");
|
382 |
window.scrollTo({ top: 0, behavior: "smooth"});
|
|
|
|
|
383 |
}else{
|
384 |
if(response=="ERROR"){
|
385 |
jQuery("#mo_scan_message").addClass("notice notice-error is-dismissible");
|
386 |
jQuery("#mo_scan_message").append("Nonce did not match.");
|
387 |
window.scrollTo({ top: 0, behavior: "smooth"});
|
|
|
|
|
|
|
|
|
388 |
}else{
|
389 |
jQuery("#mo_scan_message").addClass("notice notice-success is-dismissible");
|
390 |
jQuery("#mo_scan_message").append("Malware Scan has started. You can see the results in scan reports tab after it is completed.");
|
392 |
}
|
393 |
|
394 |
});
|
|
|
395 |
|
396 |
+
});
|
|
|
|
|
|
|
397 |
|
398 |
+
jQuery('input[name="mo2f_scan_cancel"]').click(function(){
|
399 |
+
document.getElementById("quick_scan_button").value = "Quick Scan";
|
400 |
+
document.getElementById("standard_scan_button").value = "Standard Scan";
|
401 |
+
document.getElementById("custom_scan_button").value = "Custom Scan";
|
402 |
+
document.getElementById("mo2f_scan_confirm_modal").style.display="none";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
403 |
});
|
404 |
+
|
405 |
+
|
406 |
});
|
407 |
|
408 |
+
var scan_modal_confirm = document.getElementById("mo2f_scan_confirm_modal");
|
409 |
+
window.onclick = function(event) {
|
410 |
+
if (event.target == scan_modal_confirm) {
|
411 |
+
scan_modal_confirm.style.display = "none";
|
412 |
+
document.getElementById("quick_scan_button").value = "Quick Scan";
|
413 |
+
document.getElementById("standard_scan_button").value = "Standard Scan";
|
414 |
+
document.getElementById("custom_scan_button").value = "Custom Scan";
|
415 |
+
}
|
416 |
+
}
|
417 |
+
|
418 |
function status_progress(){
|
419 |
var data={
|
420 |
'action':'mo_wpns_malware_redirect',
|
490 |
var width= (response['scanned']/response['total'])*100;
|
491 |
width = Math.round(width);
|
492 |
}
|
|
|
493 |
bar.style.width= width + "%";
|
494 |
if(response['repo_scan']==1 && width==85){
|
495 |
document.getElementById("progress_message").innerHTML= "Downloading plugins/themes/wordpress files from repository...";
|
496 |
bar.innerHTML = width + "%";
|
497 |
}else{
|
498 |
+
document.getElementById("progress_message").innerHTML= "Scan in progress. It may take some time...";
|
499 |
bar.innerHTML = width + "%";
|
500 |
}
|
501 |
}
|
520 |
$total_malicious=$mo_wpns_db_handler->count_malicious_files();
|
521 |
$last_scan=$mo_wpns_db_handler->count_files_last_scan($send_id);
|
522 |
// $malicious_last_scan=$mo_wpns_db_handler->count_malicious_last_scan($send_id);
|
523 |
+
$malicious_last_scan = get_option('mo_wpns_infected_files',0);
|
524 |
+
$warning_last_scan = get_option('mo_wpns_warning_files',0);
|
525 |
if($total_scan > 999){
|
526 |
$total_scan=($total_scan/1000);
|
527 |
$total_scan= round($total_scan,1)."k";
|
views/navbar.php
CHANGED
@@ -14,10 +14,12 @@ $security_features_nonce = wp_create_nonce('mo_2fa_security_features_nonce');
|
|
14 |
miniOrange 2-Factor
|
15 |
<a class="add-new-h2" href="'.$profile_url.'">Account</a>
|
16 |
<a class="add-new-h2" href="'.$help_url.'">Troubleshooting</a>
|
17 |
-
<a class="license-button add-new-h2" href="'.$license_url.'">Upgrade</a>
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
|
|
21 |
|
22 |
<form id="mo_wpns_2fa_with_network_security" method="post" action="" style="margin-top: -2%; width: 25%; text-align: right; padding-left: 75%;">
|
23 |
<input type="hidden" name="mo_security_features_nonce" value="'.$security_features_nonce.'"/>
|
@@ -73,4 +75,4 @@ $security_features_nonce = wp_create_nonce('mo_2fa_security_features_nonce');
|
|
73 |
}
|
74 |
echo '<a class="nav-tab '.($active_tab == 'mo_2fa_upgrade' ? 'nav-tab-active' : '').'" href="'.$upgrade_url .'">Upgrade</a>';
|
75 |
?>
|
76 |
-
</div>
|
14 |
miniOrange 2-Factor
|
15 |
<a class="add-new-h2" href="'.$profile_url.'">Account</a>
|
16 |
<a class="add-new-h2" href="'.$help_url.'">Troubleshooting</a>
|
17 |
+
<a class="license-button add-new-h2" href="'.$license_url.'">Upgrade</a>';
|
18 |
+
if(get_option("mo_wpns_2fa_with_network_security"))
|
19 |
+
{
|
20 |
+
echo '<a class="license-button add-new-h2" id="restart-tour" href="#" style="background-color: lightblue;">Restart tour</a> ';
|
21 |
+
}
|
22 |
+
echo' <span style="text-align:right;">
|
23 |
|
24 |
<form id="mo_wpns_2fa_with_network_security" method="post" action="" style="margin-top: -2%; width: 25%; text-align: right; padding-left: 75%;">
|
25 |
<input type="hidden" name="mo_security_features_nonce" value="'.$security_features_nonce.'"/>
|
75 |
}
|
76 |
echo '<a class="nav-tab '.($active_tab == 'mo_2fa_upgrade' ? 'nav-tab-active' : '').'" href="'.$upgrade_url .'">Upgrade</a>';
|
77 |
?>
|
78 |
+
</div>
|