diff --git a/css/spbc-admin.min.css b/css/spbc-admin.min.css index 622d8157a..0b9178eb3 100644 --- a/css/spbc-admin.min.css +++ b/css/spbc-admin.min.css @@ -1 +1 @@ -.spbc_translate_links{color:rgba(150,150,20,1)}.spbc_faq_links{color:rgba(20,150,20,1)}.spbc_support_links{color:rgba(150,20,20,1)}.spbc_setting_links{color:rgba(20,20,150,1)}.spbc_translate_links:hover{color:rgba(210,210,20,1)!important}.spbc_faq_links:hover{color:rgba(20,250,20,1)!important}.spbc_support_links:hover{color:rgba(250,20,20,1)!important}.spbc_setting_links:hover{color:rgba(20,20,250,1)!important}.spbc_hide{display:none}.spbc_hide_table_cell_desc{display:none;max-width:90%}.--hide{display:none}#wp-admin-bar-cleantalk_admin_bar__parent_node span,.-display--inline-block{display:inline-block}.ctlk---red,.spbcRed{color:red}.spbcGreen{color:green}.spbcTextCenter{text-align:center}.spbc-overflow--visible{overflow:visible!important}._animate--rotate{-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear}#wp-admin-bar-cleantalk_admin_bar__parent_node{margin-right:5px}#wp-admin-bar-cleantalk_admin_bar__parent_node .spbc-icon-attention-alt{background:#d63638;color:#fff;border-radius:50%;font-size:12px}#wp-admin-bar-cleantalk_admin_bar__parent_node img.cleantalk_admin_bar__spbc_icon{width:14px;height:17px;margin-top:7px}#wp-admin-bar-cleantalk_admin_bar__parent_node img.cleantalk_admin_bar__apbct_icon{width:18px;height:18px;margin-top:7px}#wp-admin-bar-cleantalk_admin_bar__parent_node div.cleantalk_admin_bar__sum_counter{color:#999;display:inline;padding:2px 5px!important}#wp-admin-bar-spbc_admin_bar__settings_link a,.cleantalk-admin_bar__parent a{display:inline-block!important;padding:0 10px!important}.cleantalk_admin_bar__blocked div{cursor:not-allowed!important}.cleantalk_admin_bar__blocked div a{color:#777!important}b.spbc-admin_bar--online_admins{font-size:11px!important}.cleantalk_admin_bar__title{vertical-align:top;margin-left:5px!important}.clntlk-hint{position:relative!important}.clntlk-hint:hover{color:#fff}.clntlk-hint:hover::after{content:attr(hint);position:absolute;left:100%;top:50%;background:rgba(235,235,235,.85);padding:0 5px;border:1px solid #333;color:#000;font-style:normal;width:max-content;z-index:99999999999999999}.cleantalk_admin_bar__separator{height:0!important}span.green_dot,span.red_dot{height:8px!important;width:8px!important;border-radius:50%!important;margin-left:5px!important}.cleantalk_admin_bar__counter a{padding:0 10px!important}.cleantalk-admin_bar--list_wrapper .ab-sub-wrapper ul:last-child{margin-bottom:5px!important}span.red_dot{background-color:#d00!important;display:inline-block!important}span.green_dot{background-color:#0d0!important;display:inline-block!important}#spbct-upload-checker-details{overflow-y:scroll;height:150px;border:1px solid #CCC}#spbct-upload-checker-details li:nth-child(2n+1){background:#CCC}.plugins .update+.spbc-vulnerable-notice td{box-shadow:none!important}.themes .spbc-vulnerable-notice{top:auto;bottom:45px}.spbct-safe-extension-badge{cursor:pointer}.spbct-safe-extension-badge-description-placeholder{position:relative}.spbct-safe-extension-badge-description{display:none;position:absolute;min-width:400px;background:rgba(0,0,0,.5);color:#fff;text-align:center;top:2px;right:0;padding:5px;animation:fadeInFromNone .3s ease-in-out;z-index:9999}@keyframes fadeInFromNone{0%{display:none;opacity:0}1%{display:block;opacity:0}100%{display:block;opacity:1}}.spbct-safe-extension-badge-description:before{content:'';position:absolute;top:-10px;right:6px;border:5px solid transparent;border-bottom:5px solid rgba(0,0,0,.5)}.spbct-safe-extension-badge-description:hover,.spbct-safe-extension-badge:hover+.spbct-safe-extension-badge-description-placeholder>.spbct-safe-extension-badge-description{display:block}.spbct-safe-extension-badge-description>a{color:#fff;text-decoration:underline}#menu-settings{position:relative}.spbc_ring-container{position:absolute;z-index:99;top:-10px;right:10px}.spbc_circle{width:4px;height:4px;background-color:rgba(255,2,2,.65);border-radius:50%;position:absolute;top:15px;left:15px}.spbc_ringring{border:3px solid rgba(255,2,2,.65);-webkit-border-radius:30px;height:15px;width:15px;position:absolute;left:7px;top:7px;-webkit-animation:spbc_pulsate 1s ease-out;-webkit-animation-iteration-count:infinite;opacity:0}@-webkit-keyframes spbc_pulsate{0%{-webkit-transform:scale(.1,.1);opacity:0}50%{opacity:1}100%{-webkit-transform:scale(1.2,1.2);opacity:0}}.spbc-vulnerability-anchor{display:block;height:40vh;margin-top:-40vh;visibility:hidden} \ No newline at end of file +.spbc_translate_links{color:rgba(150,150,20,1)}.spbc_faq_links{color:rgba(20,150,20,1)}.spbc_support_links{color:rgba(150,20,20,1)}.spbc_setting_links{color:rgba(20,20,150,1)}.spbc_translate_links:hover{color:rgba(210,210,20,1)!important}.spbc_faq_links:hover{color:rgba(20,250,20,1)!important}.spbc_support_links:hover{color:rgba(250,20,20,1)!important}.spbc_setting_links:hover{color:rgba(20,20,250,1)!important}.spbc_hide{display:none}.spbc_hide_table_cell_desc{display:none;max-width:90%}.--hide{display:none}#wp-admin-bar-cleantalk_admin_bar__parent_node span,.-display--inline-block{display:inline-block}.ctlk---red,.spbcRed{color:red}.spbcGreen{color:green}.spbcTextCenter{text-align:center}.spbc-overflow--visible{overflow:visible!important}._animate--rotate{-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear}#wp-admin-bar-cleantalk_admin_bar__parent_node{margin-right:5px}#wp-admin-bar-cleantalk_admin_bar__parent_node .spbc-icon-attention-alt{background:#d63638;color:#fff;border-radius:50%;font-size:12px}#wp-admin-bar-cleantalk_admin_bar__parent_node img.cleantalk_admin_bar__spbc_icon{width:14px;height:17px;margin-top:7px}#wp-admin-bar-cleantalk_admin_bar__parent_node img.cleantalk_admin_bar__apbct_icon{width:18px;height:18px;margin-top:7px}#wp-admin-bar-cleantalk_admin_bar__parent_node div.cleantalk_admin_bar__sum_counter{color:#999;display:inline;padding:2px 5px!important}#wp-admin-bar-spbc_admin_bar__settings_link a,.cleantalk-admin_bar__parent a{display:inline-block!important;padding:0 10px!important}.cleantalk_admin_bar__blocked div{cursor:not-allowed!important}.cleantalk_admin_bar__blocked div a{color:#777!important}b.spbc-admin_bar--online_admins{font-size:11px!important}.cleantalk_admin_bar__title{vertical-align:top;margin-left:5px!important}.clntlk-hint{position:relative!important}.clntlk-hint:hover{color:#fff}.clntlk-hint:hover::after{content:attr(hint);position:absolute;left:100%;top:50%;background:rgba(235,235,235,.85);padding:0 5px;border:1px solid #333;color:#000;font-style:normal;width:max-content;z-index:99999999999999999}.cleantalk_admin_bar__separator{height:0!important}span.green_dot,span.red_dot{height:8px!important;width:8px!important;border-radius:50%!important;display:inline-block!important;margin-left:5px!important}.cleantalk_admin_bar__counter a{padding:0 10px!important}.cleantalk-admin_bar--list_wrapper .ab-sub-wrapper ul:last-child{margin-bottom:5px!important}span.red_dot{background-color:#d00!important}span.green_dot{background-color:#0d0!important}#spbct-upload-checker-details{overflow-y:scroll;height:150px;border:1px solid #CCC}#spbct-upload-checker-details li:nth-child(2n+1){background:#CCC}.plugins .update+.spbc-vulnerable-notice td{box-shadow:none!important}.themes .spbc-vulnerable-notice{top:auto;bottom:45px}.spbct-safe-extension-badge{cursor:pointer}.spbct-safe-extension-badge-description-placeholder{position:relative}.spbct-safe-extension-badge-description{display:none;position:absolute;min-width:400px;background:rgba(0,0,0,.5);color:#fff;text-align:center;top:2px;right:0;padding:5px;animation:fadeInFromNone .3s ease-in-out;z-index:9999}@keyframes fadeInFromNone{0%{display:none;opacity:0}1%{display:block;opacity:0}100%{display:block;opacity:1}}.spbct-safe-extension-badge-description:before{content:'';position:absolute;top:-10px;right:6px;border:5px solid transparent;border-bottom:5px solid rgba(0,0,0,.5)}.spbct-safe-extension-badge-description:hover,.spbct-safe-extension-badge:hover+.spbct-safe-extension-badge-description-placeholder>.spbct-safe-extension-badge-description{display:block}.spbct-safe-extension-badge-description>a{color:#fff;text-decoration:underline}#menu-settings{position:relative}.spbc_ring-container{position:absolute;z-index:99;top:-10px;right:10px}.spbc_circle{width:4px;height:4px;background-color:rgba(255,2,2,.65);border-radius:50%;position:absolute;top:15px;left:15px}.spbc_ringring{border:3px solid rgba(255,2,2,.65);-webkit-border-radius:30px;height:15px;width:15px;position:absolute;left:7px;top:7px;-webkit-animation:spbc_pulsate 1s ease-out;-webkit-animation-iteration-count:infinite;opacity:0}@-webkit-keyframes spbc_pulsate{0%{-webkit-transform:scale(.1,.1);opacity:0}50%{opacity:1}100%{-webkit-transform:scale(1.2,1.2);opacity:0}}.spbc-vulnerability-anchor{display:block;height:40vh;margin-top:-40vh;visibility:hidden}#spbc_scanner_copy_log_to_clipboard{position:relative}#spbc_scanner_copy_log_to_clipboard_hint{display:none;width:200px;position:absolute;top:20px;left:0} \ No newline at end of file diff --git a/css/src/spbc-admin.css b/css/src/spbc-admin.css index 201681654..8405c2eb2 100644 --- a/css/src/spbc-admin.css +++ b/css/src/spbc-admin.css @@ -246,4 +246,14 @@ span.green_dot{ visibility: hidden; } +#spbc_scanner_copy_log_to_clipboard{ + position: relative; +} +#spbc_scanner_copy_log_to_clipboard_hint{ + display: none; + width: 200px; + position: absolute; + top: 20px; + left: 0; +} diff --git a/inc/spbc-admin.php b/inc/spbc-admin.php index 9e0ad342d..57668a57a 100644 --- a/inc/spbc-admin.php +++ b/inc/spbc-admin.php @@ -616,6 +616,9 @@ function ($key) { ), 'last_scan_was_just_now' => __('The last scan of this website happened just now. Files scanned: %s.', 'security-malware-firewall'), 'last_scan_was_just_now_links' => __('The last scan of this website happened just now. Files scanned: %s. Outbound links found: %s.', 'security-malware-firewall'), + 'copy_log_to_clipboard_hint' => __('Copied!', 'security-malware-firewall'), + 'copy_log_to_clipboard_hint_failed' => __('Failed to copy!', 'security-malware-firewall'), + 'copy_log_to_clipboard_hint_unsupported' => __('Clipboard API not supported in local environment', 'security-malware-firewall'), )); wp_localize_script('spbc-settings-js', 'spbcDescriptions', array( diff --git a/inc/spbc-scanner.php b/inc/spbc-scanner.php index f8a637fa4..c0720c0e5 100644 --- a/inc/spbc-scanner.php +++ b/inc/spbc-scanner.php @@ -2107,26 +2107,24 @@ function spbc_scanner_save_to_pdf($direct_call = false) $pdf->AliasNbPages(); $pdf->AddPage(); - $pdf->drawScanCommonStatsTable(); $pdf->Ln(); - $pdf->drawScanResultsOfScanType('heuristic_results'); $pdf->drawScanResultsOfScanType('signature_results'); $pdf->Ln(); - $pdf->drawFilesListByType('cure_log'); $pdf->AddPage(); - $pdf->drawFilesListByType('critical_files'); $pdf->AddPage(); - $pdf->drawFilesListByType('suspicious_files'); + $pdf->AddPage(); + $pdf->drawScanLogs(); + $pdf->Output(); } diff --git a/inc/spbc-settings.php b/inc/spbc-settings.php index 99db4a800..19a458967 100644 --- a/inc/spbc-settings.php +++ b/inc/spbc-settings.php @@ -3317,6 +3317,16 @@ function spbc_field_scanner() . ''; } + // Copy to clipboard + if (! empty($spbc->data['scanner']['last_scan'])) { + echo '' + . ''; + } + echo '
'; echo spbc_bulk_actions_description(); diff --git a/js/spbc-settings_tab--scanner.min.js b/js/spbc-settings_tab--scanner.min.js index f3955e464..1387c67db 100644 --- a/js/spbc-settings_tab--scanner.min.js +++ b/js/spbc-settings_tab--scanner.min.js @@ -1,2 +1,2 @@ -function spbcPopupTipShow(e){var o=e.attr("spbc_tip_title")||null,t=e.attr("spbc_tip_text")||null;function n(e){void 0!==e&&0!=jQuery(e.target).parent(".spbc_popup_tip--wrapper").length&&!jQuery(e.target).hasClass("spbc_popup_tip--icon---cancel")||(jQuery(".spbc_popup_tip--wrapper").hide(),jQuery(document).off("click",n))}n(),e.after("
");var s=jQuery(".spbc_popup_tip--wrapper");s.empty().append("
").css({top:e.position().top-2,left:e.position().left+25}),s.append("").append("

"+o+"

").append("

"+t+"

"),jQuery(document).on("click",n),e.parents("tr").on("mouseout",n)}function spbcScannerButtonFileViewEvent(e){var e=jQuery(e),o={action:"spbc_scanner_file_view",file_id:e.parents(".row-actions").attr("uid")},e={spinner:e.parent().siblings(".tbl-preloader--tiny"),callback:spbcScannerButtonViewCallback,errorOutput:function(e){spbcModal.open().putError(e)}};spbcSendAJAXRequest(o,e)}function spbcScannerAnalysisLogDeleteFromLog(e){let t=[];var o=jQuery(e);let n;if(jQuery(e).hasClass("tbl-row_action"))t.push(o.parents(".row-actions").attr("uid")),n=o.parent().siblings(".tbl-preloader--tiny");else{e=o.closest("#spbc_tbl__scanner_analysis_log").find(".cb-select:checked");if(0===e.length)return void alert("Please, select elements.");e.each(function(e,o){o=jQuery(o).val();t.push(o)}),n=o.children(".tbl-preloader--small")}e={action:"spbc_scanner_analysis_log_delete_from_log",file_ids:t},o={spinner:n,callback:function(){window.location.reload()}};spbcSendAJAXRequest(e,o)}function spbcScannerButtonPageViewEvent(e){var e=jQuery(e),o={action:"spbc_scanner_page_view",page_url:e.parents(".row-actions").attr("uid")},e={spinner:e.parent().siblings(".tbl-preloader--tiny"),callback:spbcScannerButtonViewCallback,errorOutput:function(e){spbcModal.open().putError(e)}},t=jQuery("#wpwrap"),n=jQuery("#spbc_dialog"),s=(n.dialog({modal:!0,title:"Loading..",position:{my:"center top",at:"center top+100px",of:window},width:t.width()/100*90,show:{effect:"blind",duration:500},draggable:!1,resizable:!1,closeText:"X",classes:{"ui-dialog":"spbc---top"},open:function(e,o){e.target.style.overflow="auto",jQuery("#spbc_dialog").height(document.documentElement.clientHeight/100*25)},beforeClose:function(e,o){document.body.style.overflow="auto",jQuery("#spbc_dialog").empty()}}),n.append('Wait for downloading'),jQuery("#spbc_file_view_preloader")),t=4e-4*t.width();s.height(128*t),s.width(128*t),s.css({left:n.width()/2-128*t/2}),s.css({top:n.height()/2-128*t/2}),spbcSendAJAXRequest(o,e)}function spbcScannerButtonViewCallback(e){var o,t=jQuery("#spbc_dialog"),n=(t.empty(),jQuery("#spbc_file_view_preloader").css({display:"none"}),'
%s');for(o in n+='

%s


',e.file)t.append(n.printf(o,e.file[o]));var s=19*Object.keys(e.file).length<76?76:19*Object.keys(e.file).length,a=document.documentElement.clientHeight/100*75;let c=s%s


','
'),i=(r=r+'%s'+'

%s


',[]),l=[];for(s in o.weak_spots=JSON.parse(o.weak_spots),o.weak_spots)i[s]=Object.keys(o.weak_spots[s]);for(key in n=Object.keys(i).sort())l[n[key]]=i[n[key]];for(a in l){var p,u="spbc-dialog-row-header-"+a.toLowerCase(),d='',_=(d+=a+" weakspots:",jQuery("#spbc_dialog")),d=(_.append(c.printf("",d)),_.append(c.printf("...","...")),_.find("#"+u));for(p in d.parent().parent().css("text-align","center"),d.parent().parent().css("border","1px dotted"),d.parent().parent().css("background","darkgrey"),i[a]){p=[...new Set(p)].sort();var b,f=+i[a][p];for(let e=f-2;e<=2+f;e++)void 0!==o.file[e]&&(b=f===e?'
%s

%s


':c,_.append(b.printf(e,o.file[e])));_.append(c.printf("...","..."))}}jQuery("#spbc_dialog div").last().remove();var r=19*jQuery("#spbc_dialog div").length<76?76:19*jQuery("#spbc_dialog div").length,g=document.documentElement.clientHeight/100*75;let w=r{};if(1==s.success){console.log(s);var a,c='
%s

%s


';let n=[];for(a in s.weak_spots=JSON.parse(s.weak_spots),s.weak_spots)n=n.concat(Object.keys(s.weak_spots[a]));n=[...new Set(n)].sort();var r,i=new Map(Object.entries(s.weak_spots.CRITICAL));for(r in n)if(0!=r||!i.get(n[r]).toLowerCase().includes("doctype")){var l=+n[r];for(let t=l-2;t<=2+l;t++)if(void 0!==s.file[t]){var p=l===t;let e,o;e=p?'
%s

%s


':c,o=p&&!s.file[t].includes("iframe")?e.printf(t,i.get(n[r])):e.printf(t,s.file[t]),jQuery("#spbc_dialog").append(o)}jQuery("#spbc_dialog").append(c.printf("","")),jQuery("#spbc_dialog div").last().remove()}}else jQuery("#spbc_dialog").append('
%s
'.printf(s.content)),t=()=>{document.location.reload()};var n=19*jQuery("#spbc_dialog div").length<76?76:19*jQuery("#spbc_dialog div").length,u=document.documentElement.clientHeight/100*75;let d=n%s

%s'+'

%s


',(n=n+'

%s

%s'+'

%s


').printf('Modified',"Line",'Original'));jQuery("#spbc_dialog").append(a);for(let o=1;void 0!==t.file[o]||void 0!==t.file_original[o];o++)if(void 0===t.file[o]&&(t.file[o]=""),void 0===t.file_original[o]&&(t.file_original[o]=""),-1!=t.difference.indexOf(o)){for(let e=o-2;e<=o+2;e++)void 0!==t.file[e]&&void 0!==t.file_original[o]&&jQuery("#spbc_dialog").append((o===e?s:n).printf(t.file[e]||"",e,t.file_original[e]||""));jQuery("#spbc_dialog").append(n.printf("","",""))}var a=19*jQuery("#spbc_dialog div").length+19,c=document.documentElement.clientHeight/100*75;let r=a{document.getElementById("spbc_scanner__last_scan_info").innerText=e.data}})}function spbcScannerButtonCureFileAjaxHandler(e){e={action:"spbc_file_cure_ajax_action",file_fast_hash:jQuery(e).parents(".row-actions").attr("uid"),security:spbcSettings.ajax_nonce};jQuery.ajax({type:"POST",async:!0,url:spbcSettings.ajaxurl,data:e,success:function(e){e.success?(spbcModal.open().put(e.data),document.addEventListener("spbcModalClosed",function(e){document.location.reload()})):spbcModal.open().putError(e.data)}})}function spbcScannerButtonRestoreFromBackupAjaxHandler(e){e={action:"spbc_restore_file_from_backup_ajax_action",file_fast_hash:jQuery(e).parents(".row-actions").attr("uid"),security:spbcSettings.ajax_nonce};jQuery.ajax({type:"POST",async:!0,url:spbcSettings.ajaxurl,data:e,success:function(e){e.success?(spbcModal.open().put(e.data),document.addEventListener("spbcModalClosed",function(e){document.location.reload()})):spbcModal.open().putError(e.data)}})}function spbcScannerButtonClearScanResults(){confirm("Do you confirm to clear the scan results?")&&(console.log("CLEAR"),spbcSendAJAXRequest({action:"spbc_scanner_clear"},{type:"GET",successCallback:function(){document.location=document.location},complete:null,errorOutput:null,context:this,timeout:4e4,success:function(){document.location.reload()}}))}jQuery(document).ready(function(){spbcTblBulkActionsListen(),spbcTblRowActionsListen(),spbcTblPaginationListen(),spbcTblSortListen(),spbcStartShowHide(),jQuery("#spbc_scaner_progress_bar").progressbar({value:0,create:function(e,o){e.target.style.position="relative",e.target.style.marginBottom="12px"},change:function(e,o){jQuery(".spbc_progressbar_counter span").text(jQuery(e.target).progressbar("option","value")+" %")}}),jQuery("#spbc_scan_accordion").accordion({header:"h3",heightStyle:"content",collapsible:!0,active:!1,activate:function(e,o){0===o.oldPanel.length&&0===o.oldHeader.length&&jQuery("#spbc_scan_accordion").accordion("option","classes.ui-accordion-content","ui-corner-bottom spbc-overflow--visible")},beforeActivate:function(e,o){1===o.oldPanel.length&&1===o.oldHeader.length&&jQuery("#spbc_scan_accordion").accordion("option","classes.ui-accordion-content","ui-corner-bottom")}}),window.spbcScanner=new SpbcMalwareScanner({settings:spbcScaner.settings,states:spbcScaner.states,button:jQuery("#spbc_perform_scan"),spinner:jQuery("#spbc_perform_scan").next(),callback:null,progress_overall:jQuery("#spbc_scaner_progress_overall"),progressbar:jQuery("#spbc_scaner_progress_bar"),progressbar_text:jQuery(".spbc_progressbar_counter span"),wrapper:document.getElementsByClassName("spbc_unchecked_file_list"),warnings:{long_scan:jQuery(".spbc_hint_warning__long_scan"),outdated:jQuery(".spbc_hint_warning__outdated")}}),jQuery(document).on("click",".spbc_popup_tip--icon---show",function(){spbcPopupTipShow(jQuery(this))}),jQuery("#spbc_perform_scan").on("click",function(){jQuery("#spbcscan-results-log-module").remove(),spbcScanner.actionControl(),jQuery(".spbc_log-wrapper .panel-body").length||jQuery(".spbc_log-wrapper").append('
'),jQuery(".spbc_log-wrapper").resizable({handles:"n, s",containment:"document"})}),jQuery("#spbcscan-results-log-module").resizable({handles:"n, s",containment:"document"}),jQuery("#spbc_scanner_clear").on("click",function(){confirm("Do you confirm to clear the scan results?")&&(console.log("CLEAR"),spbcSendAJAXRequest({action:"spbc_scanner_clear"},{type:"GET",successCallback:function(){document.location=document.location},complete:null,errorOutput:null,context:this,timeout:4e4,success:function(){document.location.reload()}}))}),jQuery("#spbc_scanner_save_to_pdf").on("click",function(){jQuery.ajax({url:spbcSettings.ajaxurl,type:"POST",data:{action:"spbc_scanner_save_to_pdf",security:spbcSettings.ajax_nonce,no_cache:Math.random()},xhrFields:{responseType:"blob"},success:function(n){jQuery.ajax({url:spbcSettings.ajaxurl,type:"POST",data:{action:"spbc_scanner_get_pdf_file_name",security:spbcSettings.ajax_nonce,no_cache:Math.random()},xhrFields:{responseType:"text"},success:function(e){var o=new Blob([n]),t=document.createElement("a");t.href=window.URL.createObjectURL(o),t.download=e.data,t.click()}})}})})}); +function spbcPopupTipShow(e){var o=e.attr("spbc_tip_title")||null,n=e.attr("spbc_tip_text")||null;function t(e){void 0!==e&&0!=jQuery(e.target).parent(".spbc_popup_tip--wrapper").length&&!jQuery(e.target).hasClass("spbc_popup_tip--icon---cancel")||(jQuery(".spbc_popup_tip--wrapper").hide(),jQuery(document).off("click",t))}t(),e.after("
");var c=jQuery(".spbc_popup_tip--wrapper");c.empty().append("
").css({top:e.position().top-2,left:e.position().left+25}),c.append("").append("

"+o+"

").append("

"+n+"

"),jQuery(document).on("click",t),e.parents("tr").on("mouseout",t)}function spbcScannerButtonFileViewEvent(e){var e=jQuery(e),o={action:"spbc_scanner_file_view",file_id:e.parents(".row-actions").attr("uid")},e={spinner:e.parent().siblings(".tbl-preloader--tiny"),callback:spbcScannerButtonViewCallback,errorOutput:function(e){spbcModal.open().putError(e)}};spbcSendAJAXRequest(o,e)}function spbcScannerAnalysisLogDeleteFromLog(e){let n=[];var o=jQuery(e);let t;if(jQuery(e).hasClass("tbl-row_action"))n.push(o.parents(".row-actions").attr("uid")),t=o.parent().siblings(".tbl-preloader--tiny");else{e=o.closest("#spbc_tbl__scanner_analysis_log").find(".cb-select:checked");if(0===e.length)return void alert("Please, select elements.");e.each(function(e,o){o=jQuery(o).val();n.push(o)}),t=o.children(".tbl-preloader--small")}e={action:"spbc_scanner_analysis_log_delete_from_log",file_ids:n},o={spinner:t,callback:function(){window.location.reload()}};spbcSendAJAXRequest(e,o)}function spbcScannerButtonPageViewEvent(e){var e=jQuery(e),o={action:"spbc_scanner_page_view",page_url:e.parents(".row-actions").attr("uid")},e={spinner:e.parent().siblings(".tbl-preloader--tiny"),callback:spbcScannerButtonViewCallback,errorOutput:function(e){spbcModal.open().putError(e)}},n=jQuery("#wpwrap"),t=jQuery("#spbc_dialog"),c=(t.dialog({modal:!0,title:"Loading..",position:{my:"center top",at:"center top+100px",of:window},width:n.width()/100*90,show:{effect:"blind",duration:500},draggable:!1,resizable:!1,closeText:"X",classes:{"ui-dialog":"spbc---top"},open:function(e,o){e.target.style.overflow="auto",jQuery("#spbc_dialog").height(document.documentElement.clientHeight/100*25)},beforeClose:function(e,o){document.body.style.overflow="auto",jQuery("#spbc_dialog").empty()}}),t.append('Wait for downloading'),jQuery("#spbc_file_view_preloader")),n=4e-4*n.width();c.height(128*n),c.width(128*n),c.css({left:t.width()/2-128*n/2}),c.css({top:t.height()/2-128*n/2}),spbcSendAJAXRequest(o,e)}function spbcScannerButtonViewCallback(e){var o,n=jQuery("#spbc_dialog"),t=(n.empty(),jQuery("#spbc_file_view_preloader").css({display:"none"}),'
%s');for(o in t+='

%s


',e.file)n.append(t.printf(o,e.file[o]));var c=19*Object.keys(e.file).length<76?76:19*Object.keys(e.file).length,a=document.documentElement.clientHeight/100*75;let s=c%s


','
'),i=(r=r+'%s'+'

%s


',[]),l=[];for(c in o.weak_spots=JSON.parse(o.weak_spots),o.weak_spots)i[c]=Object.keys(o.weak_spots[c]);for(key in t=Object.keys(i).sort())l[t[key]]=i[t[key]];for(a in l){var p,_="spbc-dialog-row-header-"+a.toLowerCase(),u='',d=(u+=a+" weakspots:",jQuery("#spbc_dialog")),u=(d.append(s.printf("",u)),d.append(s.printf("...","...")),d.find("#"+_));for(p in u.parent().parent().css("text-align","center"),u.parent().parent().css("border","1px dotted"),u.parent().parent().css("background","darkgrey"),i[a]){p=[...new Set(p)].sort();var b,f=+i[a][p];for(let e=f-2;e<=2+f;e++)void 0!==o.file[e]&&(b=f===e?'
%s

%s


':s,d.append(b.printf(e,o.file[e])));d.append(s.printf("...","..."))}}jQuery("#spbc_dialog div").last().remove();var r=19*jQuery("#spbc_dialog div").length<76?76:19*jQuery("#spbc_dialog div").length,g=document.documentElement.clientHeight/100*75;let y=r{};if(1==c.success){console.log(c);var a,s='
%s

%s


';let t=[];for(a in c.weak_spots=JSON.parse(c.weak_spots),c.weak_spots)t=t.concat(Object.keys(c.weak_spots[a]));t=[...new Set(t)].sort();var r,i=new Map(Object.entries(c.weak_spots.CRITICAL));for(r in t)if(0!=r||!i.get(t[r]).toLowerCase().includes("doctype")){var l=+t[r];for(let n=l-2;n<=2+l;n++)if(void 0!==c.file[n]){var p=l===n;let e,o;e=p?'
%s

%s


':s,o=p&&!c.file[n].includes("iframe")?e.printf(n,i.get(t[r])):e.printf(n,c.file[n]),jQuery("#spbc_dialog").append(o)}jQuery("#spbc_dialog").append(s.printf("","")),jQuery("#spbc_dialog div").last().remove()}}else jQuery("#spbc_dialog").append('
%s
'.printf(c.content)),n=()=>{document.location.reload()};var t=19*jQuery("#spbc_dialog div").length<76?76:19*jQuery("#spbc_dialog div").length,_=document.documentElement.clientHeight/100*75;let u=t<_?"no_scroll":"scroll";jQuery("#spbc_dialog").dialog({modal:!0,title:c.file_path,position:{my:"center top",at:"center top+100px",of:window},width:jQuery("#wpwrap").width()/100*90,show:{effect:"blind",duration:500},draggable:!0,resizable:!1,closeText:"X",classes:{"ui-dialog":"spbc---top"},open:function(e,o){e.target.style.overflow=u,jQuery("#spbc_dialog").height("auto"),jQuery(".ui-widget-overlay").on("click",function(){jQuery("#spbc_dialog").dialog("close")})},beforeClose:function(e,o){document.body.style.overflow="auto",jQuery("#spbc_dialog").empty()},close:n})}function spbcScannerButtonFileCompareEvent(e){var e=jQuery(e),o={action:"spbc_scanner_file_compare",file_id:e.parents(".row-actions").attr("uid")},e={spinner:e.parent().siblings(".tbl-preloader--tiny"),callback:spbcScannerButtonFileCompareCallback,errorOutput:function(e){spbcModal.open().putError(e)}};spbcSendAJAXRequest(o,e)}function spbcScannerButtonFileCompareCallback(n,e,o){console.log("FILE_COMPARED");var t='
',c='
',a=(c=c+'

%s

%s'+'

%s


',(t=t+'

%s

%s'+'

%s


').printf('Modified',"Line",'Original'));jQuery("#spbc_dialog").append(a);for(let o=1;void 0!==n.file[o]||void 0!==n.file_original[o];o++)if(void 0===n.file[o]&&(n.file[o]=""),void 0===n.file_original[o]&&(n.file_original[o]=""),-1!=n.difference.indexOf(o)){for(let e=o-2;e<=o+2;e++)void 0!==n.file[e]&&void 0!==n.file_original[o]&&jQuery("#spbc_dialog").append((o===e?c:t).printf(n.file[e]||"",e,n.file_original[e]||""));jQuery("#spbc_dialog").append(t.printf("","",""))}var a=19*jQuery("#spbc_dialog div").length+19,s=document.documentElement.clientHeight/100*75;let r=a{document.getElementById("spbc_scanner__last_scan_info").innerText=e.data}})}function spbcScannerButtonCureFileAjaxHandler(e){e={action:"spbc_file_cure_ajax_action",file_fast_hash:jQuery(e).parents(".row-actions").attr("uid"),security:spbcSettings.ajax_nonce};jQuery.ajax({type:"POST",async:!0,url:spbcSettings.ajaxurl,data:e,success:function(e){e.success?(spbcModal.open().put(e.data),document.addEventListener("spbcModalClosed",function(e){document.location.reload()})):spbcModal.open().putError(e.data)}})}function spbcScannerButtonRestoreFromBackupAjaxHandler(e){e={action:"spbc_restore_file_from_backup_ajax_action",file_fast_hash:jQuery(e).parents(".row-actions").attr("uid"),security:spbcSettings.ajax_nonce};jQuery.ajax({type:"POST",async:!0,url:spbcSettings.ajaxurl,data:e,success:function(e){e.success?(spbcModal.open().put(e.data),document.addEventListener("spbcModalClosed",function(e){document.location.reload()})):spbcModal.open().putError(e.data)}})}function spbcScannerButtonClearScanResults(){confirm("Do you confirm to clear the scan results?")&&(console.log("CLEAR"),spbcSendAJAXRequest({action:"spbc_scanner_clear"},{type:"GET",successCallback:function(){document.location=document.location},complete:null,errorOutput:null,context:this,timeout:4e4,success:function(){document.location.reload()}}))}function spbcScannerCopyLogToClipboardHint(e){jQuery("#spbc_scanner_copy_log_to_clipboard_hint").text(e),jQuery("#spbc_scanner_copy_log_to_clipboard_hint").show(),jQuery("#spbc_scanner_copy_log_to_clipboard_hint").animate({opacity:0},3e3,function(){jQuery(this).hide(),jQuery(this).css("opacity",1)})}jQuery(document).ready(function(){spbcTblBulkActionsListen(),spbcTblRowActionsListen(),spbcTblPaginationListen(),spbcTblSortListen(),spbcStartShowHide(),jQuery("#spbc_scaner_progress_bar").progressbar({value:0,create:function(e,o){e.target.style.position="relative",e.target.style.marginBottom="12px"},change:function(e,o){jQuery(".spbc_progressbar_counter span").text(jQuery(e.target).progressbar("option","value")+" %")}}),jQuery("#spbc_scan_accordion").accordion({header:"h3",heightStyle:"content",collapsible:!0,active:!1,activate:function(e,o){0===o.oldPanel.length&&0===o.oldHeader.length&&jQuery("#spbc_scan_accordion").accordion("option","classes.ui-accordion-content","ui-corner-bottom spbc-overflow--visible")},beforeActivate:function(e,o){1===o.oldPanel.length&&1===o.oldHeader.length&&jQuery("#spbc_scan_accordion").accordion("option","classes.ui-accordion-content","ui-corner-bottom")}}),window.spbcScanner=new SpbcMalwareScanner({settings:spbcScaner.settings,states:spbcScaner.states,button:jQuery("#spbc_perform_scan"),spinner:jQuery("#spbc_perform_scan").next(),callback:null,progress_overall:jQuery("#spbc_scaner_progress_overall"),progressbar:jQuery("#spbc_scaner_progress_bar"),progressbar_text:jQuery(".spbc_progressbar_counter span"),wrapper:document.getElementsByClassName("spbc_unchecked_file_list"),warnings:{long_scan:jQuery(".spbc_hint_warning__long_scan"),outdated:jQuery(".spbc_hint_warning__outdated")}}),jQuery(document).on("click",".spbc_popup_tip--icon---show",function(){spbcPopupTipShow(jQuery(this))}),jQuery("#spbc_perform_scan").on("click",function(){jQuery("#spbcscan-results-log-module").remove(),spbcScanner.actionControl(),jQuery(".spbc_log-wrapper .panel-body").length||jQuery(".spbc_log-wrapper").append('
'),jQuery(".spbc_log-wrapper").resizable({handles:"n, s",containment:"document"})}),jQuery("#spbcscan-results-log-module").resizable({handles:"n, s",containment:"document"}),jQuery("#spbc_scanner_clear").on("click",function(){confirm("Do you confirm to clear the scan results?")&&(console.log("CLEAR"),spbcSendAJAXRequest({action:"spbc_scanner_clear"},{type:"GET",successCallback:function(){document.location=document.location},complete:null,errorOutput:null,context:this,timeout:4e4,success:function(){document.location.reload()}}))}),jQuery("#spbc_scanner_save_to_pdf").on("click",function(){jQuery.ajax({url:spbcSettings.ajaxurl,type:"POST",data:{action:"spbc_scanner_save_to_pdf",security:spbcSettings.ajax_nonce,no_cache:Math.random()},xhrFields:{responseType:"blob"},success:function(t){jQuery.ajax({url:spbcSettings.ajaxurl,type:"POST",data:{action:"spbc_scanner_get_pdf_file_name",security:spbcSettings.ajax_nonce,no_cache:Math.random()},xhrFields:{responseType:"text"},success:function(e){var o=new Blob([t]),n=document.createElement("a");n.href=window.URL.createObjectURL(o),n.download=e.data,n.click()}})}})}),jQuery("#spbc_scanner_copy_log_to_clipboard").length&&jQuery("#spbc_scanner_copy_log_to_clipboard").on("click",function(e){if(e.preventDefault(),navigator.clipboard){let e=jQuery("#spbcscan-results-log-module .panel-body").html().replace(//g,"").replace(/<\/b>/g,"");e=e.replace(/

/g,"\n").replace(/<\/p>/g,""),navigator.clipboard.writeText(e).then(()=>{spbcScannerCopyLogToClipboardHint(spbcScaner.copy_log_to_clipboard_hint)}).catch(e=>{spbcScannerCopyLogToClipboardHint(spbcScaner.copy_log_to_clipboard_hint_failed)})}else spbcScannerCopyLogToClipboardHint(spbcScaner.copy_log_to_clipboard_hint_unsupported)})}); //# sourceMappingURL=spbc-settings_tab--scanner.min.js.map diff --git a/js/spbc-settings_tab--scanner.min.js.map b/js/spbc-settings_tab--scanner.min.js.map index 31145a00e..77ab21a1b 100644 --- a/js/spbc-settings_tab--scanner.min.js.map +++ b/js/spbc-settings_tab--scanner.min.js.map @@ -1 +1 @@ -{"version":3,"file":"spbc-settings_tab--scanner.min.js","sources":["spbc-settings_tab--scanner.js"],"sourcesContent":["/**\n * Show popup tip\n *\n * @param {object} showIcon\n */\nfunction spbcPopupTipShow(showIcon) { // eslint-disable-line no-unused-vars\n let tipTitle = showIcon.attr('spbc_tip_title') || null;\n let tipText = showIcon.attr('spbc_tip_text') || null;\n let removeDescFunc = function(e) {\n if (\n typeof e === 'undefined' ||\n (\n jQuery(e.target).parent('.spbc_popup_tip--wrapper').length == 0 ||\n jQuery(e.target).hasClass('spbc_popup_tip--icon---cancel')\n )\n ) {\n jQuery('.spbc_popup_tip--wrapper').hide();\n jQuery(document).off('click', removeDescFunc);\n }\n };\n\n removeDescFunc();\n\n showIcon.after('

');\n\n let obj = jQuery('.spbc_popup_tip--wrapper');\n\n obj.empty()\n .append('
')\n .css({\n top: showIcon.position().top - 2,\n left: showIcon.position().left + 25,\n });\n obj.append('')\n .append('

' + tipTitle + '

')\n .append('

' + tipText + '

');\n\n jQuery(document).on('click', removeDescFunc);\n showIcon.parents('tr').on('mouseout', removeDescFunc);\n}\n\n/**\n * View file in the scanner\n *\n * @param {object} obj\n */\nfunction spbcScannerButtonFileViewEvent(obj) { // eslint-disable-line no-unused-vars\n let self = jQuery(obj);\n let data = {\n action: 'spbc_scanner_file_view',\n file_id: self.parents('.row-actions').attr('uid'),\n };\n let params = {\n spinner: self.parent().siblings('.tbl-preloader--tiny'),\n callback: spbcScannerButtonViewCallback,\n errorOutput: function(msg) {\n spbcModal.open().putError( msg );\n },\n };\n spbcSendAJAXRequest(data, params);\n}\n\n/**\n * Delete file from analysis log\n *\n * @param {object} obj\n */\nfunction spbcScannerAnalysisLogDeleteFromLog(obj) { // eslint-disable-line no-unused-vars\n let fileIds = [];\n const self = jQuery(obj);\n let spinner;\n\n if ( jQuery(obj).hasClass('tbl-row_action') ) {\n fileIds.push(self.parents('.row-actions').attr('uid'));\n spinner = self.parent().siblings('.tbl-preloader--tiny');\n } else {\n const selectedItems = self.closest('#spbc_tbl__scanner_analysis_log').find('.cb-select:checked');\n if (selectedItems.length === 0) {\n alert('Please, select elements.');\n return;\n }\n\n selectedItems.each(function(index, element) {\n const elementId = jQuery(element).val();\n fileIds.push(elementId);\n });\n spinner = self.children('.tbl-preloader--small');\n }\n\n const data = {\n action: 'spbc_scanner_analysis_log_delete_from_log',\n file_ids: fileIds,\n };\n\n let params = {\n spinner: spinner,\n callback: function() {\n window.location.reload();\n },\n };\n\n spbcSendAJAXRequest(data, params);\n}\n\n/**\n * View page in the scanner\n *\n * @param {object} obj\n */\nfunction spbcScannerButtonPageViewEvent(obj) { // eslint-disable-line no-unused-vars\n let self = jQuery(obj);\n let data = {\n action: 'spbc_scanner_page_view',\n page_url: self.parents('.row-actions').attr('uid'),\n };\n let params = {\n spinner: self.parent().siblings('.tbl-preloader--tiny'),\n callback: spbcScannerButtonViewCallback,\n errorOutput: function(msg) {\n spbcModal.open().putError( msg );\n },\n };\n\n let wpWrap = jQuery('#wpwrap');\n let dialogWindow = jQuery('#spbc_dialog');\n\n dialogWindow.dialog({\n modal: true,\n title: 'Loading..',\n position: {my: 'center top', at: 'center top+100px', of: window},\n width: +(wpWrap.width() / 100 * 90),\n show: {effect: 'blind', duration: 500},\n draggable: false,\n resizable: false,\n closeText: 'X',\n classes: {'ui-dialog': 'spbc---top'},\n open: function(event, ui) {\n event.target.style.overflow = 'auto';\n jQuery('#spbc_dialog').height((document.documentElement.clientHeight) / 100 * 25);\n },\n beforeClose: function(event, ui) {\n document.body.style.overflow = 'auto';\n jQuery('#spbc_dialog').empty();\n },\n });\n\n dialogWindow.append('\"Wait');\n\n let spinner = jQuery('#spbc_file_view_preloader');\n let sizeMultiplier = (wpWrap.width() * 0.0004);\n\n spinner.height(128 * sizeMultiplier);\n spinner.width(128 * sizeMultiplier);\n spinner.css({left: dialogWindow.width()/2 - (128 * sizeMultiplier / 2)});\n spinner.css({top: dialogWindow.height()/2 - (128 * sizeMultiplier / 2)});\n\n spbcSendAJAXRequest(data, params);\n}\n\n/**\n * Callback for file view\n *\n * @param {object} result\n */\nfunction spbcScannerButtonViewCallback(result) { // eslint-disable-line no-unused-vars\n let dialogWindow = jQuery('#spbc_dialog');\n dialogWindow.empty();\n\n jQuery('#spbc_file_view_preloader').css({display: 'none'});\n\n let rowTemplate = '
%s';\n rowTemplate += '

%s


';\n\n /* eslint-disable guard-for-in */\n for (let row in result.file) {\n dialogWindow.append(rowTemplate.printf(row, result.file[row]));\n }\n\n let contentHeight = Object.keys(result.file).length * 19 < 76 ? 76 : Object.keys(result.file).length * 19;\n let visibleHeight = (document.documentElement.clientHeight) / 100 * 75;\n let overflow = contentHeight < visibleHeight ? 'hidden' : 'scroll';\n let height = overflow === 'scroll' ? visibleHeight : contentHeight;\n\n dialogWindow.css({\n height: height,\n overflow: overflow,\n });\n\n dialogWindow.dialog({\n modal: true,\n title: ('Loaded: ' + result.file_path),\n position: {my: 'center top', at: 'center top+100px', of: window},\n width: +(jQuery('#wpwrap').width() / 100 * 90),\n show: {effect: 'blind', duration: 500},\n draggable: true,\n resizable: false,\n height: height,\n closeText: 'X',\n classes: {'ui-dialog': 'spbc---top'},\n open: function(event, ui) {\n event.target.style.overflow = overflow;\n jQuery('#spbc_dialog').height(height);\n jQuery('.ui-widget-overlay').on('click', function() {\n jQuery('#spbc_dialog').dialog('close');\n });\n },\n beforeClose: function(event, ui) {\n document.body.style.overflow = 'auto';\n jQuery('#spbc_dialog').empty();\n },\n });\n\n console.log('FILE_VIEWED');\n}\n\n/**\n * Event for file view bad\n *\n * @param {object} obj\n */\nfunction spbcScannerButtonFileViewBadEvent(obj) { // eslint-disable-line no-unused-vars\n let self = jQuery(obj);\n let data = {\n action: 'spbc_scanner_file_view',\n file_id: self.parents('.row-actions').attr('uid'),\n };\n let params = {\n spinner: self.parent().siblings('.tbl-preloader--tiny'),\n callback: spbcScannerButtonViewBadFileCallback,\n errorOutput: function(msg) {\n spbcModal.open().putError( msg );\n },\n };\n spbcSendAJAXRequest(data, params);\n}\n\n/**\n * Event for page view bad\n *\n * @param {object} obj\n */\nfunction spbcScannerButtonPageViewBadEvent(obj) { // eslint-disable-line no-unused-vars\n let self = jQuery(obj);\n let data = {\n action: 'spbc_scanner_page_view',\n page_url: self.parent().attr('uid'),\n };\n let params = {\n spinner: self.parent().siblings('.tbl-preloader--tiny'),\n callback: spbcScannerButtonViewBadCallback,\n errorOutput: function(msg) {\n spbcModal.open().putError( msg );\n },\n };\n spbcSendAJAXRequest(data, params);\n}\n\n/**\n * Callback for file view bad\n *\n * @param {object} result\n * @param {object} data\n * @param {object} params\n */\nfunction spbcScannerButtonViewBadFileCallback(result, data, params) { // eslint-disable-line no-unused-vars\n console.log('FILE_VIEWED_BAD_CODE_FILE');\n jQuery('#spbc_dialog').empty();\n\n let rowTemplate = '
%s';\n rowTemplate += '

%s


';\n let rowTemplateBad = '
';\n rowTemplateBad += '%s';\n rowTemplateBad += '

%s


';\n let severityParts = [];\n let severityPartsSorted = [];\n let severityKeysSorted = [];\n\n result.weak_spots = JSON.parse(result.weak_spots);\n /* eslint-disable guard-for-in */\n for (let severity in result.weak_spots) {\n severityParts[severity] = Object.keys(result.weak_spots[severity]);\n }\n\n severityKeysSorted = Object.keys(severityParts).sort();\n\n /* eslint-disable guard-for-in */\n for (key in severityKeysSorted) {\n severityPartsSorted[severityKeysSorted[key]] = severityParts[severityKeysSorted[key]];\n }\n\n /* eslint-disable guard-for-in */\n for (let severityPart in severityPartsSorted) {\n let headerName = 'spbc-dialog-row-header-' + severityPart.toLowerCase();\n let headerHtml = '';\n headerHtml += severityPart + ' weakspots:';\n const dialog = jQuery('#spbc_dialog');\n\n dialog.append(rowTemplate.printf('', headerHtml));\n dialog.append(rowTemplate. printf('...', '...'));\n\n let header = dialog.find('#' + headerName);\n header.parent().parent().css('text-align', 'center');\n header.parent().parent().css('border', '1px dotted');\n header.parent().parent().css('background', 'darkgrey');\n\n /* eslint-disable guard-for-in */\n for (let strNum in severityParts[severityPart]) {\n // Sort bad line\n strNum = [...new Set(strNum)].sort();\n\n let row = +severityParts[severityPart][strNum];\n let displayDepth = 2;\n let temp;\n // Display only existing lines of file\n for (let currRow = row - displayDepth; currRow <= row + displayDepth; currRow++ ) {\n if ( typeof result.file[currRow] !== 'undefined' ) {\n temp = row === currRow ? rowTemplateBad : rowTemplate;\n dialog.append(temp.printf(currRow, result.file[currRow]));\n }\n }\n\n // Placing an empty string between results\n dialog.append(rowTemplate. printf('...', '...'));\n }\n }\n\n // Removing last empty string\n jQuery('#spbc_dialog div').last().remove();\n\n let contentHeight = jQuery('#spbc_dialog div').length * 19 < 76 ? 76 : jQuery('#spbc_dialog div').length * 19;\n let visibleHeight = (document.documentElement.clientHeight) / 100 * 75;\n let overflow = contentHeight < visibleHeight ? 'no_scroll' : 'scroll';\n let height = overflow === 'scroll' ? visibleHeight : contentHeight;\n\n jQuery('#spbc_dialog').dialog({\n modal: true,\n title: result.file_path,\n position: {my: 'center top', at: 'center top+100px', of: window},\n width: +(jQuery('#wpwrap').width() / 100 * 90),\n show: {effect: 'blind', duration: 500},\n draggable: true,\n resizable: false,\n closeText: 'X',\n classes: {'ui-dialog': 'spbc---top'},\n open: function(event, ui) {\n event.target.style.overflow = overflow;\n jQuery('#spbc_dialog').height(height);\n jQuery('.ui-widget-overlay').on('click', function() {\n jQuery('#spbc_dialog').dialog('close');\n });\n },\n beforeClose: function(event, ui) {\n document.body.style.overflow = 'auto';\n jQuery('#spbc_dialog').empty();\n },\n });\n}\n\n/**\n * Callback for file view bad\n *\n * @param {object} result\n * @param {object} data\n * @param {object} params\n */\nfunction spbcScannerButtonViewBadCallback(result, data, params) { // eslint-disable-line no-unused-vars\n console.log('FILE_VIEWED_BAD_CODE');\n\n let afterClose = () => {};\n\n if ( result.success == true ) {\n console.log(result);\n let rowTemplate = '
' +\n '%s' +\n '

%s

' +\n '
';\n let rowTemplateBad = '
' +\n '%s' +\n '

%s

' +\n '
';\n let strNums = [];\n\n result.weak_spots = JSON.parse(result.weak_spots);\n /* eslint-disable guard-for-in */\n for (let severity in result.weak_spots) {\n strNums = strNums.concat(Object.keys(result.weak_spots[severity]));\n }\n\n strNums = [...new Set(strNums)].sort(); // Sort bad line\n // get a map of bad strings\n // TODO: Probably there can get something else except CRITICAL in the future\n let badStringsMap = new Map(Object.entries(result.weak_spots.CRITICAL));\n /* eslint-disable guard-for-in */\n for (let strNum in strNums) {\n if (strNum == 0 && badStringsMap.get(strNums[strNum]).toLowerCase().includes('doctype')) {\n continue;\n }\n\n let row = +strNums[strNum];\n let displayDepth = 2;\n\n // Display only existing lines of file\n for (let currRow = row - displayDepth; currRow <= row + displayDepth; currRow++ ) {\n if ( typeof result.file[currRow] !== 'undefined' ) {\n let isBadString = (row === currRow);\n let unformattedRow;\n let highlitedRow;\n if (isBadString) {\n unformattedRow = rowTemplateBad;\n } else {\n unformattedRow = rowTemplate;\n }\n if (isBadString && !result.file[currRow].includes('iframe')) {\n highlitedRow = unformattedRow.printf(currRow, badStringsMap.get(strNums[strNum]));\n } else {\n highlitedRow = unformattedRow.printf(currRow, result.file[currRow]);\n }\n jQuery('#spbc_dialog').append(highlitedRow);\n }\n }\n\n // Placing an empty string between results\n jQuery('#spbc_dialog').append(rowTemplate. printf('', ''));\n\n // Removing last empty string\n jQuery('#spbc_dialog div').last().remove();\n }\n } else {\n let wrapperElement = '
%s
';\n jQuery('#spbc_dialog').append(wrapperElement.printf(result.content));\n afterClose = () => {\n document.location.reload();\n };\n }\n\n let contentHeight = jQuery('#spbc_dialog div').length * 19 < 76 ? 76 : jQuery('#spbc_dialog div').length * 19;\n let visibleHeight = (document.documentElement.clientHeight) / 100 * 75;\n let height = 'auto';\n let overflow = contentHeight < visibleHeight ? 'no_scroll' : 'scroll';\n\n jQuery('#spbc_dialog').dialog({\n modal: true,\n title: result.file_path,\n position: {my: 'center top', at: 'center top+100px', of: window},\n width: +(jQuery('#wpwrap').width() / 100 * 90),\n show: {effect: 'blind', duration: 500},\n draggable: true,\n resizable: false,\n closeText: 'X',\n classes: {'ui-dialog': 'spbc---top'},\n open: function(event, ui) {\n event.target.style.overflow = overflow;\n jQuery('#spbc_dialog').height(height);\n jQuery('.ui-widget-overlay').on('click', function() {\n jQuery('#spbc_dialog').dialog('close');\n });\n },\n beforeClose: function(event, ui) {\n document.body.style.overflow = 'auto';\n jQuery('#spbc_dialog').empty();\n },\n close: afterClose,\n });\n}\n\n/**\n * File compare event\n *\n * @param {object} obj\n */\nfunction spbcScannerButtonFileCompareEvent(obj) { // eslint-disable-line no-unused-vars\n let self = jQuery(obj);\n let data = {\n action: 'spbc_scanner_file_compare',\n file_id: self.parents('.row-actions').attr('uid'),\n };\n let params = {\n spinner: self.parent().siblings('.tbl-preloader--tiny'),\n callback: spbcScannerButtonFileCompareCallback,\n errorOutput: function(msg) {\n spbcModal.open().putError( msg );\n },\n };\n spbcSendAJAXRequest(data, params);\n}\n\n/**\n * Callback for file compare\n *\n * @param {object} result\n * @param {object} data\n * @param {object} params\n */\nfunction spbcScannerButtonFileCompareCallback(result, data, params) { // eslint-disable-line no-unused-vars\n console.log('FILE_COMPARED');\n\n let rowTemplate = '
';\n rowTemplate += '

%s

%s';\n rowTemplate += '

%s


';\n let rowTemplateBad = '
';\n rowTemplateBad += '

%s

%s';\n rowTemplateBad += '

%s


';\n\n let renderRowTemplate = rowTemplate.printf(\n 'Modified',\n 'Line',\n 'Original',\n );\n jQuery('#spbc_dialog').append(renderRowTemplate);\n\n for (let row=1; typeof result.file[row] != 'undefined' || typeof result.file_original[row] != 'undefined'; row++) {\n if (typeof result.file[row] == 'undefined') result.file[row] = '';\n if (typeof result.file_original[row] == 'undefined') result.file_original[row] = '';\n\n // Display only existing lines of file\n if (result.difference.indexOf(row) != -1) {\n for (let displayDepth = 2, currRow = row - displayDepth; currRow <= row + displayDepth; currRow++ ) {\n if ( typeof result.file[currRow] !== 'undefined' && typeof result.file_original[row] !== 'undefined') {\n jQuery('#spbc_dialog').append(\n (row === currRow ? rowTemplateBad : rowTemplate).printf(\n result.file[currRow] ? result.file[currRow] : '',\n currRow,\n result.file_original[currRow] ? result.file_original[currRow] : '',\n ),\n );\n }\n }\n jQuery('#spbc_dialog').append(rowTemplate. printf('', '', ''));\n }\n }\n\n let contentHeight = jQuery('#spbc_dialog div').length * 19 + 19;\n let visibleHeight = (document.documentElement.clientHeight) / 100 * 75;\n let overflow = contentHeight < visibleHeight ? 'no_scroll' : 'scroll';\n let height = overflow === 'scroll' ? visibleHeight : contentHeight;\n\n jQuery('#spbc_dialog').dialog({\n modal: true,\n title: result.file_path,\n position: {my: 'center top', at: 'center top+100px', of: window},\n width: +(jQuery('#wpwrap').width() / 100 * 90),\n height: height,\n show: {effect: 'blind', duration: 500},\n draggable: true,\n resizable: true,\n closeText: 'X',\n classes: {'ui-dialog': 'spbc---top'},\n open: function(event, ui) {\n document.body.style.overflow = 'hidden';\n event.target.style.overflow = overflow;\n jQuery('#spbc_dialog').height(height);\n },\n beforeClose: function(event, ui) {\n document.body.style.overflow = 'auto';\n jQuery('#spbc_dialog').empty();\n },\n });\n}\n\n/**\n * Reloads last scan info\n */\nfunction spbcScannerReloadScanInfo() { // eslint-disable-line no-unused-vars\n jQuery('.spbc_hint__last_scan_title').text(spbcScaner.look_below_for_scan_res);\n const data = {\n action: 'spbc_scanner__last_scan_info',\n };\n const params = {\n callback: (result) => {\n document.getElementById('spbc_scanner__last_scan_info').innerText = result.data;\n },\n };\n spbcSendAJAXRequest(data, params);\n}\n\n/**\n * Cure file\n * @param {object} obj\n */\nfunction spbcScannerButtonCureFileAjaxHandler(obj) { // eslint-disable-line no-unused-vars\n const self = jQuery(obj);\n const fileFastHash = self.parents('.row-actions').attr('uid');\n\n let data = {\n action: 'spbc_file_cure_ajax_action',\n file_fast_hash: fileFastHash,\n security: spbcSettings.ajax_nonce,\n };\n\n jQuery.ajax({\n type: 'POST',\n async: true,\n url: spbcSettings.ajaxurl,\n data: data,\n success: function(result) {\n if (result.success) {\n spbcModal.open().put(result.data);\n document.addEventListener('spbcModalClosed', function( e ) {\n document.location.reload();\n });\n } else {\n spbcModal.open().putError(result.data);\n }\n },\n });\n}\n\n/**\n * Restore file from backup\n * @param {object} obj\n */\nfunction spbcScannerButtonRestoreFromBackupAjaxHandler(obj) { // eslint-disable-line no-unused-vars\n const self = jQuery(obj);\n const fileFastHash = self.parents('.row-actions').attr('uid');\n\n let data = {\n action: 'spbc_restore_file_from_backup_ajax_action',\n file_fast_hash: fileFastHash,\n security: spbcSettings.ajax_nonce,\n };\n\n jQuery.ajax({\n type: 'POST',\n async: true,\n url: spbcSettings.ajaxurl,\n data: data,\n success: function(result) {\n if (result.success) {\n spbcModal.open().put(result.data);\n document.addEventListener('spbcModalClosed', function( e ) {\n document.location.reload();\n });\n } else {\n spbcModal.open().putError(result.data);\n }\n },\n });\n}\n\n/**\n * Clear scan results\n * @return {void}\n */\nfunction spbcScannerButtonClearScanResults() { // eslint-disable-line no-unused-vars\n if ( ! confirm('Do you confirm to clear the scan results?') ) {\n return;\n }\n\n console.log('CLEAR');\n\n spbcSendAJAXRequest(\n {action: 'spbc_scanner_clear'},\n {\n type: 'GET',\n successCallback: function() {\n document.location = document.location;\n },\n complete: null,\n errorOutput: null,\n context: this,\n timeout: 40000,\n success: function() {\n document.location.reload();\n },\n },\n );\n}\n\njQuery(document).ready(function() {\n // EVENT HADLING\n spbcTblBulkActionsListen(); // Table. Row bulk handler\n spbcTblRowActionsListen(); // Table. Row actions handler\n spbcTblPaginationListen(); // Table. Pagination handler\n spbcTblSortListen(); // Table. Sort handler\n\n spbcStartShowHide();\n\n // Preparing progressbar\n jQuery('#spbc_scaner_progress_bar').progressbar({\n value: 0,\n create: function( event, ui ) {\n event.target.style.position = 'relative';\n event.target.style.marginBottom = '12px';\n },\n change: function(event, ui) {\n jQuery('.spbc_progressbar_counter span').text(jQuery(event.target).progressbar('option', 'value') + ' %');\n },\n });\n\n // Preparing accordion\n jQuery('#spbc_scan_accordion').accordion({\n header: 'h3',\n heightStyle: 'content',\n collapsible: true,\n active: false,\n activate: function( event, ui ) {\n if ( ui.oldPanel.length === 0 && ui.oldHeader.length === 0 ) {\n jQuery('#spbc_scan_accordion')\n .accordion('option', 'classes.ui-accordion-content', 'ui-corner-bottom spbc-overflow--visible');\n }\n },\n beforeActivate: function( event, ui ) {\n if ( ui.oldPanel.length === 1 && ui.oldHeader.length === 1 ) {\n jQuery('#spbc_scan_accordion').accordion('option', 'classes.ui-accordion-content', 'ui-corner-bottom');\n }\n },\n });\n\n // Init scanner plugin\n window.spbcScanner = new SpbcMalwareScanner({\n settings: spbcScaner.settings,\n states: spbcScaner.states,\n button: jQuery('#spbc_perform_scan'),\n spinner: jQuery('#spbc_perform_scan').next(),\n callback: null,\n progress_overall: jQuery('#spbc_scaner_progress_overall'),\n progressbar: jQuery('#spbc_scaner_progress_bar'),\n progressbar_text: jQuery('.spbc_progressbar_counter span'),\n wrapper: document.getElementsByClassName('spbc_unchecked_file_list'),\n warnings: {\n long_scan: jQuery('.spbc_hint_warning__long_scan'),\n outdated: jQuery('.spbc_hint_warning__outdated'),\n },\n });\n\n jQuery(document).on('click', '.spbc_popup_tip--icon---show', function() {\n spbcPopupTipShow( jQuery( this ) );\n });\n\n jQuery('#spbc_perform_scan').on('click', function() {\n jQuery('#spbcscan-results-log-module').remove();\n spbcScanner.actionControl();\n\n if (!jQuery('.spbc_log-wrapper .panel-body').length) {\n jQuery('.spbc_log-wrapper').append('
');\n }\n\n jQuery('.spbc_log-wrapper').resizable({\n handles: 'n, s',\n containment: 'document',\n });\n });\n\n jQuery('#spbcscan-results-log-module').resizable({\n handles: 'n, s',\n containment: 'document',\n });\n\n // Clear scanner's tables\n jQuery('#spbc_scanner_clear').on('click', function() {\n if ( ! confirm('Do you confirm to clear the scan results?') ) {\n return;\n }\n\n console.log('CLEAR');\n\n spbcSendAJAXRequest(\n {action: 'spbc_scanner_clear'},\n {\n type: 'GET',\n successCallback: function() {\n document.location = document.location;\n },\n complete: null,\n errorOutput: null,\n context: this,\n timeout: 40000,\n success: function() {\n document.location.reload();\n },\n },\n );\n });\n\n jQuery('#spbc_scanner_save_to_pdf').on('click', function() {\n jQuery.ajax({\n url: spbcSettings.ajaxurl,\n type: 'POST',\n data: {\n action: 'spbc_scanner_save_to_pdf',\n security: spbcSettings.ajax_nonce,\n no_cache: Math.random(),\n },\n xhrFields: {\n responseType: 'blob',\n },\n success: function(data) {\n jQuery.ajax({\n url: spbcSettings.ajaxurl,\n type: 'POST',\n data: {\n action: 'spbc_scanner_get_pdf_file_name',\n security: spbcSettings.ajax_nonce,\n no_cache: Math.random(),\n },\n xhrFields: {\n responseType: 'text',\n },\n success: function(filename) {\n let blob=new Blob([data]);\n let link=document.createElement('a');\n link.href=window.URL.createObjectURL(blob);\n link.download=filename.data;\n link.click();\n },\n },\n );\n },\n });\n });\n});\n"],"names":["spbcPopupTipShow","showIcon","let","tipTitle","attr","tipText","removeDescFunc","e","jQuery","target","parent","length","hasClass","hide","document","off","after","obj","empty","append","css","top","position","left","on","parents","spbcScannerButtonFileViewEvent","self","data","action","file_id","params","spinner","siblings","callback","spbcScannerButtonViewCallback","errorOutput","msg","spbcModal","open","putError","spbcSendAJAXRequest","spbcScannerAnalysisLogDeleteFromLog","fileIds","push","selectedItems","closest","find","alert","each","index","element","elementId","val","children","file_ids","window","location","reload","spbcScannerButtonPageViewEvent","page_url","wpWrap","dialogWindow","dialog","modal","title","my","at","of","width","show","effect","duration","draggable","resizable","closeText","classes","ui-dialog","event","ui","style","overflow","height","documentElement","beforeClose","body","sizeMultiplier","result","row","rowTemplate","display","file","printf","contentHeight","Object","keys","visibleHeight","file_path","console","log","spbcScannerButtonFileViewBadEvent","spbcScannerButtonViewBadFileCallback","spbcScannerButtonPageViewBadEvent","spbcScannerButtonViewBadCallback","severityKeysSorted","severity","severityPart","rowTemplateBad","severityParts","severityPartsSorted","weak_spots","JSON","parse","key","sort","strNum","headerName","toLowerCase","headerHtml","header","Set","temp","currRow","last","remove","afterClose","success","strNums","concat","badStringsMap","Map","entries","CRITICAL","get","includes","isBadString","unformattedRow","highlitedRow","content","close","spbcScannerButtonFileCompareEvent","spbcScannerButtonFileCompareCallback","renderRowTemplate","file_original","difference","indexOf","spbcScannerReloadScanInfo","text","spbcScaner","look_below_for_scan_res","getElementById","innerText","spbcScannerButtonCureFileAjaxHandler","file_fast_hash","security","spbcSettings","ajax_nonce","ajax","type","async","url","ajaxurl","put","addEventListener","spbcScannerButtonRestoreFromBackupAjaxHandler","spbcScannerButtonClearScanResults","confirm","successCallback","complete","context","this","timeout","ready","spbcTblBulkActionsListen","spbcTblRowActionsListen","spbcTblPaginationListen","spbcTblSortListen","spbcStartShowHide","progressbar","value","create","marginBottom","change","accordion","heightStyle","collapsible","active","activate","oldPanel","oldHeader","beforeActivate","spbcScanner","SpbcMalwareScanner","settings","states","button","next","progress_overall","progressbar_text","wrapper","getElementsByClassName","warnings","long_scan","outdated","actionControl","handles","containment","no_cache","Math","random","xhrFields","responseType","filename","blob","Blob","link","createElement","href","URL","createObjectURL","download","click"],"mappings":"AAKA,SAASA,iBAAiBC,GACtBC,IAAIC,EAAWF,EAASG,KAAK,gBAAgB,GAAK,KAC9CC,EAAUJ,EAASG,KAAK,eAAe,GAAK,KAC3B,SAAjBE,EAA0BC,GAET,KAAA,IAANA,GAE2D,GAA9DC,OAAOD,EAAEE,MAAM,EAAEC,OAAO,0BAA0B,EAAEC,QACpDH,CAAAA,OAAOD,EAAEE,MAAM,EAAEG,SAAS,+BAA+B,IAG7DJ,OAAO,0BAA0B,EAAEK,KAAK,EACxCL,OAAOM,QAAQ,EAAEC,IAAI,QAAST,CAAc,EAEpD,CAEAA,EAAe,EAEfL,EAASe,MAAM,6CAA+C,EAE9Dd,IAAIe,EAAMT,OAAO,0BAA0B,EAE3CS,EAAIC,MAAM,EACLC,OAAO,2CAA6C,EACpDC,IAAI,CACDC,IAAKpB,EAASqB,SAAS,EAAED,IAAM,EAC/BE,KAAMtB,EAASqB,SAAS,EAAEC,KAAO,EACrC,CAAC,EACLN,EAAIE,OAAO,2DAA6D,EACnEA,OAAO,qCAAyChB,EAAW,OAAO,EAClEgB,OAAO,mCAAuCd,EAAU,MAAM,EAEnEG,OAAOM,QAAQ,EAAEU,GAAG,QAASlB,CAAc,EAC3CL,EAASwB,QAAQ,IAAI,EAAED,GAAG,WAAYlB,CAAc,CACxD,CAOA,SAASoB,+BAA+BT,GACpCf,IAAIyB,E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,QAAS,SAASlG,GACdpB,OAAOqJ,KAAK,CACRG,IAAKL,aAAaM,QAClBH,KAAM,OACNlI,KAAM,CACFC,OAAQ,iCACR6H,SAAUC,aAAaC,WACvBmD,SAAUC,KAAKC,OAAO,CAC1B,EACAC,UAAW,CACPC,aAAc,MAClB,EACArF,QAAS,SAASsF,GACdlN,IAAImN,EAAK,IAAIC,KAAK,CAAC1L,EAAK,EACpB2L,EAAKzM,SAAS0M,cAAc,GAAG,EACnCD,EAAKE,KAAKjK,OAAOkK,IAAIC,gBAAgBN,CAAI,EACzCE,EAAKK,SAASR,EAASxL,KACvB2L,EAAKM,MAAM,CACf,CACJ,CACA,CACJ,CACJ,CAAC,CACL,CAAC,CACL,CAAC"} \ No newline at end of file +{"version":3,"file":"spbc-settings_tab--scanner.min.js","sources":["spbc-settings_tab--scanner.js"],"sourcesContent":["/**\n * Show popup tip\n *\n * @param {object} showIcon\n */\nfunction spbcPopupTipShow(showIcon) { // eslint-disable-line no-unused-vars\n let tipTitle = showIcon.attr('spbc_tip_title') || null;\n let tipText = showIcon.attr('spbc_tip_text') || null;\n let removeDescFunc = function(e) {\n if (\n typeof e === 'undefined' ||\n (\n jQuery(e.target).parent('.spbc_popup_tip--wrapper').length == 0 ||\n jQuery(e.target).hasClass('spbc_popup_tip--icon---cancel')\n )\n ) {\n jQuery('.spbc_popup_tip--wrapper').hide();\n jQuery(document).off('click', removeDescFunc);\n }\n };\n\n removeDescFunc();\n\n showIcon.after('
');\n\n let obj = jQuery('.spbc_popup_tip--wrapper');\n\n obj.empty()\n .append('
')\n .css({\n top: showIcon.position().top - 2,\n left: showIcon.position().left + 25,\n });\n obj.append('')\n .append('

' + tipTitle + '

')\n .append('

' + tipText + '

');\n\n jQuery(document).on('click', removeDescFunc);\n showIcon.parents('tr').on('mouseout', removeDescFunc);\n}\n\n/**\n * View file in the scanner\n *\n * @param {object} obj\n */\nfunction spbcScannerButtonFileViewEvent(obj) { // eslint-disable-line no-unused-vars\n let self = jQuery(obj);\n let data = {\n action: 'spbc_scanner_file_view',\n file_id: self.parents('.row-actions').attr('uid'),\n };\n let params = {\n spinner: self.parent().siblings('.tbl-preloader--tiny'),\n callback: spbcScannerButtonViewCallback,\n errorOutput: function(msg) {\n spbcModal.open().putError( msg );\n },\n };\n spbcSendAJAXRequest(data, params);\n}\n\n/**\n * Delete file from analysis log\n *\n * @param {object} obj\n */\nfunction spbcScannerAnalysisLogDeleteFromLog(obj) { // eslint-disable-line no-unused-vars\n let fileIds = [];\n const self = jQuery(obj);\n let spinner;\n\n if ( jQuery(obj).hasClass('tbl-row_action') ) {\n fileIds.push(self.parents('.row-actions').attr('uid'));\n spinner = self.parent().siblings('.tbl-preloader--tiny');\n } else {\n const selectedItems = self.closest('#spbc_tbl__scanner_analysis_log').find('.cb-select:checked');\n if (selectedItems.length === 0) {\n alert('Please, select elements.');\n return;\n }\n\n selectedItems.each(function(index, element) {\n const elementId = jQuery(element).val();\n fileIds.push(elementId);\n });\n spinner = self.children('.tbl-preloader--small');\n }\n\n const data = {\n action: 'spbc_scanner_analysis_log_delete_from_log',\n file_ids: fileIds,\n };\n\n let params = {\n spinner: spinner,\n callback: function() {\n window.location.reload();\n },\n };\n\n spbcSendAJAXRequest(data, params);\n}\n\n/**\n * View page in the scanner\n *\n * @param {object} obj\n */\nfunction spbcScannerButtonPageViewEvent(obj) { // eslint-disable-line no-unused-vars\n let self = jQuery(obj);\n let data = {\n action: 'spbc_scanner_page_view',\n page_url: self.parents('.row-actions').attr('uid'),\n };\n let params = {\n spinner: self.parent().siblings('.tbl-preloader--tiny'),\n callback: spbcScannerButtonViewCallback,\n errorOutput: function(msg) {\n spbcModal.open().putError( msg );\n },\n };\n\n let wpWrap = jQuery('#wpwrap');\n let dialogWindow = jQuery('#spbc_dialog');\n\n dialogWindow.dialog({\n modal: true,\n title: 'Loading..',\n position: {my: 'center top', at: 'center top+100px', of: window},\n width: +(wpWrap.width() / 100 * 90),\n show: {effect: 'blind', duration: 500},\n draggable: false,\n resizable: false,\n closeText: 'X',\n classes: {'ui-dialog': 'spbc---top'},\n open: function(event, ui) {\n event.target.style.overflow = 'auto';\n jQuery('#spbc_dialog').height((document.documentElement.clientHeight) / 100 * 25);\n },\n beforeClose: function(event, ui) {\n document.body.style.overflow = 'auto';\n jQuery('#spbc_dialog').empty();\n },\n });\n\n dialogWindow.append('\"Wait');\n\n let spinner = jQuery('#spbc_file_view_preloader');\n let sizeMultiplier = (wpWrap.width() * 0.0004);\n\n spinner.height(128 * sizeMultiplier);\n spinner.width(128 * sizeMultiplier);\n spinner.css({left: dialogWindow.width()/2 - (128 * sizeMultiplier / 2)});\n spinner.css({top: dialogWindow.height()/2 - (128 * sizeMultiplier / 2)});\n\n spbcSendAJAXRequest(data, params);\n}\n\n/**\n * Callback for file view\n *\n * @param {object} result\n */\nfunction spbcScannerButtonViewCallback(result) { // eslint-disable-line no-unused-vars\n let dialogWindow = jQuery('#spbc_dialog');\n dialogWindow.empty();\n\n jQuery('#spbc_file_view_preloader').css({display: 'none'});\n\n let rowTemplate = '
%s';\n rowTemplate += '

%s


';\n\n /* eslint-disable guard-for-in */\n for (let row in result.file) {\n dialogWindow.append(rowTemplate.printf(row, result.file[row]));\n }\n\n let contentHeight = Object.keys(result.file).length * 19 < 76 ? 76 : Object.keys(result.file).length * 19;\n let visibleHeight = (document.documentElement.clientHeight) / 100 * 75;\n let overflow = contentHeight < visibleHeight ? 'hidden' : 'scroll';\n let height = overflow === 'scroll' ? visibleHeight : contentHeight;\n\n dialogWindow.css({\n height: height,\n overflow: overflow,\n });\n\n dialogWindow.dialog({\n modal: true,\n title: ('Loaded: ' + result.file_path),\n position: {my: 'center top', at: 'center top+100px', of: window},\n width: +(jQuery('#wpwrap').width() / 100 * 90),\n show: {effect: 'blind', duration: 500},\n draggable: true,\n resizable: false,\n height: height,\n closeText: 'X',\n classes: {'ui-dialog': 'spbc---top'},\n open: function(event, ui) {\n event.target.style.overflow = overflow;\n jQuery('#spbc_dialog').height(height);\n jQuery('.ui-widget-overlay').on('click', function() {\n jQuery('#spbc_dialog').dialog('close');\n });\n },\n beforeClose: function(event, ui) {\n document.body.style.overflow = 'auto';\n jQuery('#spbc_dialog').empty();\n },\n });\n\n console.log('FILE_VIEWED');\n}\n\n/**\n * Event for file view bad\n *\n * @param {object} obj\n */\nfunction spbcScannerButtonFileViewBadEvent(obj) { // eslint-disable-line no-unused-vars\n let self = jQuery(obj);\n let data = {\n action: 'spbc_scanner_file_view',\n file_id: self.parents('.row-actions').attr('uid'),\n };\n let params = {\n spinner: self.parent().siblings('.tbl-preloader--tiny'),\n callback: spbcScannerButtonViewBadFileCallback,\n errorOutput: function(msg) {\n spbcModal.open().putError( msg );\n },\n };\n spbcSendAJAXRequest(data, params);\n}\n\n/**\n * Event for page view bad\n *\n * @param {object} obj\n */\nfunction spbcScannerButtonPageViewBadEvent(obj) { // eslint-disable-line no-unused-vars\n let self = jQuery(obj);\n let data = {\n action: 'spbc_scanner_page_view',\n page_url: self.parent().attr('uid'),\n };\n let params = {\n spinner: self.parent().siblings('.tbl-preloader--tiny'),\n callback: spbcScannerButtonViewBadCallback,\n errorOutput: function(msg) {\n spbcModal.open().putError( msg );\n },\n };\n spbcSendAJAXRequest(data, params);\n}\n\n/**\n * Callback for file view bad\n *\n * @param {object} result\n * @param {object} data\n * @param {object} params\n */\nfunction spbcScannerButtonViewBadFileCallback(result, data, params) { // eslint-disable-line no-unused-vars\n console.log('FILE_VIEWED_BAD_CODE_FILE');\n jQuery('#spbc_dialog').empty();\n\n let rowTemplate = '
%s';\n rowTemplate += '

%s


';\n let rowTemplateBad = '
';\n rowTemplateBad += '%s';\n rowTemplateBad += '

%s


';\n let severityParts = [];\n let severityPartsSorted = [];\n let severityKeysSorted = [];\n\n result.weak_spots = JSON.parse(result.weak_spots);\n /* eslint-disable guard-for-in */\n for (let severity in result.weak_spots) {\n severityParts[severity] = Object.keys(result.weak_spots[severity]);\n }\n\n severityKeysSorted = Object.keys(severityParts).sort();\n\n /* eslint-disable guard-for-in */\n for (key in severityKeysSorted) {\n severityPartsSorted[severityKeysSorted[key]] = severityParts[severityKeysSorted[key]];\n }\n\n /* eslint-disable guard-for-in */\n for (let severityPart in severityPartsSorted) {\n let headerName = 'spbc-dialog-row-header-' + severityPart.toLowerCase();\n let headerHtml = '';\n headerHtml += severityPart + ' weakspots:';\n const dialog = jQuery('#spbc_dialog');\n\n dialog.append(rowTemplate.printf('', headerHtml));\n dialog.append(rowTemplate. printf('...', '...'));\n\n let header = dialog.find('#' + headerName);\n header.parent().parent().css('text-align', 'center');\n header.parent().parent().css('border', '1px dotted');\n header.parent().parent().css('background', 'darkgrey');\n\n /* eslint-disable guard-for-in */\n for (let strNum in severityParts[severityPart]) {\n // Sort bad line\n strNum = [...new Set(strNum)].sort();\n\n let row = +severityParts[severityPart][strNum];\n let displayDepth = 2;\n let temp;\n // Display only existing lines of file\n for (let currRow = row - displayDepth; currRow <= row + displayDepth; currRow++ ) {\n if ( typeof result.file[currRow] !== 'undefined' ) {\n temp = row === currRow ? rowTemplateBad : rowTemplate;\n dialog.append(temp.printf(currRow, result.file[currRow]));\n }\n }\n\n // Placing an empty string between results\n dialog.append(rowTemplate. printf('...', '...'));\n }\n }\n\n // Removing last empty string\n jQuery('#spbc_dialog div').last().remove();\n\n let contentHeight = jQuery('#spbc_dialog div').length * 19 < 76 ? 76 : jQuery('#spbc_dialog div').length * 19;\n let visibleHeight = (document.documentElement.clientHeight) / 100 * 75;\n let overflow = contentHeight < visibleHeight ? 'no_scroll' : 'scroll';\n let height = overflow === 'scroll' ? visibleHeight : contentHeight;\n\n jQuery('#spbc_dialog').dialog({\n modal: true,\n title: result.file_path,\n position: {my: 'center top', at: 'center top+100px', of: window},\n width: +(jQuery('#wpwrap').width() / 100 * 90),\n show: {effect: 'blind', duration: 500},\n draggable: true,\n resizable: false,\n closeText: 'X',\n classes: {'ui-dialog': 'spbc---top'},\n open: function(event, ui) {\n event.target.style.overflow = overflow;\n jQuery('#spbc_dialog').height(height);\n jQuery('.ui-widget-overlay').on('click', function() {\n jQuery('#spbc_dialog').dialog('close');\n });\n },\n beforeClose: function(event, ui) {\n document.body.style.overflow = 'auto';\n jQuery('#spbc_dialog').empty();\n },\n });\n}\n\n/**\n * Callback for file view bad\n *\n * @param {object} result\n * @param {object} data\n * @param {object} params\n */\nfunction spbcScannerButtonViewBadCallback(result, data, params) { // eslint-disable-line no-unused-vars\n console.log('FILE_VIEWED_BAD_CODE');\n\n let afterClose = () => {};\n\n if ( result.success == true ) {\n console.log(result);\n let rowTemplate = '
' +\n '%s' +\n '

%s

' +\n '
';\n let rowTemplateBad = '
' +\n '%s' +\n '

%s

' +\n '
';\n let strNums = [];\n\n result.weak_spots = JSON.parse(result.weak_spots);\n /* eslint-disable guard-for-in */\n for (let severity in result.weak_spots) {\n strNums = strNums.concat(Object.keys(result.weak_spots[severity]));\n }\n\n strNums = [...new Set(strNums)].sort(); // Sort bad line\n // get a map of bad strings\n // TODO: Probably there can get something else except CRITICAL in the future\n let badStringsMap = new Map(Object.entries(result.weak_spots.CRITICAL));\n /* eslint-disable guard-for-in */\n for (let strNum in strNums) {\n if (strNum == 0 && badStringsMap.get(strNums[strNum]).toLowerCase().includes('doctype')) {\n continue;\n }\n\n let row = +strNums[strNum];\n let displayDepth = 2;\n\n // Display only existing lines of file\n for (let currRow = row - displayDepth; currRow <= row + displayDepth; currRow++ ) {\n if ( typeof result.file[currRow] !== 'undefined' ) {\n let isBadString = (row === currRow);\n let unformattedRow;\n let highlitedRow;\n if (isBadString) {\n unformattedRow = rowTemplateBad;\n } else {\n unformattedRow = rowTemplate;\n }\n if (isBadString && !result.file[currRow].includes('iframe')) {\n highlitedRow = unformattedRow.printf(currRow, badStringsMap.get(strNums[strNum]));\n } else {\n highlitedRow = unformattedRow.printf(currRow, result.file[currRow]);\n }\n jQuery('#spbc_dialog').append(highlitedRow);\n }\n }\n\n // Placing an empty string between results\n jQuery('#spbc_dialog').append(rowTemplate. printf('', ''));\n\n // Removing last empty string\n jQuery('#spbc_dialog div').last().remove();\n }\n } else {\n let wrapperElement = '
%s
';\n jQuery('#spbc_dialog').append(wrapperElement.printf(result.content));\n afterClose = () => {\n document.location.reload();\n };\n }\n\n let contentHeight = jQuery('#spbc_dialog div').length * 19 < 76 ? 76 : jQuery('#spbc_dialog div').length * 19;\n let visibleHeight = (document.documentElement.clientHeight) / 100 * 75;\n let height = 'auto';\n let overflow = contentHeight < visibleHeight ? 'no_scroll' : 'scroll';\n\n jQuery('#spbc_dialog').dialog({\n modal: true,\n title: result.file_path,\n position: {my: 'center top', at: 'center top+100px', of: window},\n width: +(jQuery('#wpwrap').width() / 100 * 90),\n show: {effect: 'blind', duration: 500},\n draggable: true,\n resizable: false,\n closeText: 'X',\n classes: {'ui-dialog': 'spbc---top'},\n open: function(event, ui) {\n event.target.style.overflow = overflow;\n jQuery('#spbc_dialog').height(height);\n jQuery('.ui-widget-overlay').on('click', function() {\n jQuery('#spbc_dialog').dialog('close');\n });\n },\n beforeClose: function(event, ui) {\n document.body.style.overflow = 'auto';\n jQuery('#spbc_dialog').empty();\n },\n close: afterClose,\n });\n}\n\n/**\n * File compare event\n *\n * @param {object} obj\n */\nfunction spbcScannerButtonFileCompareEvent(obj) { // eslint-disable-line no-unused-vars\n let self = jQuery(obj);\n let data = {\n action: 'spbc_scanner_file_compare',\n file_id: self.parents('.row-actions').attr('uid'),\n };\n let params = {\n spinner: self.parent().siblings('.tbl-preloader--tiny'),\n callback: spbcScannerButtonFileCompareCallback,\n errorOutput: function(msg) {\n spbcModal.open().putError( msg );\n },\n };\n spbcSendAJAXRequest(data, params);\n}\n\n/**\n * Callback for file compare\n *\n * @param {object} result\n * @param {object} data\n * @param {object} params\n */\nfunction spbcScannerButtonFileCompareCallback(result, data, params) { // eslint-disable-line no-unused-vars\n console.log('FILE_COMPARED');\n\n let rowTemplate = '
';\n rowTemplate += '

%s

%s';\n rowTemplate += '

%s


';\n let rowTemplateBad = '
';\n rowTemplateBad += '

%s

%s';\n rowTemplateBad += '

%s


';\n\n let renderRowTemplate = rowTemplate.printf(\n 'Modified',\n 'Line',\n 'Original',\n );\n jQuery('#spbc_dialog').append(renderRowTemplate);\n\n for (let row=1; typeof result.file[row] != 'undefined' || typeof result.file_original[row] != 'undefined'; row++) {\n if (typeof result.file[row] == 'undefined') result.file[row] = '';\n if (typeof result.file_original[row] == 'undefined') result.file_original[row] = '';\n\n // Display only existing lines of file\n if (result.difference.indexOf(row) != -1) {\n for (let displayDepth = 2, currRow = row - displayDepth; currRow <= row + displayDepth; currRow++ ) {\n if ( typeof result.file[currRow] !== 'undefined' && typeof result.file_original[row] !== 'undefined') {\n jQuery('#spbc_dialog').append(\n (row === currRow ? rowTemplateBad : rowTemplate).printf(\n result.file[currRow] ? result.file[currRow] : '',\n currRow,\n result.file_original[currRow] ? result.file_original[currRow] : '',\n ),\n );\n }\n }\n jQuery('#spbc_dialog').append(rowTemplate. printf('', '', ''));\n }\n }\n\n let contentHeight = jQuery('#spbc_dialog div').length * 19 + 19;\n let visibleHeight = (document.documentElement.clientHeight) / 100 * 75;\n let overflow = contentHeight < visibleHeight ? 'no_scroll' : 'scroll';\n let height = overflow === 'scroll' ? visibleHeight : contentHeight;\n\n jQuery('#spbc_dialog').dialog({\n modal: true,\n title: result.file_path,\n position: {my: 'center top', at: 'center top+100px', of: window},\n width: +(jQuery('#wpwrap').width() / 100 * 90),\n height: height,\n show: {effect: 'blind', duration: 500},\n draggable: true,\n resizable: true,\n closeText: 'X',\n classes: {'ui-dialog': 'spbc---top'},\n open: function(event, ui) {\n document.body.style.overflow = 'hidden';\n event.target.style.overflow = overflow;\n jQuery('#spbc_dialog').height(height);\n },\n beforeClose: function(event, ui) {\n document.body.style.overflow = 'auto';\n jQuery('#spbc_dialog').empty();\n },\n });\n}\n\n/**\n * Reloads last scan info\n */\nfunction spbcScannerReloadScanInfo() { // eslint-disable-line no-unused-vars\n jQuery('.spbc_hint__last_scan_title').text(spbcScaner.look_below_for_scan_res);\n const data = {\n action: 'spbc_scanner__last_scan_info',\n };\n const params = {\n callback: (result) => {\n document.getElementById('spbc_scanner__last_scan_info').innerText = result.data;\n },\n };\n spbcSendAJAXRequest(data, params);\n}\n\n/**\n * Cure file\n * @param {object} obj\n */\nfunction spbcScannerButtonCureFileAjaxHandler(obj) { // eslint-disable-line no-unused-vars\n const self = jQuery(obj);\n const fileFastHash = self.parents('.row-actions').attr('uid');\n\n let data = {\n action: 'spbc_file_cure_ajax_action',\n file_fast_hash: fileFastHash,\n security: spbcSettings.ajax_nonce,\n };\n\n jQuery.ajax({\n type: 'POST',\n async: true,\n url: spbcSettings.ajaxurl,\n data: data,\n success: function(result) {\n if (result.success) {\n spbcModal.open().put(result.data);\n document.addEventListener('spbcModalClosed', function( e ) {\n document.location.reload();\n });\n } else {\n spbcModal.open().putError(result.data);\n }\n },\n });\n}\n\n/**\n * Restore file from backup\n * @param {object} obj\n */\nfunction spbcScannerButtonRestoreFromBackupAjaxHandler(obj) { // eslint-disable-line no-unused-vars\n const self = jQuery(obj);\n const fileFastHash = self.parents('.row-actions').attr('uid');\n\n let data = {\n action: 'spbc_restore_file_from_backup_ajax_action',\n file_fast_hash: fileFastHash,\n security: spbcSettings.ajax_nonce,\n };\n\n jQuery.ajax({\n type: 'POST',\n async: true,\n url: spbcSettings.ajaxurl,\n data: data,\n success: function(result) {\n if (result.success) {\n spbcModal.open().put(result.data);\n document.addEventListener('spbcModalClosed', function( e ) {\n document.location.reload();\n });\n } else {\n spbcModal.open().putError(result.data);\n }\n },\n });\n}\n\n/**\n * Clear scan results\n * @return {void}\n */\nfunction spbcScannerButtonClearScanResults() { // eslint-disable-line no-unused-vars\n if ( ! confirm('Do you confirm to clear the scan results?') ) {\n return;\n }\n\n console.log('CLEAR');\n\n spbcSendAJAXRequest(\n {action: 'spbc_scanner_clear'},\n {\n type: 'GET',\n successCallback: function() {\n document.location = document.location;\n },\n complete: null,\n errorOutput: null,\n context: this,\n timeout: 40000,\n success: function() {\n document.location.reload();\n },\n },\n );\n}\n\n/**\n * Show copy log to clipboard hint\n * @param {string} text\n */\nfunction spbcScannerCopyLogToClipboardHint(text) {\n jQuery('#spbc_scanner_copy_log_to_clipboard_hint').text(text);\n jQuery('#spbc_scanner_copy_log_to_clipboard_hint').show();\n jQuery('#spbc_scanner_copy_log_to_clipboard_hint').animate({opacity: 0}, 3000, function() {\n jQuery(this).hide();\n jQuery(this).css('opacity', 1);\n });\n}\n\njQuery(document).ready(function() {\n // EVENT HADLING\n spbcTblBulkActionsListen(); // Table. Row bulk handler\n spbcTblRowActionsListen(); // Table. Row actions handler\n spbcTblPaginationListen(); // Table. Pagination handler\n spbcTblSortListen(); // Table. Sort handler\n\n spbcStartShowHide();\n\n // Preparing progressbar\n jQuery('#spbc_scaner_progress_bar').progressbar({\n value: 0,\n create: function( event, ui ) {\n event.target.style.position = 'relative';\n event.target.style.marginBottom = '12px';\n },\n change: function(event, ui) {\n jQuery('.spbc_progressbar_counter span').text(jQuery(event.target).progressbar('option', 'value') + ' %');\n },\n });\n\n // Preparing accordion\n jQuery('#spbc_scan_accordion').accordion({\n header: 'h3',\n heightStyle: 'content',\n collapsible: true,\n active: false,\n activate: function( event, ui ) {\n if ( ui.oldPanel.length === 0 && ui.oldHeader.length === 0 ) {\n jQuery('#spbc_scan_accordion')\n .accordion('option', 'classes.ui-accordion-content', 'ui-corner-bottom spbc-overflow--visible');\n }\n },\n beforeActivate: function( event, ui ) {\n if ( ui.oldPanel.length === 1 && ui.oldHeader.length === 1 ) {\n jQuery('#spbc_scan_accordion').accordion('option', 'classes.ui-accordion-content', 'ui-corner-bottom');\n }\n },\n });\n\n // Init scanner plugin\n window.spbcScanner = new SpbcMalwareScanner({\n settings: spbcScaner.settings,\n states: spbcScaner.states,\n button: jQuery('#spbc_perform_scan'),\n spinner: jQuery('#spbc_perform_scan').next(),\n callback: null,\n progress_overall: jQuery('#spbc_scaner_progress_overall'),\n progressbar: jQuery('#spbc_scaner_progress_bar'),\n progressbar_text: jQuery('.spbc_progressbar_counter span'),\n wrapper: document.getElementsByClassName('spbc_unchecked_file_list'),\n warnings: {\n long_scan: jQuery('.spbc_hint_warning__long_scan'),\n outdated: jQuery('.spbc_hint_warning__outdated'),\n },\n });\n\n jQuery(document).on('click', '.spbc_popup_tip--icon---show', function() {\n spbcPopupTipShow( jQuery( this ) );\n });\n\n jQuery('#spbc_perform_scan').on('click', function() {\n jQuery('#spbcscan-results-log-module').remove();\n spbcScanner.actionControl();\n\n if (!jQuery('.spbc_log-wrapper .panel-body').length) {\n jQuery('.spbc_log-wrapper').append('
');\n }\n\n jQuery('.spbc_log-wrapper').resizable({\n handles: 'n, s',\n containment: 'document',\n });\n });\n\n jQuery('#spbcscan-results-log-module').resizable({\n handles: 'n, s',\n containment: 'document',\n });\n\n // Clear scanner's tables\n jQuery('#spbc_scanner_clear').on('click', function() {\n if ( ! confirm('Do you confirm to clear the scan results?') ) {\n return;\n }\n\n console.log('CLEAR');\n\n spbcSendAJAXRequest(\n {action: 'spbc_scanner_clear'},\n {\n type: 'GET',\n successCallback: function() {\n document.location = document.location;\n },\n complete: null,\n errorOutput: null,\n context: this,\n timeout: 40000,\n success: function() {\n document.location.reload();\n },\n },\n );\n });\n\n jQuery('#spbc_scanner_save_to_pdf').on('click', function() {\n jQuery.ajax({\n url: spbcSettings.ajaxurl,\n type: 'POST',\n data: {\n action: 'spbc_scanner_save_to_pdf',\n security: spbcSettings.ajax_nonce,\n no_cache: Math.random(),\n },\n xhrFields: {\n responseType: 'blob',\n },\n success: function(data) {\n jQuery.ajax({\n url: spbcSettings.ajaxurl,\n type: 'POST',\n data: {\n action: 'spbc_scanner_get_pdf_file_name',\n security: spbcSettings.ajax_nonce,\n no_cache: Math.random(),\n },\n xhrFields: {\n responseType: 'text',\n },\n success: function(filename) {\n let blob=new Blob([data]);\n let link=document.createElement('a');\n link.href=window.URL.createObjectURL(blob);\n link.download=filename.data;\n link.click();\n },\n },\n );\n },\n });\n });\n\n if (jQuery('#spbc_scanner_copy_log_to_clipboard').length) {\n jQuery('#spbc_scanner_copy_log_to_clipboard').on('click', function(e) {\n e.preventDefault();\n if (navigator.clipboard) {\n let log = jQuery('#spbcscan-results-log-module .panel-body').html();\n let formattedLog = log.replace(//g, '').replace(/<\\/b>/g, '');\n formattedLog = formattedLog.replace(/

/g, '\\n').replace(/<\\/p>/g, '');\n navigator.clipboard.writeText(formattedLog).then(() => {\n spbcScannerCopyLogToClipboardHint(spbcScaner.copy_log_to_clipboard_hint);\n }).catch((err) => {\n spbcScannerCopyLogToClipboardHint(spbcScaner.copy_log_to_clipboard_hint_failed);\n });\n } else {\n spbcScannerCopyLogToClipboardHint(spbcScaner.copy_log_to_clipboard_hint_unsupported);\n }\n });\n }\n});\n"],"names":["spbcPopupTipShow","showIcon","let","tipTitle","attr","tipText","removeDescFunc","e","jQuery","target","parent","length","hasClass","hide","document","off","after","obj","empty","append","css","top","position","left","on","parents","spbcScannerButtonFileViewEvent","self","data","action","file_id","params","spinner","siblings","callback","spbcScannerButtonViewCallback","errorOutput","msg","spbcModal","open","putError","spbcSendAJAXRequest","spbcScannerAnalysisLogDeleteFromLog","fileIds","push","selectedItems","closest","find","alert","each","index","element","elementId","val","children","file_ids","window","location","reload","spbcScannerButtonPageViewEvent","page_url","wpWrap","dialogWindow","dialog","modal","title","my","at","of","width","show","effect","duration","draggable","resizable","closeText","classes","ui-dialog","event","ui","style","overflow","height","documentElement","beforeClose","body","sizeMultiplier","result","row","rowTemplate","display","file","printf","contentHeight","Object","keys","visibleHeight","file_path","console","log","spbcScannerButtonFileViewBadEvent","spbcScannerButtonViewBadFileCallback","spbcScannerButtonPageViewBadEvent","spbcScannerButtonViewBadCallback","severityKeysSorted","severity","severityPart","rowTemplateBad","severityParts","severityPartsSorted","weak_spots","JSON","parse","key","sort","strNum","headerName","toLowerCase","headerHtml","header","Set","temp","currRow","last","remove","afterClose","success","strNums","concat","badStringsMap","Map","entries","CRITICAL","get","includes","isBadString","unformattedRow","highlitedRow","content","close","spbcScannerButtonFileCompareEvent","spbcScannerButtonFileCompareCallback","renderRowTemplate","file_original","difference","indexOf","spbcScannerReloadScanInfo","text","spbcScaner","look_below_for_scan_res","getElementById","innerText","spbcScannerButtonCureFileAjaxHandler","file_fast_hash","security","spbcSettings","ajax_nonce","ajax","type","async","url","ajaxurl","put","addEventListener","spbcScannerButtonRestoreFromBackupAjaxHandler","spbcScannerButtonClearScanResults","confirm","successCallback","complete","context","this","timeout","spbcScannerCopyLogToClipboardHint","animate","opacity","ready","spbcTblBulkActionsListen","spbcTblRowActionsListen","spbcTblPaginationListen","spbcTblSortListen","spbcStartShowHide","progressbar","value","create","marginBottom","change","accordion","heightStyle","collapsible","active","activate","oldPanel","oldHeader","beforeActivate","spbcScanner","SpbcMalwareScanner","settings","states","button","next","progress_overall","progressbar_text","wrapper","getElementsByClassName","warnings","long_scan","outdated","actionControl","handles","containment","no_cache","Math","random","xhrFields","responseType","filename","blob","Blob","link","createElement","href","URL","createObjectURL","download","click","preventDefault","navigator","clipboard","formattedLog","html","replace","writeText","then","copy_log_to_clipboard_hint","catch","copy_log_to_clipboard_hint_failed","copy_log_to_clipboard_hint_unsupported"],"mappings":"AAKA,SAASA,iBAAiBC,GACtBC,IAAIC,EAAWF,EAASG,KAAK,gBAAgB,GAAK,KAC9CC,EAAUJ,EAASG,KAAK,eAAe,GAAK,KAC3B,SAAjBE,EAA0BC,GAET,KAAA,IAANA,GAE2D,GAA9DC,OAAOD,EAAEE,MAAM,EAAEC,OAAO,0BAA0B,EAAEC,QACpDH,CAAAA,OAAOD,EAAEE,MAAM,EAAEG,SAAS,+BAA+B,IAG7DJ,OAAO,0BAA0B,EAAEK,KAAK,EACxCL,OAAOM,QAAQ,EAAEC,IAAI,QAAST,CAAc,EAEpD,CAEAA,EAAe,EAEfL,EAASe,MAAM,6CAA+C,EAE9Dd,IAAIe,EAAMT,OAAO,0BAA0B,EAE3CS,EAAIC,MAAM,EACLC,OAAO,2CAA6C,EACpDC,IAAI,CACDC,IAAKpB,EAASqB,S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3CC,QAAQ,OAAQ,EAAE,EAAEA,QAAQ,SAAU,EAAE,EAC/DF,EAAeA,EAAaE,QAAQ,6BAA8B,IAAI,EAAEA,QAAQ,SAAU,EAAE,EAC5FJ,UAAUC,UAAUI,UAAUH,CAAY,EAAEI,KAAK,KAC7C5D,kCAAkCxB,WAAWqF,0BAA0B,CAC3E,CAAC,EAAEC,MAAM,IACL9D,kCAAkCxB,WAAWuF,iCAAiC,CAClF,CAAC,CACL,MACI/D,kCAAkCxB,WAAWwF,sCAAsC,CAE3F,CAAC,CAET,CAAC"} \ No newline at end of file diff --git a/js/spbc-table.min.js b/js/spbc-table.min.js index 9fc9fa86c..8fcb53726 100644 --- a/js/spbc-table.min.js +++ b/js/spbc-table.min.js @@ -1,2 +1 @@ let spbcBulkAction=null,noConfirmActions=spbcGetNoConfirmActions(spbcPublic);function spbcReloadAccordion(c=null,s=""){spbcSendAJAXRequest({action:"spbc_scanner_tab__reload_accordion"},{notJson:!0,callback:function(e,t,n,a){jQuery(a).accordion("destroy"),jQuery(a).html(e),jQuery(a).accordion({header:"h3",heightStyle:"content",collapsible:!0,active:!1}),spbcTblBulkActionsListen(),spbcTblRowActionsListen(),spbcTblPaginationListen(),spbcTblSortListen(),spbcStartShowHide(),null!==c&&null!==s&&interactScannerTab(c,s)}},jQuery("#spbc_scan_accordion"))}function interactScannerTab(e,t){var n,a;"string"==typeof e&&""!==e&&"string"==typeof t&&""!==t&&(n=jQuery('#spbc_scan_accordion div[refresh_control_tab="'+e+'"]')[0],e="h3[aria-controls=spbc_scan_accordion_tab_"+e+"]",e=jQuery(e)[0],void 0!==n)&&void 0!==e&&(jQuery('

').appendTo(e),a=jQuery(".spbc_accordion_header_caption__update_status"),jQuery('
'+t+"
").appendTo(a),e.click(),n.setAttribute("class","ui-accordion-header ui-corner-top ui-state-default ui-accordion-icons ui-accordion-header-active"),jQuery(".row-actions").hide())}function spbcTblBulkActionsListen(){jQuery(".tbl-bulk_actions-all--apply").off("click").on("click",function(){if(spbcScanner.active)alert(spbcTableLocalize.scannerIsActive);else{var e=jQuery(this);let n=e.siblings("select").children()[e.siblings("select").first()[0].selectedIndex].value;if(-1!==["approve","disapprove","send","check_analysis_status","approve_page","disapprove_page","cure","delete_from_analysis_log"].indexOf(n)){if(noConfirmActions.any.includes(n)||confirm(spbcTable.warning_bulk)){var t={action:"spbc_tbl-action--bulk",add_action:n,status:e.parents(".tbl-root").attr("type")};if("cure"===n){var a=e.closest("#spbc_tbl__scanner_cure_log").find(".cb-select");let n=[];a.each(function(e,t){t=jQuery(t).val();n.push(t)}),t.selectedIds=n}if("delete_from_analysis_log"===n){a=e.closest("#spbc_tbl__scanner_analysis_log").find(".cb-select");let n=[];a.each(function(e,t){t=jQuery(t).val();n.push(t)}),t.file_ids=n}a={button:this,spinner:e.children(".tbl-preloader--small"),callback:function(e){var t;spbcReloadAccordion(),"check_analysis_status"===n&&void 0!==e&&(t="

Analysis status updated. Total: "+e.counters.total+", updated: "+e.counters.updated+", skipped: "+e.counters.skipped+", failed: "+e.counters.failed+", queued: "+e.counters.queued+"

",spbcModal.open().put(t)),"send"===n&&void 0!==e&&(t="

Files have been sent: "+e.files_sent_counter+"

",spbcModal.open().put(t))},errorOutput:function(e,t){t&&(e=e+"
Additional information:
"+t),spbcModal.open().putError(e)},timeout:6e4};spbcSendAJAXRequest(t,a)}}else alert("This action is not supported for all files yet =(")}}),jQuery(".tbl-bulk_actions--apply").off("click").on("click",function(e){var n=spbcBulkAction||jQuery(this);let a=(spbcBulkAction=n).siblings("select").children()[n.siblings("select").first()[0].selectedIndex].value;if(spbcBulkAction||noConfirmActions.any.includes(a)||confirm(spbcTable.warning_bulk))if("cure"===a)spbcScannerCureSelected(jQuery(this));else if("delete_from_analysis_log"===a)spbcScannerAnalysisLogDeleteFromLog(jQuery(this));else if("allow"===a||"ban"===a){let t="ban"===a?"deny":a;var c=n.parents(".tbl-root").find(".cb-select:checked"),c=(c&&(n.children(".tbl-preloader--small").show(),c.each(function(){var e=jQuery(this).parents("tr").find(".tbl-row_action--"+a).data("ip");spbcSecLogsFilterIp(e,t,!0),jQuery(this).prop("checked",!1)})),n.children(".tbl-preloader--small").hide(),"allow"===a?"Allowed":"Banned"),c="

Success. Selected IPs have been "+c+". Changes will be applied within 10 minutes.

";spbcModal.open().put(c),void setTimeout(spbcReloadAccordion,1900)}else"-1"!==a&&n.parents(".tbl-root").find(".cb-select").is(":checked")?(n.children(".tbl-preloader--small").show(),n.parents(".tbl-root").find(".cb-select:checked").first().parents("tr").find(".tbl-row_action--"+a)[0]?(n.parents(".tbl-root").find(".cb-select:checked").first().parents("tr").find(".tbl-row_action--"+a).click(),n.parents(".tbl-root").find(".cb-select:checked").first().prop("checked",!1)):(n.parents(".tbl-root").find(".cb-select:checked").first().prop("checked",!1),n.click())):(n.children(".tbl-preloader--small").hide(),spbcBulkAction=null,"check_analysis_status"!==a&&"disapprove"!==a||spbcModal.open().put("

All available files are updated.

"),"send"===a&&spbcModal.open().put("

All available files are sent.

"),setTimeout(spbcReloadAccordion,1900)),noConfirmActions.restricted.includes(a)&&(spbcBulkAction=null)})}function spbcScannerCureSelected(t){var e=t.closest("#spbc_tbl__scanner_cure_log").find(".cb-select:checked");let n=[];0===e.length&&alert("Please, select elements."),e.each(function(e,t){t=jQuery(t).val();n.push(t)});e={action:"spbc_cure_selected",security:spbcSettings.ajax_nonce,selectedIds:n};jQuery.ajax({type:"POST",url:spbcSettings.ajaxurl,data:e,beforeSend:function(){t.closest("#spbc_tbl__scanner_cure_log").find(".tbl-button---white_blue .tbl-preloader--in_button").show()},success:function(e){t.closest("#spbc_tbl__scanner_cure_log").find(".tbl-button---white_blue .tbl-preloader--in_button").hide(),e.success?(spbcModal.open().put(e.data),document.addEventListener("spbcModalClosed",function(e){document.location.reload()})):spbcModal.open().putError(e.data)}})}function spbcTblRowActionsListen(){jQuery(".tbl-row_action--ajax").off("click").on("click",function(){if(spbcScanner.active)alert(spbcTableLocalize.scannerIsActive);else{let t=jQuery(this),n={action:"spbc_tbl-action--row",add_action:t.attr("row-action"),id:t.parents(".row-actions").attr("uid"),cols:t.parents(".row-actions").attr("cols_amount"),page_url:t.parent().attr("uid"),page_id:t.parent().attr("page_id")},a={callback:spbcTblRowActionsCallback,errorOutput:function(e,t,n){spbcModal.open().putError(e,n)},spinner:t.parent().siblings(".tbl-preloader--tiny")};"delete"===t.attr("row-action")&&(a.timeout=6e4);var e,c,s=t.parent().parent()[0].firstChild.innerHTML,i=spbcTable["warning_h_"+t.attr("row-action")]||spbcTable.warning_default,o=spbcTable["warning_t_"+t.attr("row-action")]||"";spbcBulkAction||noConfirmActions.any.includes(n.add_action)?spbcSendAJAXRequest(n,a,t.parents("tr")):(e="quarantine"===t.attr("row-action")?"Quarantine":"Yes",c="quarantine"===t.attr("row-action")?"Cancel":"No",spbcModal.open().confirm(i,o,s,e=>{e&&spbcSendAJAXRequest(n,a,t.parents("tr"))},e,c))}})}function spbcGetNoConfirmActions(e){var t={any:[],restricted:[],defaults:[]};let n=t;try{"function"==typeof(n=void 0!==e&&e.hasOwnProperty("no_confirm_row_actions")?JSON.parse(e.no_confirm_row_actions):n).any.includes&&"function"==typeof n.restricted.includes&&"function"==typeof n.defaults.includes||(n=t)}catch(e){n=t}return n}function spbcTblRowActionsCallback(t,n,e,a){if(t.color&&a.css({background:t.background,color:t.color}),t.html&&(a.parent().parent().parent().prepend(t.html),setTimeout(function(){a.fadeOut(300)},1500),spbcBulkAction||setTimeout(spbcReloadAccordion,1900)),"copy_file_info"===n.add_action&&(!0===t.success&&t.data.file_info?window.prompt("Copy the file info below and send it to support@cleantalk.org: ",t.data.file_info):(c=void 0!==t.data.error?t.data.error:"Unknown copy_file_info error",spbcModal.open().putError(c))),t.temp_html){let e=a.html();if(a.html(t.temp_html),void 0!==t.updated_template){var c=t.updated_template_type,t=t.updated_template,s=jQuery(t).find(".wp-list-table tbody tr").length,i=jQuery('[aria-controls="spbc_scan_accordion_tab_'+c+'"]');if(0n&&jQuery(t).css("outline","1px solid green")}),i.click()}else"analysis_log"===c&&(o='",c='