diff --git a/js/spbc-settings_tab--scanner.min.js b/js/spbc-settings_tab--scanner.min.js index b65dcbf9..1387c67d 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,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,s=document.documentElement.clientHeight/100*75;let a=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(s in l){var p,_="spbc-dialog-row-header-"+s.toLowerCase(),u='',d=(u+=s+" weakspots:",jQuery("#spbc_dialog")),u=(d.append(a.printf("",u)),d.append(a.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[s]){p=[...new Set(p)].sort();var b,f=+i[s][p];for(let e=f-2;e<=2+f;e++)void 0!==o.file[e]&&(b=f===e?'
%s

%s


':a,d.append(b.printf(e,o.file[e])));d.append(a.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 s,a='
%s

%s


';let t=[];for(s in c.weak_spots=JSON.parse(c.weak_spots),c.weak_spots)t=t.concat(Object.keys(c.weak_spots[s]));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


':a,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(a.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='
',s=(c=c+'

%s

%s'+'

%s


',(t=t+'

%s

%s'+'

%s


').printf('Modified',"Line",'Original'));jQuery("#spbc_dialog").append(s);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 s=19*jQuery("#spbc_dialog div").length+19,a=document.documentElement.clientHeight/100*75;let r=s{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){console.log(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)})}); +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 ac772ae5..77ab21a1 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\n/**\n * Show copy log to clipboard hint\n * @param {string} text\n */\nfunction spbcScannerCopyLogToClipboardHint(text) {\n console.log(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,SAAS,EAAED,IAAM,EAC/BE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K,EAC3CC,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 +{"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,SAAS,EAAED,IAAM,EAC/BE,KAAMtB,EAASqB,SAAS,EAAEC,KAAO,EACrC,CAAC,EACLN,EAAIE,OAAO,2DAA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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/src/spbc-settings_tab--scanner.js b/js/src/spbc-settings_tab--scanner.js index de049bb6..0f8643bf 100644 --- a/js/src/spbc-settings_tab--scanner.js +++ b/js/src/spbc-settings_tab--scanner.js @@ -677,7 +677,6 @@ function spbcScannerButtonClearScanResults() { // eslint-disable-line no-unused- * @param {string} text */ function spbcScannerCopyLogToClipboardHint(text) { - console.log(text); jQuery('#spbc_scanner_copy_log_to_clipboard_hint').text(text); jQuery('#spbc_scanner_copy_log_to_clipboard_hint').show(); jQuery('#spbc_scanner_copy_log_to_clipboard_hint').animate({opacity: 0}, 3000, function() {