Server : Apache/2.4.43 (Win64) OpenSSL/1.1.1g PHP/7.4.6 System : Windows NT USER-PC 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) AMD64 User : User ( 0) PHP Version : 7.4.6 Disable Function : NONE Directory : C:/Program Files/Avast Software/Avast/gui_resources/default_av/ |
//{"name":"Sandbox","version":"1.2.277","created":"2021-03-09T09:35:12.139Z"} import e from"./ractive.js";import{eventer as t,napiTracker as s,serviceRequest as i}from"./napi.js";import{productModel as n,ipmService as o,napiUtils as a}from"./napiExtensions.js";import{logger as l}from"./libs.js";import r from"./ractiveComponents.js";import{nls as d}from"./i18n.js";const p=e.extend({template:{v:3,t:[{t:7,e:"Page",a:{heading:[{t:3,x:{r:["nls"],s:'_0("sandbox")'}}],cssCls:"snx",settingsUrl:"#Settings/Sandbox",upsell:[{t:2,x:{r:["licensed"],s:"!_0"}}],backHash:"#security"},f:[{t:7,e:"div",a:{slot:"breadcrumbs"},f:[{t:7,e:"Crumbs",a:{section:"security",moduleId:"sandbox"}}]}," ",{t:4,f:[{t:7,e:"div",a:{slot:"upsell"},f:[{t:7,e:"Upsell",a:{desc:[{t:3,x:{r:["nls"],s:'_0("upsell.desc.sandbox")'}}],animation:[{t:2,r:"UPSELL_ANIMATION"}]}}]}],n:50,x:{r:["loading","licensed"],s:"!_0&&!_1"}}," ",{t:7,e:"div",a:{slot:"page-content"},f:[{t:7,e:"kin-view",a:{loading:[{t:2,r:"loading"}]},f:[{t:7,e:"div",a:{slot:"description"},f:[{t:7,e:"p",a:{class:"kin_description__text"},f:[{t:3,x:{r:["nls"],s:'_0("sandbox.desc")'}}]}]}," ",{t:7,e:"div",a:{slot:"cta"},f:[{t:7,e:"kin-button",v:{click:"selectFile"},a:{"data-test":"snx_run"},f:[{t:3,x:{r:["nls"],s:'_0("sandbox.runApp")'}}]}]}," ",{t:7,e:"div",a:{slot:"view-content"},f:[{t:7,e:"kin-table",a:{datalength:[{t:2,r:"processesLength"}],selecteditems:[{t:2,r:"selectedProcesses.length"}]},f:[{t:7,e:"div",a:{slot:"table-header",role:"row"},f:[{t:7,e:"input",v:{click:"selectAllProcesses"},a:{type:"checkbox",class:["checkbox snx_header-checkbox ",{t:4,f:["-some-checked"],n:50,x:{r:["processesLength","selectedProcesses.length"],s:"_0!==_1&&_1>0"}}," ",{t:4,f:["-checked"],n:50,x:{r:["processesLength","selectedProcesses.length"],s:"_0===_1&&_1>0"}}],disabled:[{t:2,x:{r:["processesLength"],s:"_0===0"}}],checked:[{t:2,x:{r:["selectedProcesses.length"],s:"_0>0"}}],title:[{t:2,x:{r:["nls"],s:'_0("global.selectAllItems")'}}]}}," ",{t:7,e:"div"}," ",{t:7,e:"div",a:{role:"columnheader"},f:[{t:3,x:{r:["nls"],s:'_0("sandbox.processName")'}}]}," ",{t:7,e:"div",a:{role:"columnheader"},f:[{t:3,x:{r:["nls"],s:'_0("sandbox.processID")'}}]}," ",{t:7,e:"div"}]}," ",{t:7,e:"div",a:{slot:"table-body"},f:[{t:4,f:[{t:7,e:"div",a:{role:"row",class:"kin_table__row","data-test":["table-row-",{t:2,r:"@index"}],"aria-rowindex":[{t:2,r:"@index"}]},f:[{t:7,e:"input",v:{click:{n:"selectProcess",d:[{t:2,r:"pid"}]}},a:{type:"checkbox",class:"checkbox snx_row-checkbox",checked:[{t:2,x:{r:["selectedProcesses","pid"],s:"_0.includes(_1)"}}],id:["snx-item-",{t:2,r:"@index"}],title:[{t:2,x:{r:["nls","global.selectItem"],s:"_0(_1)"}}],twoway:"false"}}," ",{t:7,e:"div",f:[{t:7,e:"ImgIcon",a:{src:["data:gif/png;base64,",{t:2,rx:{r:"icons",m:[{t:30,n:"pid"}]}}],cssCls:"g-font--24"}}]}," ",{t:7,e:"div",a:{class:"kin_table__name",dir:"ltr"},f:[{t:7,e:"label",a:{"data-test":"dnd_list__item-path",id:["snx-tooltip-",{t:2,r:"@index"}],class:"g-ellipsis",for:["snx-item-",{t:2,r:"@index"}]},f:[{t:2,r:"path"}]}," ",{t:7,e:"Tooltip",a:{openerSelector:["#snx-tooltip-",{t:2,r:"@index"}],showOnEllipsis:"true",position:"bottom",alignment:"left"},f:[{t:2,r:"path"}]}]}," ",{t:7,e:"div",a:{"data-test":["snx_pid-",{t:2,r:"@index"}]},f:[{t:2,r:"pid"}]}," ",{t:7,e:"div",a:{class:"kin_table__actions"},f:[{t:4,f:[{t:7,e:"div",f:[{t:7,e:"kin-button",v:{click:{n:"toggleExpansion",d:[{t:2,r:"pid"}]}},a:{type:"blank",size:"small",icononly:0,title:[{t:2,x:{r:["isExpanded","nls"],s:'_0?_1("global.clickToHide"):_1("global.clickToExpand")'}}]},f:[{t:7,e:"kin-icon",a:{name:[{t:2,x:{r:["isExpanded"],s:'_0?"icon-s-controls-arrow-up":"icon-s-controls-arrow-down"'}}],size:"16"}}]}," ",{t:7,e:"Tooltip",a:{position:"top",alignment:"center"},f:[{t:2,x:{r:["isExpanded","nls"],s:'_0?_1("global.clickToHide"):_1("global.clickToExpand")'}}]}]}],n:50,r:"children"}," ",{t:7,e:"div",f:[{t:7,e:"kin-button",v:{click:{n:"terminateProcess",d:[{t:2,r:"pid"}]}},a:{type:"blank",size:"small",icononly:0,"data-test":"requestDeleteConfirm",title:[{t:3,x:{r:["nls"],s:'_0("sandbox.closeApplication",1)'}}]},f:[{t:7,e:"kin-icon",a:{name:"icon-s-controls-close",size:"10"}}]}," ",{t:7,e:"Tooltip",a:{position:"top",alignment:"center"},f:[{t:3,x:{r:["nls"],s:'_0("sandbox.closeApplication",1)'}}]}]}]}]}," ",{t:4,f:[{t:7,e:"div",a:{role:"row",class:"kin_table__row -details"},f:[{t:4,f:[{t:7,e:"div"}," ",{t:7,e:"div",a:{class:"kin_table__details"},f:[{t:2,r:"path"}]}," ",{t:7,e:"div",a:{class:"kin_table__details"},f:[{t:2,r:"pid"}]}," ",{t:7,e:"div"}],i:"pid",r:"children"}]}],n:50,x:{r:["children","isExpanded"],s:"_0&&_1"}}],i:"pid",r:"processes"}]}," ",{t:7,e:"div",a:{slot:"table-empty-icon",class:"svg -empty-table"}}," ",{t:7,e:"div",a:{slot:"table-empty"},f:[{t:7,e:"p",f:[{t:3,x:{r:["nls"],s:'_0("sandbox.noProcesses.desc.1")'}}]}," ",{t:7,e:"p",f:[{t:3,x:{r:["nls"],s:'_0("sandbox.noProcesses.desc.2")'}}]}]}]}]}," ",{t:7,e:"div",a:{slot:"view-actions"},f:[{t:7,e:"div",a:{class:"kin_actions__left"},f:[{t:3,x:{r:["nls","selectedProcesses.length"],s:'_0("sandbox.applicationsSelected",_1)'}}]}," ",{t:7,e:"div",f:[{t:7,e:"button",v:{click:"terminateSelectedProcesses"},a:{class:"btn -small","data-test":"snx_terminate-all"},f:[{t:3,x:{r:["nls","selectedProcesses.length"],s:'_0("sandbox.closeApplication",_1)'}}]}]}," ",{t:7,e:"div",a:{class:"kin_actions__right"},f:[{t:3,x:{r:["nls"],s:'_0("global.escToDeselect")'}}]}]}]}]}]}]},css:"[slot='table-header'],\n.kin_table__row {\n grid-template-columns: 6% 61% 25% 8%;\n}\n",data:function(){return{UPSELL_ANIMATION:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKoAAACqCAMAAAAKqCSwAAAAh1BMVEUAAACsuPOVqt6TpdyNpduModaVq9+PodaNodaMotaQpNiMoNWNoNWMn9WOoNiKn9SLn9WKn9SMoNWMoNWLn9SLoNSLn9SLn9SLn9WMoNaLoNWLn9WNoNaLn9SLn9SLn9SLn9SKn9SMn9SLn9SLn9SKn9WLn9SLn9SLn9SMoNWLoNWLn9SKntP1xr3tAAAALHRSTlMABAsQFS8HHisiGlE/Tib4Ru5LOY9lxLFtQ16KNLqqz5Xjftucg3lz6VlVpHObBDUAAAc/SURBVHja7NjbrppAAIXhf2AEUSyigoiKeK467/98zW532zAbiqI1Q8J3pyaTBSznAJ1Op9PpdDqdTqfT6XQ+nPffaIk8bk3UD7ODTUskwRXTifjMBwumY4w2URM+HVSEyRyf38RlgHBoizw0tQVeon8xN/XvdQv4anQYYJ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Gi1zu/Z5T+YCV5LUsYCKHWrbNbl0tJ9jJDEoZ36WS+a3d00gkwIglxYllhBIJm47Q29bhQMS+dYn6Ij6eiIstMmApYpGJmBRSOvyEqZqN0VaGFvidRDcxwfsiCuxG0laWqXOXrJGRcZfwmxRA0UjTj/sg9OYFXf/5T3/5BYyLgHfZxULxAAAAAElFTkSuQmCC",processes:{},selectedProcesses:[],icons:{},product:n.getProduct(),licensed:n.isLicensed("sandbox"),loading:!0}},computed:{processesLength:function(){return Object.keys(this.get("processes")).length}},oninit(){this.log=l.createLogger("sandbox"),this.log.info("oninit"),this.deselectAll=function(){this.get("selectedProcesses").length>0&&this.selectAllProcesses(!1)},this._deselectAllBind=this.deselectAll.bind(this),window.addEventListener("kin-deselectAll",this._deselectAllBind),this.polling=null,this.offProductChanged=t.on("product.change.state.product",(e=>{this.log.debug("product changed; product: "+e),this.set("product",e)})),this.offFeatureChanged=t.on("product.change.feature.sandbox",(e=>{this.log.debug("feature changed; data: "+JSON.stringify(e)),void 0!==e.licensed&&this.set("licensed",e.licensed)})),this.observe("licensed",((e,t)=>{this.log.info('licensed changed from "'+t+'" to "'+e+'"'),e?this.initialize():this.terminate()})),this.on("Upsell.init",(()=>{s.event("Upsell","View")})),this.on("toggleExpansion",((e,t)=>{const s=this.get("processes")[t];s.isExpanded=!s.isExpanded,this.update("processes")})),this.on("Upsell.buy",(function(){o.openWindow(343)})),this.observe("status.processes",(e=>{this.updateProcesses(e)})),this.on("terminateProcess",((e,t)=>{"all"===t?i("app.sandbox.KillSandboxedProcesses").then((()=>{this.log.info("all processes killed"),this.set("processes",{}),this.set("selectedProcesses",[])})).catch((e=>{this.log.error("killing sandbox processes failed",e)})):i("app.sandbox.KillSandboxedProcess",parseInt(t)).then((()=>{this.log.info("process killed; id: "+t);const e=this.get("processes");delete e[t],this.set("processes",e);const s=this.get("selectedProcesses");s.splice(s.indexOf(t),1),this.set("selectedProcesses",s)})).catch((e=>{this.log.error("killing sandbox process "+t+" failed",e);const s=this.get("selectedProcesses");s.splice(s.indexOf(t),1),this.set("selectedProcesses",s)}))})),this.on("terminateSelectedProcesses",(()=>{const e=this.get("processesLength"),t=this.get("selectedProcesses");if(e===t.length)i("app.sandbox.KillSandboxedProcesses").then((()=>{this.log.info("all processes killed"),this.set("processes",{}),this.set("selectedProcesses",[])})).catch((e=>{this.log.error("killing sandbox processes failed",e)}));else{const e=t.map((e=>setTimeout((()=>i("app.sandbox.KillSandboxedProcess",parseInt(e))),1e3*Math.random())));Promise.all(e).then((()=>{this.set("selectedProcesses",[])})).catch((e=>{this.log.error("killing sandbox processes failed",e)}))}})),this.on("selectAllProcesses",(e=>{this.selectAllProcesses(e.node.checked)})),this.on("selectProcess",((e,t)=>{const s=e.node.checked,i=this.get("selectedProcesses");s?i.push(t):i.splice(i.indexOf(t),1),this.set("selectedProcesses",i)})),this.on("selectFile",(()=>(this.log.debug("opening dialog to select an app"),i("app.sandbox.RunVirtualizeProcess").then((e=>(this.log.info("running virutalize process: "+(e&&JSON.stringify(e))),this.sandBoxFile().catch((e=>{this.log.error("running virutalize process failed",e)})))))))),this.initialize()},onteardown(){this.log.info("onteardown"),this.terminate(),this.offProductChanged&&this.offProductChanged(),this.offFeatureChanged&&this.offFeatureChanged(),window.removeEventListener("kin-deselectAll",this._deselectAllBind),this._deselectAllBind=void 0},selectAllProcesses(e){let t=[];e&&(t=Object.keys(this.get("processes"))),this.set("selectedProcesses",t)},initialize(){this.log.info("initialize"),this.get("licensed")?this.updateStatus().then((()=>{this.set("loading",!1)})):(this.log.info("...not licensed"),this.set("loading",!1))},terminate(){this.log.info("terminate"),clearTimeout(this.timer),this.timer=null},updateStatus(){return i("app.sandbox.GetStatus").then((e=>this.set("status",e))).catch((e=>{this.log.error("getting status failed",e)}))},updateProcesses(e){this.log.debug("updateProcesses"),clearTimeout(this.timer);const t=this.get("icons"),s={};try{e&&e.map((t=>(function(t){for(let s=0,i=e.length;s<i;s++)if(t==e[s].id)return!1;return!0}(t.parentId)&&(t.parentId=0),t))).sort(((e,t)=>e.parentId-t.parentId)).forEach((e=>{e.children={};const i=this.get("processes")[e.id];e.isExpanded=i&&i.isExpanded,e.fileName=e.path.split("\\").pop(),t[e.id]||this.loadIcon(e),0==e.parentId?s[e.id]=e:s[e.parentId].children[e.id]=e})),this.timer=setTimeout((()=>{this.updateStatus()}),1e3);const i=this.get("selectedProcesses");return this.set("selectedProcesses",i.filter((e=>Boolean(s[e])))),this.set("processes",s)}catch(i){this.log.error("updateProcesses ERROR!",i)}},sandBoxFile(){return this.updateStatus()},loadIcon(e){return i("app.utils.GetShellIcon",{path:e.path,size:"large"}).then((t=>this.set("icons."+e.id,t.data)))}}),c=l.createLogger("sandbox.settings"),h={title:"sandbox",desc:"sandbox.settings.desc",showInContextMenu:"sandbox.settings.showInContextMenu",allowInternet:"sandbox.settings.allowInternet",saveTrustedFiles:"sandbox.settings.saveTrustedFiles",virtualizedApps:"sandbox.settings.virtualizedApps",addApp:"sandbox.settings.addApp"},g={showInContextMenu:{label:d(h.showInContextMenu),path:"snx://Sandbox/Common/ShellIntegration",track:{subject:"Show in context menu"},search:h.showInContextMenu},allowInternet:{id:"sandbox_settings_allowInternet",label:d(h.allowInternet),load:function(){return i("app.settings.Get",{name:"snx://Sandbox/Common/IAcessFlags"}).then((e=>({locked:e.locked,value:9===e.value})))},change:function(e){return i("app.settings.Set",{name:"snx://Sandbox/Common/IAcessFlags",value:e?9:10})},testAttr:{name:"snx://Sandbox/Common/IAcessFlags"},track:{subject:"Allow internet access"},search:h.allowInternet},saveTrustedFiles:{label:d(h.saveTrustedFiles),path:"snx://Sandbox/Web/SmartVirt",track:{subject:"Save trusted files"},search:h.saveTrustedFiles},virtualizedApps:{id:"sandbox_settings_virtualizedApps",list:[],search:{title:h.virtualizedApps,others:[h.addApp]}}},x={title:h.title,desc:h.desc,items:g},u=e.extend({template:{v:3,t:[{t:7,e:"SettingsContainer",a:{component:[{t:2,r:"component"}],title:[{t:3,x:{r:["nls","STRINGS.title"],s:"_0(_1)"}}],desc:[{t:3,x:{r:["nls","STRINGS.desc"],s:"_0(_1)"}}],noEnable:"true"},f:[{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.showInContextMenu"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.allowInternet"}]}}," ",{t:7,e:"SettingsCheckbox",a:{property:[{t:2,r:"properties.saveTrustedFiles"}]}}," ",{t:7,e:"p",a:{id:[{t:2,r:"properties.virtualizedApps.id"}],class:"p -small -secondary g-margin-top--30"},f:[{t:3,x:{r:["nls","STRINGS.virtualizedApps"],s:"_0(_1)"}}]}," ",{t:7,e:"button",a:{class:"btn -secondary g-margin-top--15"},v:{click:"showAppList"},f:[{t:7,e:"kin-icon",a:{name:"icon-s-add",size:"16",class:"g-margin-right--5"}}," ",{t:3,x:{r:["nls","STRINGS.addApp"],s:"_0(_1)"}}]}," ",{t:7,e:"table",a:{class:"table -small -fixed g-margin-top--10"},f:[{t:7,e:"colgroup",f:[{t:7,e:"col",a:{width:"40%"}}," ",{t:7,e:"col",a:{width:"50%"}}," ",{t:7,e:"col",a:{width:"10%"}}]}," ",{t:4,f:[{t:7,e:"tr",f:[{t:7,e:"td",f:[{t:7,e:"p",a:{id:["app-name-tooltip-opener-",{t:2,r:"index"}],class:"p -small -secondary g-ellipsis"},f:[{t:2,r:"name"}]}," ",{t:7,e:"Tooltip",a:{openerSelector:["#app-name-tooltip-opener-",{t:2,r:"index"}],showOnEllipsis:"true",cssCls:"-link",position:"bottom",alignment:"left"},f:[{t:2,r:"name"}]}]}," ",{t:7,e:"td",f:[{t:7,e:"p",a:{id:["app-path-tooltip-opener-",{t:2,r:"index"}],class:"p -small -secondary g-ellipsis"},f:[{t:2,r:"path"}]}," ",{t:7,e:"Tooltip",a:{openerSelector:["#app-path-tooltip-opener-",{t:2,r:"index"}],showOnEllipsis:"true",cssCls:"-link",position:"bottom",alignment:"left"},f:[{t:2,r:"path"}]}]}," ",{t:7,e:"td",a:{class:"table__delete"},f:[{t:7,e:"div",f:[{t:7,e:"Tooltip",a:{position:"top",alignment:"center"},f:[{t:3,x:{r:["nls"],s:'_0("global.remove")'}}]}," ",{t:7,e:"button",a:{class:"a"},v:{click:{n:"removeApp",d:[{t:2,r:"index"}]}},f:[{t:7,e:"kin-icon",a:{name:"icon-s-controls-bin",size:"16"}}]}]}]}]}],n:52,i:"index",r:"properties.virtualizedApps.list"}]}]}," ",{t:4,f:[{t:7,e:"InstalledApps",a:{title:[{t:3,x:{r:["nls","STRINGS.addApp"],s:"_0(_1)"}}],addedAppPaths:[{t:2,r:"virtualizedAppPaths"}]}}],n:50,r:"showAppList"}]},components:{InstalledApps:r.InstalledApps},data:function(){return{STRINGS:h,properties:g,component:"sandbox",showAppList:!1}},computed:{virtualizedAppPaths:function(){return this.get("properties.virtualizedApps.list").map((e=>e.path))}},oninit(){this.on("showAppList",(()=>{t.emit("Settings.gaTrack","Open the add app dialog"),this.set("showAppList",!0)})),this.on("InstalledApps.close",(()=>{t.emit("Settings.gaTrack","Close the add app dialog"),this.set("showAppList",!1)})),this.on("InstalledApps.appSelected",this.addApp.bind(this)),this.on("removeApp",(e=>{this.removeApp(e.index.index)})),this.readyPromise=this.loadVirtualizedApps()},loadVirtualizedApps(){return i("app.settings.Get",{name:"snx://Sandbox/Common/ListVirt"}).then((e=>{const t=e.value.map((e=>a.injectAppData({path:e[0]},{requestedData:{name:!0}})));return Promise.all(t).then((e=>{this.set("properties.virtualizedApps.list",e)}))})).catch((e=>{c.error("loading virtualized apps failed",e)}))},addApp(e){t.emit("Settings.gaTrack","Add app",e.name),this.get("properties.virtualizedApps.list").push(e),this.saveApps()},removeApp(e){const s=this.get("properties.virtualizedApps.list");t.emit("Settings.gaTrack","Remove app",s[e].name),s.splice(e,1),this.set("properties.virtualizedApps.list",s),this.saveApps()},saveApps(){i("app.settings.Set",{name:"snx://Sandbox/Common/ListVirt",value:[this.get("properties.virtualizedApps.list").map((e=>e.path))]})}}),b="snx://Sandbox/Flags/Driver",m=[{label:"Override the maximum copy filesize limit and specify the size manually (MB)",desc:"Format is enabled;limit (integer:integer), enabled must be 0 or 1 and limit is in MB and must be a positive integer (e.g. 1;50)",path:"snx://Sandbox/Common/CopyLimit",type:"text",regex:/^[0-1];[1-9][0-9]*$/},{label:"Drop administrative rights and run virtualized applications as a limited user",path:"snx://Sandbox/Common/DropRights",type:"checkbox"},{label:"Select the drive where you want to keep the sandbox storage",path:b,type:"select",options:[{label:"The same drive as the modified file",value:"per_volume"}]},{label:"Cache web browser's files (sandbox will not be automatically deleted)",path:"snx://Sandbox/Web/Storage",type:"checkbox"},{id:"sandbox_deleteCache",label:"Delete cached contents",desc:null,action:i.bind(null,"av.command","app:snx_delete_contents"),type:"button"},{label:"Generate report file",path:"snx://Sandbox/Common/ReportFileEnable",type:"checkbox"}];function f(){return Promise.all([i("app.utils.GetDriveList"),i("app.sandbox.GetStatus")]).then((e=>{const t=e[0],s=e[1],i=m.find((e=>e.path===b)),n=m.find((e=>"sandbox_deleteCache"===e.id));return i.options.length=1,t.forEach((e=>{i.options.push({label:e.label,value:e.id})})),n.desc="The sandbox is currently occupying "+s.webStorageSize_MB+" MB of hard disk space.",m})).catch((e=>(console.error("loading drive list or sandbox status failed",e),console.info("..filtering the drive prop out cuz we do not have the drive list"),m.filter((e=>e.path!==b)))))}export default p;export{u as settings,f as settingsGeek,x as settingsSearchStrings};const v={name:"Sandbox",version:"1.2.277",created:"2021-03-09T09:35:12.139Z"};export{v as metadata};