diff --git a/MeshCentralServer.njsproj b/MeshCentralServer.njsproj index 37d1ba17..9776ea5b 100644 --- a/MeshCentralServer.njsproj +++ b/MeshCentralServer.njsproj @@ -51,12 +51,14 @@ + + diff --git a/agents/modules_meshcore/amt-manage.js b/agents/modules_meshcore/amt-manage.js index 2d8a294a..b0e9b786 100644 --- a/agents/modules_meshcore/amt-manage.js +++ b/agents/modules_meshcore/amt-manage.js @@ -26,7 +26,7 @@ limitations under the License. */ function AmtManager(agent, db, isdebug) { var sendConsole = function (msg) { agent.SendCommand({ "action": "msg", "type": "console", "value": msg }); } - var debug = function (msg) { if (isdebug) { sendConsole('amt-manager: ' + msg); } } + var debug = function (msg) { if (isdebug) { sendConsole('amt-manager: ' + msg + '
'); } } var amtMei = null, amtMeiState = 0; var amtLms = null, amtLmsState = 0; var amtGetVersionResult = null; @@ -38,13 +38,12 @@ function AmtManager(agent, db, isdebug) { obj.lmsstate = 0; obj.onStateChange = null; obj.setDebug = function (x) { isdebug = x; } - + // Set current Intel AMT activation policy obj.setPolicy = function (policy) { if (JSON.stringify(amtpolicy) != JSON.stringify(policy)) { amtpolicy = policy; - //debug('AMT policy set: ' + JSON.stringify(policy)); - obj.applyPolicy(); + if (applyPolicyTimer == null) { obj.applyPolicy(); } } } @@ -159,7 +158,7 @@ function AmtManager(agent, db, isdebug) { amtMeiState = 3; obj.state = 3; if (obj.onStateChange != null) { obj.onStateChange(amtMeiState); } - obj.applyPolicy(); + if (applyPolicyTimer == null) { obj.applyPolicy(); } //var AllWsman = "CIM_SoftwareIdentity,IPS_SecIOService,IPS_ScreenSettingData,IPS_ProvisioningRecordLog,IPS_HostBasedSetupService,IPS_HostIPSettings,IPS_IPv6PortSettings".split(','); //osamtstack.BatchEnum(null, AllWsman, startLmsWsmanResponse, null, true); @@ -490,7 +489,7 @@ function AmtManager(agent, db, isdebug) { } // Apply Intel AMT policy - var intelAmtAdminPass, wsstack, amtstack, applyPolicyTimer; + var intelAmtAdminPass, wsstack, amtstack, applyPolicyTimer, policyWsmanRetry = 0; obj.applyPolicy = function () { applyPolicyTimer = null; if ((amtMeiState != 3) || (typeof amtpolicy != 'object') || (typeof amtpolicy.type != 'number') || (amtpolicy.type == 0)) return; @@ -514,33 +513,137 @@ function AmtManager(agent, db, isdebug) { var amt = require('amt'); wsstack = new wsman(transport, '127.0.0.1', 16992, 'admin', intelAmtAdminPass, false); amtstack = new amt(wsstack); - try { amtstack.BatchEnum(null, ['*AMT_GeneralSettings', '*IPS_HostBasedSetupService', '*AMT_RedirectionService', '*CIM_KVMRedirectionSAP'], wsmanPassTestResponse); } catch (ex) { debug(ex); } + var wsmanQuery = ['*AMT_GeneralSettings', '*IPS_HostBasedSetupService', '*AMT_RedirectionService', '*CIM_KVMRedirectionSAP', 'AMT_PublicKeyCertificate', '*AMT_EnvironmentDetectionSettingData']; + if (amtpolicy.cirasetup == 2) { wsmanQuery.push("AMT_ManagementPresenceRemoteSAP", "AMT_RemoteAccessCredentialContext", "AMT_RemoteAccessPolicyAppliesToMPS", "AMT_RemoteAccessPolicyRule", "*AMT_UserInitiatedConnectionService", "AMT_MPSUsernamePassword"); } + try { amtstack.BatchEnum(null, wsmanQuery, wsmanPassTestResponse); } catch (ex) { debug(ex); } } else { // Other possible cases... } }); } - var wsmanPassTestResponse = function (stack, name, responses, status) { + function wsmanPassTestResponse(stack, name, responses, status) { if (status != 200) { - if (amtpolicy.badpass == 1) { obj.deactivateCCM(); } // Something went wrong, reactivate. - } else { - /* - var redir = (amtsysstate['AMT_RedirectionService'].response["ListenerEnabled"] == true); - var sol = ((amtsysstate['AMT_RedirectionService'].response["EnabledState"] & 2) != 0); - var ider = ((amtsysstate['AMT_RedirectionService'].response["EnabledState"] & 1) != 0); - var kvm = false; - if (amtsysstate['CIM_KVMRedirectionSAP'] != null) { - kvm = ((amtsysstate['CIM_KVMRedirectionSAP'].response["EnabledState"] == 6 && amtsysstate['CIM_KVMRedirectionSAP'].response["RequestedState"] == 2) || amtsysstate['CIM_KVMRedirectionSAP'].response["EnabledState"] == 2 || amtsysstate['CIM_KVMRedirectionSAP'].response["EnabledState"] == 6); + if (status == 401) { + if (amtpolicy.badpass == 1) { obj.deactivateCCM(); } // Incorrect password, reactivate + } else { + if (++policyWsmanRetry < 20) { + if (policyWsmanRetry == 10) { debug('WSMAN fault, MEI Reset'); obj.reset(); } + var wsmanQuery = ['*AMT_GeneralSettings', '*IPS_HostBasedSetupService', '*AMT_RedirectionService', '*CIM_KVMRedirectionSAP', 'AMT_PublicKeyCertificate', '*AMT_EnvironmentDetectionSettingData']; + if (amtpolicy.cirasetup == 2) { wsmanQuery.push("AMT_ManagementPresenceRemoteSAP", "AMT_RemoteAccessCredentialContext", "AMT_RemoteAccessPolicyAppliesToMPS", "AMT_RemoteAccessPolicyRule", "*AMT_UserInitiatedConnectionService", "AMT_MPSUsernamePassword"); } + try { amtstack.BatchEnum(null, wsmanQuery, wsmanPassTestResponse); } catch (ex) { debug(ex); } + } else { + debug('WSMAN fault, status=' + status); + policyWsmanRetry = 0; + } + } + } else { + policyWsmanRetry = 0; + var s = {}; + s.redir = (responses['AMT_RedirectionService'].response["ListenerEnabled"] == true); + s.sol = ((responses['AMT_RedirectionService'].response["EnabledState"] & 2) != 0); + s.ider = ((responses['AMT_RedirectionService'].response["EnabledState"] & 1) != 0); + s.kvm = (responses['CIM_KVMRedirectionSAP'] != null) && ((responses['CIM_KVMRedirectionSAP'].response["EnabledState"] == 6 && responses['CIM_KVMRedirectionSAP'].response["RequestedState"] == 2) || responses['CIM_KVMRedirectionSAP'].response["EnabledState"] == 2 || responses['CIM_KVMRedirectionSAP'].response["EnabledState"] == 6); + + // Enable Ping and RMCP if disabled + if ((responses['AMT_GeneralSettings'].response['PingResponseEnabled'] != true) || (responses['AMT_GeneralSettings'].response['RmcpPingResponseEnabled'] != true)) { + responses['AMT_GeneralSettings'].response['PingResponseEnabled'] = true; + responses['AMT_GeneralSettings'].response['RmcpPingResponseEnabled'] = true; + amtstack.Put('AMT_GeneralSettings', responses['AMT_GeneralSettings'].response, function (stack, name, response, status) { if (status != 200) { debug("Enable PING PUT Error " + status); } }, 0, 1) } - */ - // Success, make sure - debug('SUCCESS!' + JSON.stringify(responses)); - // TODO: Check Intel AMT Features need to be enabled & if Intel AMT CIRA needs to be setup + // Enable redirection port, SOL and IDER if needed + if ((s.redir == false) || (s.sol == false) || (s.ider == false)) { + var r = responses['AMT_RedirectionService'].response; + r["ListenerEnabled"] = true; // Turn on the redirection port + r["EnabledState"] = 32768 + 1 + 2; // Turn on IDER (1) and SOL (2) + amtstack.AMT_RedirectionService_RequestStateChange(r["EnabledState"], function (stack, name, response, status) { if (status != 200) { debug("Enable Redirection EXEC Error " + status); } }); + } + + // Enable KVM if needed + if ((responses['CIM_KVMRedirectionSAP'] != null) && (s.kvm == false)) { + amtstack.CIM_KVMRedirectionSAP_RequestStateChange(2, 0, + function (stack, name, response, status) { + if (status != 200) { messagebox("Error", "KVMRedirectionSAP, RequestStateChange Error " + status); return; } + amtstack.Put("AMT_RedirectionService", r, function (stack, name, response, status) { if (status != 200) { debug("Enable KVM PUT Error " + status); } }, 0, 1) + } + ); + } + + // Check if the MeshCentral root certificate is present + if (typeof amtpolicy.rootcert == 'string') { + var rootFound = false, xxCertificates = responses["AMT_PublicKeyCertificate"].responses; + for (var i in xxCertificates) { if ((xxCertificates[i]["X509Certificate"] == amtpolicy.rootcert) && (xxCertificates[i]["TrustedRootCertficate"] == true)) { rootFound = true; } } + if (rootFound == false) { amtstack.AMT_PublicKeyManagementService_AddTrustedRootCertificate(amtpolicy.rootcert, function (stack, name, response, status) { if (status != 200) { debug("Add root cert EXEC Error " + status); } }); } + } + + // If CIRA needs to be setup + if ((amtpolicy.cirasetup == 2) && (amtpolicy.ciraserver != null)) { + var serverFound = false, xxCiraServers = responses["AMT_ManagementPresenceRemoteSAP"].responses; + for (var i in xxCiraServers) { if ((xxCiraServers[i].AccessInfo == amtpolicy.ciraserver.name) && (xxCiraServers[i].Port == amtpolicy.ciraserver.port)) { serverFound = xxCiraServers[i].Name; } } + if (serverFound == false) { + // TODO: Remove all CIRA activation policies. + // amtstack.Delete('AMT_RemoteAccessPolicyRule', { 'PolicyRuleName': name }, editMpsPolicyOk2); + // TODO: Remove all other MPS servers. + + // Add our MPS server + amtstack.AMT_RemoteAccessService_AddMpServer(amtpolicy.ciraserver.name, 201, amtpolicy.ciraserver.port, 2, null, amtpolicy.ciraserver.user, amtpolicy.ciraserver.pass, null, function (stack, name, response, status) { + if (status != 200) { + debug("Add MPS server EXEC Error " + status); + } else { + serverFound = false; + var x = response.Body.MpServer.ReferenceParameters.SelectorSet.Selector; + for (var i in x) { if (x[i]['@Name'] == 'Name') { serverFound = x[i]['Value']; } } + if (serverFound != false) { checkCiraTriggerPolicy(responses, serverFound); } + } + }); + } else { + checkCiraTriggerPolicy(responses, serverFound); + } + } else if (amtpolicy.cirasetup == 1) { + // This call will clear environement detection if needed. + checkEnvironmentDetection(responses); + } } } + function checkCiraTriggerPolicy(responses, serverInstanceName) { + // Check CIRA activation policy + var server1 = '
http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
http://intel.com/wbem/wscim/1/amt-schema/1/AMT_ManagementPresenceRemoteSAP' + serverInstanceName + ''; + amtstack.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(2, 0, 'AAAAAAAAAAo=', [server1], null, function (stack, name, response, status) { + if (status != 200) { + debug("Add AddRemoteAccessPolicyRule Error " + status); + } else { + //debug('AMT_RemoteAccessService_AddRemoteAccessPolicyRule Response:' + JSON.stringify(response)); + checkEnvironmentDetection(responses); + } + }); + } + + // Check environement detection. This will set or clear the environement detection strings as needed. + function checkEnvironmentDetection(responses) { + var t2 = []; + if ((amtpolicy.ciraserver != null) && (amtpolicy.ciraserver.home != null)) { t2 = amtpolicy.ciraserver.home; } + var t = responses["AMT_EnvironmentDetectionSettingData"].response; + t['DetectionStrings'] = MakeToArray(t['DetectionStrings']); + if (CompareStrArrays(t['DetectionStrings'], t2) == false) { + t['DetectionStrings'] = t2; + amtstack.Put('AMT_EnvironmentDetectionSettingData', t, function (stack, name, response, status) { if (status != 200) { debug("Put AMT_EnvironmentDetectionSettingData Error " + status); } }, 0, 1); + } + } + + // Imperfect compare of two string arrays. + function CompareStrArrays(arr1, arr2) { + if (arr1 == arr2) return true; + if (arr1 == null) { arr1 = []; } + if (arr2 == null) { arr2 = []; } + if (arr1.length != arr2.length) return false; + for (var i in arr1) { if (arr2.indexOf(arr1[i]) == -1) return false; } + return true; + } + + function MakeToArray(v) { if (!v || v == null || typeof v == "object") return v; return [v]; }; + } module.exports = AmtManager; diff --git a/agents/modules_meshcore/amt.js b/agents/modules_meshcore/amt.js index 2ceb01d5..7026c76d 100644 --- a/agents/modules_meshcore/amt.js +++ b/agents/modules_meshcore/amt.js @@ -270,7 +270,7 @@ function AmtStackCreateService(wsmanStack) { obj.AMT_RedirectionService_RequestStateChange = function (RequestedState, callback_func) { obj.Exec("AMT_RedirectionService", "RequestStateChange", { "RequestedState": RequestedState }, callback_func); } obj.AMT_RedirectionService_TerminateSession = function (SessionType, callback_func) { obj.Exec("AMT_RedirectionService", "TerminateSession", { "SessionType": SessionType }, callback_func); } obj.AMT_RemoteAccessService_AddMpServer = function (AccessInfo, InfoFormat, Port, AuthMethod, Certificate, Username, Password, CN, callback_func) { obj.Exec("AMT_RemoteAccessService", "AddMpServer", { "AccessInfo": AccessInfo, "InfoFormat": InfoFormat, "Port": Port, "AuthMethod": AuthMethod, "Certificate": Certificate, "Username": Username, "Password": Password, "CN": CN }, callback_func); } - obj.AMT_RemoteAccessService_AddRemoteAccessPolicyRule = function (Trigger, TunnelLifeTime, ExtendedData, MpServer, callback_func) { obj.Exec("AMT_RemoteAccessService", "AddRemoteAccessPolicyRule", { "Trigger": Trigger, "TunnelLifeTime": TunnelLifeTime, "ExtendedData": ExtendedData, "MpServer": MpServer }, callback_func); } + obj.AMT_RemoteAccessService_AddRemoteAccessPolicyRule = function (Trigger, TunnelLifeTime, ExtendedData, MpServer, InternalMpServer, callback_func) { obj.Exec("AMT_RemoteAccessService", "AddRemoteAccessPolicyRule", { "Trigger": Trigger, "TunnelLifeTime": TunnelLifeTime, "ExtendedData": ExtendedData, "MpServer": MpServer, "InternalMpServer": InternalMpServer }, callback_func); } obj.AMT_RemoteAccessService_CloseRemoteAccessConnection = function (_method_dummy, callback_func) { obj.Exec("AMT_RemoteAccessService", "CloseRemoteAccessConnection", { "_method_dummy": _method_dummy }, callback_func); } obj.AMT_SetupAndConfigurationService_CommitChanges = function (_method_dummy, callback_func, tag) { obj.Exec("AMT_SetupAndConfigurationService", "CommitChanges", { "_method_dummy": _method_dummy }, callback_func, tag); } obj.AMT_SetupAndConfigurationService_Unprovision = function (ProvisioningMode, callback_func) { obj.Exec("AMT_SetupAndConfigurationService", "Unprovision", { "ProvisioningMode": ProvisioningMode }, callback_func); } diff --git a/agents/modules_meshcore_min/amt-manage.min.js b/agents/modules_meshcore_min/amt-manage.min.js index 2c0f4fbd..bfd091e9 100644 --- a/agents/modules_meshcore_min/amt-manage.min.js +++ b/agents/modules_meshcore_min/amt-manage.min.js @@ -1 +1 @@ -function AmtManager(c,m,r){var E=function(K){c.SendCommand({action:"msg",type:"console",value:K})};var n=function(K){if(r){E("amt-manager: "+K)}};var g=null,h=0;var e=null,f=0;var d=null;var B=null;var A=null;var j=null;var z=this;z.state=0;z.lmsstate=0;z.onStateChange=null;z.setDebug=function(K){r=K};z.setPolicy=function(K){if(JSON.stringify(j)!=JSON.stringify(K)){j=K;z.applyPolicy()}};var D=0;z.reset=function(){++D;g=null,h=0,e=null,f=0,z.state=0,z.lmsstate=0;try{var K=require("amt-mei");g=new K();g.on("error",function(M){n("MEI error");g=null;h=-1;z.state=-1;z.onStateChange(h)});g.getVersion(function(M){if(M==null){h=-1;z.state=-1;if(z.onStateChange!=null){z.onStateChange(h)}if(D<10){setTimeout(z.reset,10000)}}else{d=M;h=2;z.state=2;D=0;if(z.onStateChange!=null){z.onStateChange(h)}z.lmsreset()}})}catch(L){n("MEI exception: "+L);g=null;h=-1;z.state=-1}};var i=null;z.getAmtInfo=function(L){if((g==null)||(h<2)){if(L!=null){L(null)}return}try{i={Flags:0};g.getProtocolVersion(function(M){if(M!=null){i.MeiVersion=M}});g.getVersion(function(M){if(M){i.Versions={};for(var N in M.Versions){i.Versions[M.Versions[N].Description]=M.Versions[N].Version}}});g.getProvisioningMode(function(M){if(M){i.ProvisioningMode=M.mode}});g.getProvisioningState(function(M){if(M){i.ProvisioningState=M.state}});g.getEHBCState(function(M){if((M!=null)&&(M.EHBC==true)){i.Flags+=1}});g.getControlMode(function(M){if(M!=null){if(M.controlMode==1){i.Flags+=2}if(M.controlMode==2){i.Flags+=4}}});g.getLanInterfaceSettings(0,function(M){if(M){i.net0=M}});g.getLanInterfaceSettings(1,function(M){if(M){i.net1=M}});g.getUuid(function(M){if((M!=null)&&(M.uuid!=null)){i.UUID=M.uuid}});g.getDnsSuffix(function(M){if(M!=null){i.dns=M}if(L!=null){L(i)}})}catch(K){if(L!=null){L(null)}return}};var p=function(N){if((N==null)||(N.Body==null)||(N.Body.MessageID==null)||(N.Body.MessageArguments==null)){return null}var K=N.Body.MessageID,L=N.Body.MessageArguments[0],M=null;switch(K){case"iAMT0050":if(L=="48"){M="Intel® AMT Serial-over-LAN connected"}else{if(L=="49"){M="Intel® AMT Serial-over-LAN disconnected"}}break;case"iAMT0052":if(L=="1"){M="Intel® AMT KVM connected"}else{if(L=="2"){M="Intel® AMT KVM disconnected"}}break;default:break}if(M!=null){c.SendCommand({action:"msg",type:"notify",value:M,tag:"general"})}};z.lmsreset=function(){var K=null,L=0;z.lmsstate=0;try{var N=require("amt-lme");L=1;z.lmsstate=1;K=new N();K.on("error",function(O){L=0;z.lmsstate=0;K=null;n("LMS error");F(1)});K.on("connect",function(){L=2;z.lmsstate=2;n("LMS connected");F(2)});K.on("notify",function(P,Q,R,O){if(O=="iAMT0052-3"){u()}else{p(P)}})}catch(M){L=-1;z.lmsstate=-1;K=null}};var F=function(K){if((g==null)||(h<2)||(d==null)){return}g.getLocalSystemAccount(function(R){if(R==null){return}var P=require("amt-wsman-duk");var Q=require("amt-wsman");var L=require("amt");B=new Q(P,"127.0.0.1",16992,R.user,R.pass,false);A=new L(B);h=3;z.state=3;if(z.onStateChange!=null){z.onStateChange(h)}z.applyPolicy();var M=null;try{for(var O in d.Versions){if(d.Versions[O].Description=="AMT"){M=parseInt(d.Versions[O].Version.split(".")[0])}}}catch(N){}if((M!=null)&&(M>=12)){n("KVM data channel setup");u("skip");z.kvmTempTimer=setInterval(function(){u()},2000);w(JSON.stringify({action:"restart",ver:1}))}})};var u=function(K){A.IPS_KVMRedirectionSettingData_DataChannelRead(z.kvmDataGetResponse,K)};var t=function(N,L,M,O,P){if((P!="skip")&&(O==200)&&(M.Body.ReturnValue==0)){var Q=null;try{Q=Buffer.from(M.Body.DataMessage,"base64").toString()}catch(K){return}if(Q!=null){z.kvmProcessData(M.Body.RealmsBitmap,M.Body.MessageId,Q)}}};var H=null;var v=function(N,M,P){var K=null;try{K=JSON.parse(P)}catch(L){}if((K!=null)&&(K.action)){if(K.action=="present"){w(JSON.stringify({action:"present",ver:1,platform:process.platform}))}if(K.action=="offer"){H={};var O=require("ILibWebRTC");H.webrtc=O.createConnection();H.webrtc.on("connected",function(){});H.webrtc.on("disconnected",function(){z.webRtcCleanUp()});H.webrtc.on("dataChannel",function(Q){H.rtcchannel=Q;H.kvm=mesh.getRemoteDesktopStream();H.kvm.pipe(H.rtcchannel,{dataTypeSkip:1,end:false});H.rtcchannel.on("end",function(){z.webRtcCleanUp()});H.rtcchannel.on("data",function(R){z.kvmCtrlData(this,R)});H.rtcchannel.pipe(H.kvm,{dataTypeSkip:1,end:false})});w(JSON.stringify({action:"answer",ver:1,sdp:H.webrtc.setOffer(K.sdp)}))}}};var s=function(L,N){if(N.length>0&&N.charCodeAt(0)!=123){if(z.fileupload!=null){N=Buffer.from(N,"base64");var T=N.readUInt32BE(0);if((T==16777216)||(T==16777217)){fs.writeSync(z.fileupload.fp,N.slice(4));L.write({action:"upload",sub:"ack",reqid:z.fileupload.reqid});if(T==16777217){fs.closeSync(z.fileupload.fp);z.fileupload=null}}}return}n("KVM Ctrl Data: "+N);try{N=JSON.parse(N)}catch(Q){n("Invalid JSON: "+N);return}if((N.path!=null)&&(process.platform!="win32")&&(N.path[0]!="/")){N.path="/"+N.path}switch(N.action){case"ping":L.write({action:"pong"});break;case"lock":if(process.platform=="win32"){var M=require("child_process");M.execFile(process.env.windir+"\\system32\\cmd.exe",["/c","RunDll32.exe user32.dll,LockWorkStation"],{type:1})}break;case"ls":var W=getDirectoryInfo(N.path);if(N.reqid!=undefined){W.reqid=N.reqid}L.write(W);break;case"mkdir":fs.mkdirSync(N.path);break;case"rm":for(var U in N.delfiles){var S=C.join(N.path,N.delfiles[U]);try{fs.unlinkSync(S)}catch(P){n(P)}}break;case"rename":try{fs.renameSync(C.join(N.path,N.oldname),C.join(N.path,N.newname))}catch(P){n(P)}break;case"download":var Y=0;if(N.sub=="start"){if(z.filedownload!=null){L.write({action:"download",sub:"cancel",id:z.filedownload.id});delete z.filedownload}z.filedownload={id:N.id,path:N.path,ptr:0};try{z.filedownload.f=fs.openSync(z.filedownload.path,"rbN")}catch(P){L.write({action:"download",sub:"cancel",id:z.filedownload.id});delete z.filedownload}if(z.filedownload){L.write({action:"download",sub:"start",id:N.id})}}else{if((z.filedownload!=null)&&(N.id==z.filedownload.id)){if(N.sub=="startack"){Y=8}else{if(N.sub=="stop"){delete z.filedownload}else{if(N.sub=="ack"){Y=1}}}}}while(Y>0){Y--;var K=Buffer.alloc(4096);var V=fs.readSync(z.filedownload.f,K,4,4092,null);z.filedownload.ptr+=V;if(V<4092){K.writeInt32BE(16777217,0);fs.closeSync(z.filedownload.f);delete z.filedownload;Y=0}else{K.writeInt32BE(16777216,0)}L.write(K.slice(0,V+4).toString("base64"))}break;case"upload":if(N.sub=="start"){if(z.fileupload!=null){fs.closeSync(z.fileupload.fp)}if(!N.path||!N.name){break}z.fileupload={reqid:N.reqid};var R=C.join(N.path,N.name);try{z.fileupload.fp=fs.openSync(R,"wbN")}catch(P){}if(z.fileupload.fp){L.write({action:"upload",sub:"start",reqid:z.fileupload.reqid})}else{z.fileupload=null;L.write({action:"upload",sub:"error",reqid:z.fileupload.reqid})}}else{if(N.sub=="cancel"){if(z.fileupload!=null){fs.closeSync(z.fileupload.fp);z.fileupload=null}}}break;case"copy":for(var U in N.names){var X=C.join(N.scpath,N.names[U]),O=C.join(N.dspath,N.names[U]);if(X!=O){try{fs.copyFileSync(X,O)}catch(P){}}}break;case"move":for(var U in N.names){var X=C.join(N.scpath,N.names[U]),O=C.join(N.dspath,N.names[U]);if(X!=O){try{fs.copyFileSync(X,O);fs.unlinkSync(X)}catch(P){}}}break;default:n("Invalid KVM command: "+N);break}};var G=function(){n("webRtcCleanUp");if(H==null){return}if(H.rtcchannel){try{H.rtcchannel.close()}catch(K){}try{H.rtcchannel.removeAllListeners("data")}catch(K){}try{H.rtcchannel.removeAllListeners("end")}catch(K){}delete H.rtcchannel}if(H.webrtc){try{H.webrtc.close()}catch(K){}try{H.webrtc.removeAllListeners("connected")}catch(K){}try{H.webrtc.removeAllListeners("disconnected")}catch(K){}try{H.webrtc.removeAllListeners("dataChannel")}catch(K){}delete H.webrtc}if(H.kvm){try{H.kvm.end()}catch(K){}delete H.kvm}H=null};var w=function(K){A.IPS_KVMRedirectionSettingData_DataChannelWrite(Buffer.from(K).toString("base64"),function(){})};var o=function(K,L){if(fs.existsSync(K)){if(L==true){fs.readdirSync(z.path.join(K,"*")).forEach(function(N,O){var M=z.path.join(K,N);if(fs.statSync(M).isDirectory()){o(M,true)}else{fs.unlinkSync(M)}})}fs.unlinkSync(K)}};var C={join:function(){var M=[];for(var K in arguments){var L=arguments[K];if(L!=null){while(L.endsWith("/")||L.endsWith("\\")){L=L.substring(0,L.length-1)}if(K!=0){while(L.startsWith("/")||L.startsWith("\\")){L=L.substring(1)}}M.push(L)}}if(M.length==0){return"/"}return M.join("/")}};function y(K){return require("MD5Stream").create().syncHash(K).toString("hex")}z.deactivateCCM=function(){g.unprovision(1,function(K){if(K==0){n("Success deactivating Intel AMT CCM.");c.SendCommand({action:"coreinfo",intelamt:{state:0,flags:0}});l=setTimeout(z.applyPolicy,8000)}else{n("Intel AMT CCM deactivation error: "+K)}})};function x(L){var N="",M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var K=0;K")}};var g=null,h=0;var e=null,f=0;var d=null;var F=null;var E=null;var j=null;var D=this;D.state=0;D.lmsstate=0;D.onStateChange=null;D.setDebug=function(P){u=P};D.setPolicy=function(P){if(JSON.stringify(j)!=JSON.stringify(P)){j=P;if(l==null){D.applyPolicy()}}};var I=0;D.reset=function(){++I;g=null,h=0,e=null,f=0,D.state=0,D.lmsstate=0;try{var P=require("amt-mei");g=new P();g.on("error",function(R){q("MEI error");g=null;h=-1;D.state=-1;D.onStateChange(h)});g.getVersion(function(R){if(R==null){h=-1;D.state=-1;if(D.onStateChange!=null){D.onStateChange(h)}if(I<10){setTimeout(D.reset,10000)}}else{d=R;h=2;D.state=2;I=0;if(D.onStateChange!=null){D.onStateChange(h)}D.lmsreset()}})}catch(Q){q("MEI exception: "+Q);g=null;h=-1;D.state=-1}};var i=null;D.getAmtInfo=function(Q){if((g==null)||(h<2)){if(Q!=null){Q(null)}return}try{i={Flags:0};g.getProtocolVersion(function(R){if(R!=null){i.MeiVersion=R}});g.getVersion(function(R){if(R){i.Versions={};for(var S in R.Versions){i.Versions[R.Versions[S].Description]=R.Versions[S].Version}}});g.getProvisioningMode(function(R){if(R){i.ProvisioningMode=R.mode}});g.getProvisioningState(function(R){if(R){i.ProvisioningState=R.state}});g.getEHBCState(function(R){if((R!=null)&&(R.EHBC==true)){i.Flags+=1}});g.getControlMode(function(R){if(R!=null){if(R.controlMode==1){i.Flags+=2}if(R.controlMode==2){i.Flags+=4}}});g.getLanInterfaceSettings(0,function(R){if(R){i.net0=R}});g.getLanInterfaceSettings(1,function(R){if(R){i.net1=R}});g.getUuid(function(R){if((R!=null)&&(R.uuid!=null)){i.UUID=R.uuid}});g.getDnsSuffix(function(R){if(R!=null){i.dns=R}if(Q!=null){Q(i)}})}catch(P){if(Q!=null){Q(null)}return}};var s=function(S){if((S==null)||(S.Body==null)||(S.Body.MessageID==null)||(S.Body.MessageArguments==null)){return null}var P=S.Body.MessageID,Q=S.Body.MessageArguments[0],R=null;switch(P){case"iAMT0050":if(Q=="48"){R="Intel® AMT Serial-over-LAN connected"}else{if(Q=="49"){R="Intel® AMT Serial-over-LAN disconnected"}}break;case"iAMT0052":if(Q=="1"){R="Intel® AMT KVM connected"}else{if(Q=="2"){R="Intel® AMT KVM disconnected"}}break;default:break}if(R!=null){c.SendCommand({action:"msg",type:"notify",value:R,tag:"general"})}};D.lmsreset=function(){var P=null,Q=0;D.lmsstate=0;try{var S=require("amt-lme");Q=1;D.lmsstate=1;P=new S();P.on("error",function(T){Q=0;D.lmsstate=0;P=null;q("LMS error");K(1)});P.on("connect",function(){Q=2;D.lmsstate=2;q("LMS connected");K(2)});P.on("notify",function(U,V,W,T){if(T=="iAMT0052-3"){x()}else{s(U)}})}catch(R){Q=-1;D.lmsstate=-1;P=null}};var K=function(P){if((g==null)||(h<2)||(d==null)){return}g.getLocalSystemAccount(function(W){if(W==null){return}var U=require("amt-wsman-duk");var V=require("amt-wsman");var Q=require("amt");F=new V(U,"127.0.0.1",16992,W.user,W.pass,false);E=new Q(F);h=3;D.state=3;if(D.onStateChange!=null){D.onStateChange(h)}if(l==null){D.applyPolicy()}var R=null;try{for(var T in d.Versions){if(d.Versions[T].Description=="AMT"){R=parseInt(d.Versions[T].Version.split(".")[0])}}}catch(S){}if((R!=null)&&(R>=12)){q("KVM data channel setup");x("skip");D.kvmTempTimer=setInterval(function(){x()},2000);z(JSON.stringify({action:"restart",ver:1}))}})};var x=function(P){E.IPS_KVMRedirectionSettingData_DataChannelRead(D.kvmDataGetResponse,P)};var w=function(S,Q,R,T,U){if((U!="skip")&&(T==200)&&(R.Body.ReturnValue==0)){var V=null;try{V=Buffer.from(R.Body.DataMessage,"base64").toString()}catch(P){return}if(V!=null){D.kvmProcessData(R.Body.RealmsBitmap,R.Body.MessageId,V)}}};var M=null;var y=function(S,R,U){var P=null;try{P=JSON.parse(U)}catch(Q){}if((P!=null)&&(P.action)){if(P.action=="present"){z(JSON.stringify({action:"present",ver:1,platform:process.platform}))}if(P.action=="offer"){M={};var T=require("ILibWebRTC");M.webrtc=T.createConnection();M.webrtc.on("connected",function(){});M.webrtc.on("disconnected",function(){D.webRtcCleanUp()});M.webrtc.on("dataChannel",function(V){M.rtcchannel=V;M.kvm=mesh.getRemoteDesktopStream();M.kvm.pipe(M.rtcchannel,{dataTypeSkip:1,end:false});M.rtcchannel.on("end",function(){D.webRtcCleanUp()});M.rtcchannel.on("data",function(W){D.kvmCtrlData(this,W)});M.rtcchannel.pipe(M.kvm,{dataTypeSkip:1,end:false})});z(JSON.stringify({action:"answer",ver:1,sdp:M.webrtc.setOffer(P.sdp)}))}}};var v=function(Q,S){if(S.length>0&&S.charCodeAt(0)!=123){if(D.fileupload!=null){S=Buffer.from(S,"base64");var Y=S.readUInt32BE(0);if((Y==16777216)||(Y==16777217)){fs.writeSync(D.fileupload.fp,S.slice(4));Q.write({action:"upload",sub:"ack",reqid:D.fileupload.reqid});if(Y==16777217){fs.closeSync(D.fileupload.fp);D.fileupload=null}}}return}q("KVM Ctrl Data: "+S);try{S=JSON.parse(S)}catch(V){q("Invalid JSON: "+S);return}if((S.path!=null)&&(process.platform!="win32")&&(S.path[0]!="/")){S.path="/"+S.path}switch(S.action){case"ping":Q.write({action:"pong"});break;case"lock":if(process.platform=="win32"){var R=require("child_process");R.execFile(process.env.windir+"\\system32\\cmd.exe",["/c","RunDll32.exe user32.dll,LockWorkStation"],{type:1})}break;case"ls":var ab=getDirectoryInfo(S.path);if(S.reqid!=undefined){ab.reqid=S.reqid}Q.write(ab);break;case"mkdir":fs.mkdirSync(S.path);break;case"rm":for(var Z in S.delfiles){var X=G.join(S.path,S.delfiles[Z]);try{fs.unlinkSync(X)}catch(U){q(U)}}break;case"rename":try{fs.renameSync(G.join(S.path,S.oldname),G.join(S.path,S.newname))}catch(U){q(U)}break;case"download":var ad=0;if(S.sub=="start"){if(D.filedownload!=null){Q.write({action:"download",sub:"cancel",id:D.filedownload.id});delete D.filedownload}D.filedownload={id:S.id,path:S.path,ptr:0};try{D.filedownload.f=fs.openSync(D.filedownload.path,"rbN")}catch(U){Q.write({action:"download",sub:"cancel",id:D.filedownload.id});delete D.filedownload}if(D.filedownload){Q.write({action:"download",sub:"start",id:S.id})}}else{if((D.filedownload!=null)&&(S.id==D.filedownload.id)){if(S.sub=="startack"){ad=8}else{if(S.sub=="stop"){delete D.filedownload}else{if(S.sub=="ack"){ad=1}}}}}while(ad>0){ad--;var P=Buffer.alloc(4096);var aa=fs.readSync(D.filedownload.f,P,4,4092,null);D.filedownload.ptr+=aa;if(aa<4092){P.writeInt32BE(16777217,0);fs.closeSync(D.filedownload.f);delete D.filedownload;ad=0}else{P.writeInt32BE(16777216,0)}Q.write(P.slice(0,aa+4).toString("base64"))}break;case"upload":if(S.sub=="start"){if(D.fileupload!=null){fs.closeSync(D.fileupload.fp)}if(!S.path||!S.name){break}D.fileupload={reqid:S.reqid};var W=G.join(S.path,S.name);try{D.fileupload.fp=fs.openSync(W,"wbN")}catch(U){}if(D.fileupload.fp){Q.write({action:"upload",sub:"start",reqid:D.fileupload.reqid})}else{D.fileupload=null;Q.write({action:"upload",sub:"error",reqid:D.fileupload.reqid})}}else{if(S.sub=="cancel"){if(D.fileupload!=null){fs.closeSync(D.fileupload.fp);D.fileupload=null}}}break;case"copy":for(var Z in S.names){var ac=G.join(S.scpath,S.names[Z]),T=G.join(S.dspath,S.names[Z]);if(ac!=T){try{fs.copyFileSync(ac,T)}catch(U){}}}break;case"move":for(var Z in S.names){var ac=G.join(S.scpath,S.names[Z]),T=G.join(S.dspath,S.names[Z]);if(ac!=T){try{fs.copyFileSync(ac,T);fs.unlinkSync(ac)}catch(U){}}}break;default:q("Invalid KVM command: "+S);break}};var L=function(){q("webRtcCleanUp");if(M==null){return}if(M.rtcchannel){try{M.rtcchannel.close()}catch(P){}try{M.rtcchannel.removeAllListeners("data")}catch(P){}try{M.rtcchannel.removeAllListeners("end")}catch(P){}delete M.rtcchannel}if(M.webrtc){try{M.webrtc.close()}catch(P){}try{M.webrtc.removeAllListeners("connected")}catch(P){}try{M.webrtc.removeAllListeners("disconnected")}catch(P){}try{M.webrtc.removeAllListeners("dataChannel")}catch(P){}delete M.webrtc}if(M.kvm){try{M.kvm.end()}catch(P){}delete M.kvm}M=null};var z=function(P){E.IPS_KVMRedirectionSettingData_DataChannelWrite(Buffer.from(P).toString("base64"),function(){})};var r=function(P,Q){if(fs.existsSync(P)){if(Q==true){fs.readdirSync(D.path.join(P,"*")).forEach(function(S,T){var R=D.path.join(P,S);if(fs.statSync(R).isDirectory()){r(R,true)}else{fs.unlinkSync(R)}})}fs.unlinkSync(P)}};var G={join:function(){var R=[];for(var P in arguments){var Q=arguments[P];if(Q!=null){while(Q.endsWith("/")||Q.endsWith("\\")){Q=Q.substring(0,Q.length-1)}if(P!=0){while(Q.startsWith("/")||Q.startsWith("\\")){Q=Q.substring(1)}}R.push(Q)}}if(R.length==0){return"/"}return R.join("/")}};function C(P){return require("MD5Stream").create().syncHash(P).toString("hex")}D.deactivateCCM=function(){g.unprovision(1,function(P){if(P==0){q("Success deactivating Intel AMT CCM.");c.SendCommand({action:"coreinfo",intelamt:{state:0,flags:0}});l=setTimeout(D.applyPolicy,8000)}else{q("Intel AMT CCM deactivation error: "+P)}})};function A(Q){var S="",R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var P=0;P";k.AMT_RemoteAccessService_AddRemoteAccessPolicyRule(2,0,"AAAAAAAAAAo=",[Q],null,function(U,S,T,V){if(V!=200){q("Add AddRemoteAccessPolicyRule Error "+V)}else{n(P)}})}function n(P){var R=[];if((j.ciraserver!=null)&&(j.ciraserver.home!=null)){R=j.ciraserver.home}var Q=P.AMT_EnvironmentDetectionSettingData.response;Q.DetectionStrings=B(Q.DetectionStrings);if(o(Q.DetectionStrings,R)==false){Q.DetectionStrings=R;k.Put("AMT_EnvironmentDetectionSettingData",Q,function(U,S,T,V){if(V!=200){q("Put AMT_EnvironmentDetectionSettingData Error "+V)}},0,1)}}function o(P,Q){if(P==Q){return true}if(P==null){P=[]}if(Q==null){Q=[]}if(P.length!=Q.length){return false}for(var R in P){if(Q.indexOf(P[R])==-1){return false}}return true}function B(P){if(!P||P==null||typeof P=="object"){return P}return[P]}}module.exports=AmtManager; \ No newline at end of file diff --git a/agents/modules_meshcore_min/amt.min.js b/agents/modules_meshcore_min/amt.min.js index 2cbca422..78e01096 100644 --- a/agents/modules_meshcore_min/amt.min.js +++ b/agents/modules_meshcore_min/amt.min.js @@ -1 +1 @@ -function AmtStackCreateService(R){var J=new Object();J._ObjectID="AMT";J.wsman=R;J.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];J.PendingEnums=[];J.PendingBatchOperations=0;J.ActiveEnumsCount=0;J.MaxActiveEnumsCount=1;J.onProcessChanged=null;var n=0;var m=0;J.GetPendingActions=function(){return(J.PendingEnums.length*2)+(J.ActiveEnumsCount)+J.wsman.comm.PendingAjax.length+J.wsman.comm.ActiveAjaxCount+J.PendingBatchOperations};function r(){var S=J.GetPendingActions();if(n=J.MaxActiveEnumsCount||J.PendingEnums.length==0){return}var T=J.PendingEnums.shift();J.Enum(T[0],T[1],T[2]);d(0)}J.BatchEnum=function(S,V,T,X,U,W){J.PendingBatchOperations+=(V.length*2);b(S,x(V),T,X,{},U,W);r()};function x(S){return JSON.parse(JSON.stringify(S))}function b(S,X,T,aa,Z,U,Y){J.PendingBatchOperations-=2;var W=X.shift(),V=J.Enum;if(W[0]=="*"){V=J.Get;W=W.substring(1)}V(W,function(ad,ab,ac,ae,af){af[2][ab]={response:(ac==null?null:ac.Body),responses:ac,status:ae};if(af[1].length==0||ae==401||(U!=true&&ae!=200&&ae!=400)){J.PendingBatchOperations-=(X.length*2);r();T.call(J,J,S,af[2],ae,aa)}else{r();b(S,X,T,aa,af[2],Y)}},[S,X,Z],Y);r()}J.BatchGet=function(S,U,T,W,V){h({name:S,names:U,callback:T,current:0,responses:{},tag:W,pri:V});r()};function h(S){if(S.names.length<=S.current){S.callback.call(J,J,S.name,S.responses,200,S.tag)}else{J.wsman.ExecGet(J.CompleteName(S.names[S.current]),function(V,U,T,W){g(S,T,W)},S.pri);S.current++}r()}function g(S,T,U){if(T==null||U!=200){S.callback.call(J,J,S.name,null,U,S.tag)}else{S.responses[T.Header.Method]=T;h(S)}}J.CompleteName=function(S){if(S.indexOf("AMT_")==0){return J.pfx[0]+S}if(S.indexOf("CIM_")==0){return J.pfx[1]+S}if(S.indexOf("IPS_")==0){return J.pfx[2]+S}};J.CompleteExecResponse=function(S){if(S&&S!=null&&S.Body&&(S.Body.ReturnValue!=undefined)){S.Body.ReturnValueStr=J.AmtStatusToStr(S.Body.ReturnValue)}return S};J.RequestPowerStateChange=function(T,S){J.CIM_PowerManagementService_RequestPowerStateChange(T,'
http://schemas.xmlsoap.org/ws/2004/08/addressing
http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystemCIM_ComputerSystemManagedSystem',null,null,S)};J.SetBootConfigRole=function(T,S){J.CIM_BootService_SetBootConfigRole('
http://schemas.xmlsoap.org/ws/2004/08/addressing
http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSettingIntel(r) AMT: Boot Configuration 0',T,S)};J.CancelAllQueries=function(S){J.wsman.CancelAllQueries(S)};J.AMT_AgentPresenceWatchdog_RegisterAgent=function(S,V,T,U){J.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},S,V,T,U)};J.AMT_AgentPresenceWatchdog_AssertPresence=function(V,S,W,T,U){J.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:V},S,W,T,U)};J.AMT_AgentPresenceWatchdog_AssertShutdown=function(V,S,W,T,U){J.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:V},S,W,T,U)};J.AMT_AgentPresenceWatchdog_AddAction=function(X,W,V,T,S,U,aa,Y,Z){J.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:X,NewState:W,EventOnTransition:V,ActionSd:T,ActionEac:S},U,aa,Y,Z)};J.AMT_AgentPresenceWatchdog_DeleteAllActions=function(S,V,T,U){J.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},S,V,T,U)};J.AMT_AgentPresenceWatchdogAction_GetActionEac=function(S){J.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},S)};J.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(S){J.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},S)};J.AMT_AgentPresenceWatchdogVA_AssertPresence=function(T,S){J.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:T},S)};J.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(T,S){J.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:T},S)};J.AMT_AgentPresenceWatchdogVA_AddAction=function(X,W,V,T,S,U){J.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:X,NewState:W,EventOnTransition:V,ActionSd:T,ActionEac:S},U)};J.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(S,T){J.Exec("AMT_AgentPresenceWatchdogVA","DeleteAllActions",{_method_dummy:S},T)};J.AMT_AlarmClockService_AddAlarm=function s(S,T){var V=S.InstanceID;var X=S.ElementName;var Y=S.StartTime.Datetime;var W=S.Interval?S.Interval.Datetime:undefined;var U=S.DeleteOnCompletion;var Z=''+V+""+X+''+Y+""+((W!=undefined)?(''+W+""):"")+""+U+"";J.wsman.ExecMethodXml(J.CompleteName("AMT_AlarmClockService"),"AddAlarm",Z,T)};J.AMT_AuditLog_ClearLog=function(S){J.Exec("AMT_AuditLog","ClearLog",{},S)};J.AMT_AuditLog_RequestStateChange=function(T,U,S){J.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.AMT_AuditLog_ReadRecords=function(T,S,U){J.Exec("AMT_AuditLog","ReadRecords",{StartIndex:T},S,U)};J.AMT_AuditLog_SetAuditLock=function(V,T,U,S){J.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:V,Flag:T,Handle:U},S)};J.AMT_AuditLog_ExportAuditLogSignature=function(T,S){J.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:T},S)};J.AMT_AuditLog_SetSigningKeyMaterial=function(W,V,U,T,S){J.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:W,SigningKey:V,LengthOfCertificates:U,Certificates:T},S)};J.AMT_AuditPolicyRule_SetAuditPolicy=function(U,S,V,W,T){J.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:U,AuditedAppID:S,EventID:V,PolicyType:W},T)};J.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(U,S,V,W,T){J.Exec("AMT_AuditPolicyRule","SetAuditPolicyBulk",{Enable:U,AuditedAppID:S,EventID:V,PolicyType:W},T)};J.AMT_AuthorizationService_AddUserAclEntryEx=function(V,U,W,S,X,T){J.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:V,DigestPassword:U,KerberosUserSid:W,AccessPermission:S,Realms:X},T)};J.AMT_AuthorizationService_EnumerateUserAclEntries=function(T,S){J.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:T},S)};J.AMT_AuthorizationService_GetUserAclEntryEx=function(T,S,U){J.Exec("AMT_AuthorizationService","GetUserAclEntryEx",{Handle:T},S,U)};J.AMT_AuthorizationService_UpdateUserAclEntryEx=function(W,V,U,X,S,Y,T){J.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:W,DigestUsername:V,DigestPassword:U,KerberosUserSid:X,AccessPermission:S,Realms:Y},T)};J.AMT_AuthorizationService_RemoveUserAclEntry=function(T,S){J.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:T},S)};J.AMT_AuthorizationService_SetAdminAclEntryEx=function(U,T,S){J.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",{Username:U,DigestPassword:T},S)};J.AMT_AuthorizationService_GetAdminAclEntry=function(S){J.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},S)};J.AMT_AuthorizationService_GetAdminAclEntryStatus=function(S){J.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},S)};J.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(S){J.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},S)};J.AMT_AuthorizationService_SetAclEnabledState=function(U,T,S,V){J.Exec("AMT_AuthorizationService","SetAclEnabledState",{Handle:U,Enabled:T},S,V)};J.AMT_AuthorizationService_GetAclEnabledState=function(T,S,U){J.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:T},S,U)};J.AMT_EndpointAccessControlService_RequestStateChange=function(T,U,S){J.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.AMT_EndpointAccessControlService_GetPosture=function(T,S){J.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:T},S)};J.AMT_EndpointAccessControlService_GetPostureHash=function(T,S){J.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:T},S)};J.AMT_EndpointAccessControlService_UpdatePostureState=function(T,S){J.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:T},S)};J.AMT_EndpointAccessControlService_GetEacOptions=function(S){J.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},S)};J.AMT_EndpointAccessControlService_SetEacOptions=function(T,U,S){J.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:T,PostureHashAlgorithm:U},S)};J.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(T,S){J.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:T},S)};J.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(T,S){J.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:T},S)};J.AMT_EthernetPortSettings_SetLinkPreference=function(T,U,S){J.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:T,Timeout:U},S)};J.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(T,S){J.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:T},S)};J.AMT_KerberosSettingData_GetCredentialCacheState=function(S){J.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},S)};J.AMT_KerberosSettingData_SetCredentialCacheState=function(T,S){J.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:T},S)};J.AMT_MessageLog_CancelIteration=function(T,S){J.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:T},S)};J.AMT_MessageLog_RequestStateChange=function(T,U,S){J.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.AMT_MessageLog_ClearLog=function(S){J.Exec("AMT_MessageLog","ClearLog",{},S)};J.AMT_MessageLog_GetRecords=function(T,U,S,V){J.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:T,MaxReadRecords:U},S,V)};J.AMT_MessageLog_GetRecord=function(T,U,S){J.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:T,PositionToNext:U},S)};J.AMT_MessageLog_PositionAtRecord=function(T,U,V,S){J.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:T,MoveAbsolute:U,RecordNumber:V},S)};J.AMT_MessageLog_PositionToFirstRecord=function(S,T){J.Exec("AMT_MessageLog","PositionToFirstRecord",{},S,T)};J.AMT_MessageLog_FreezeLog=function(T,S){J.Exec("AMT_MessageLog","FreezeLog",{Freeze:T},S)};J.AMT_PublicKeyManagementService_AddCRL=function(U,T,S){J.Exec("AMT_PublicKeyManagementService","AddCRL",{Url:U,SerialNumbers:T},S)};J.AMT_PublicKeyManagementService_ResetCRLList=function(S,T){J.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:S},T)};J.AMT_PublicKeyManagementService_AddCertificate=function(T,S,U){J.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:T},S,U)};J.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(T,S){J.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:T},S)};J.AMT_PublicKeyManagementService_AddKey=function(T,S){J.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:T},S)};J.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(U,T,V,S){J.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:U,DNName:T,Usage:V},S)};J.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(T,V,U,S){J.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:T,SigningAlgorithm:V,NullSignedCertificateRequest:U},S)};J.AMT_PublicKeyManagementService_GenerateKeyPair=function(T,U,S){J.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:T,KeyLength:U},S)};J.AMT_RedirectionService_RequestStateChange=function(T,S){J.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:T},S)};J.AMT_RedirectionService_TerminateSession=function(T,S){J.Exec("AMT_RedirectionService","TerminateSession",{SessionType:T},S)};J.AMT_RemoteAccessService_AddMpServer=function(S,X,Z,T,V,aa,Y,W,U){J.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:S,InfoFormat:X,Port:Z,AuthMethod:T,Certificate:V,Username:aa,Password:Y,CN:W},U)};J.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(V,W,T,U,S){J.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:V,TunnelLifeTime:W,ExtendedData:T,MpServer:U},S)};J.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(S,T){J.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:S},T)};J.AMT_SetupAndConfigurationService_CommitChanges=function(S,T,U){J.Exec("AMT_SetupAndConfigurationService","CommitChanges",{_method_dummy:S},T,U)};J.AMT_SetupAndConfigurationService_Unprovision=function(T,S){J.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:T},S)};J.AMT_SetupAndConfigurationService_PartialUnprovision=function(S,T){J.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:S},T)};J.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(S,T){J.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:S},T)};J.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(T,S){J.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:T},S)};J.AMT_SetupAndConfigurationService_SetMEBxPassword=function(T,S){J.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:T},S)};J.AMT_SetupAndConfigurationService_SetTLSPSK=function(T,U,S){J.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:T,PPS:U},S)};J.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(S){J.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecord",{},S)};J.AMT_SetupAndConfigurationService_GetUuid=function(S){J.Exec("AMT_SetupAndConfigurationService","GetUuid",{},S)};J.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(S){J.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},S)};J.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(S){J.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},S)};J.AMT_SystemDefensePolicy_GetTimeout=function(S){J.Exec("AMT_SystemDefensePolicy","GetTimeout",{},S)};J.AMT_SystemDefensePolicy_SetTimeout=function(T,S){J.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:T},S)};J.AMT_SystemDefensePolicy_UpdateStatistics=function(T,V,S,X,U,W){J.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:T,ResetOnRead:V},S,X,U,W)};J.AMT_SystemPowerScheme_SetPowerScheme=function(S,T,U){J.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},S,U,0,{InstanceID:T})};J.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=function(S,T){J.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},S,T)};J.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(T,V,W,S,U){J.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:T,Tm1:V,Tm2:W},S,U)};J.AMT_TLSCredentialContext_Create=function t(T,U,S,V){J.Create("AMT_TLSCredentialContext",{ElementInContext:T,ElementProvidingContext:U},S,V)};J.AMT_UserInitiatedConnectionService_RequestStateChange=function(T,U,S){J.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.AMT_WebUIService_RequestStateChange=function(T,V,S,U){J.Exec("AMT_WebUIService","RequestStateChange",{RequestedState:T,TimeoutPeriod:V},S,U)};J.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(W,X,V,U,S,T){J.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:W,WiFiEndpointSettingsInput:X,IEEE8021xSettingsInput:V,ClientCredential:U,CACredential:S},T)};J.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(W,X,V,U,S,T){J.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:W,WiFiEndpointSettingsInput:X,IEEE8021xSettingsInput:V,ClientCredential:U,CACredential:S},T)};J.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(S,T){J.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:S},T)};J.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(S,T){J.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:S},T)};J.CIM_Account_RequestStateChange=function(T,U,S){J.Exec("CIM_Account","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.CIM_AccountManagementService_CreateAccount=function(U,S,T){J.Exec("CIM_AccountManagementService","CreateAccount",{System:U,AccountTemplate:S},T)};J.CIM_BootConfigSetting_ChangeBootOrder=function(T,S){J.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:T},S)};J.CIM_BootService_SetBootConfigRole=function(S,U,T){J.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:S,Role:U},T,0,1)};J.CIM_Card_ConnectorPower=function(T,U,S){J.Exec("CIM_Card","ConnectorPower",{Connector:T,PoweredOn:U},S)};J.CIM_Card_IsCompatible=function(T,S){J.Exec("CIM_Card","IsCompatible",{ElementToCheck:T},S)};J.CIM_Chassis_IsCompatible=function(T,S){J.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:T},S)};J.CIM_Fan_SetSpeed=function(T,S){J.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:T},S)};J.CIM_KVMRedirectionSAP_RequestStateChange=function(T,U,S){J.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:T},S)};J.CIM_MediaAccessDevice_LockMedia=function(T,S){J.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:T},S)};J.CIM_MediaAccessDevice_SetPowerState=function(T,U,S){J.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:T,Time:U},S)};J.CIM_MediaAccessDevice_Reset=function(S){J.Exec("CIM_MediaAccessDevice","Reset",{},S)};J.CIM_MediaAccessDevice_EnableDevice=function(T,S){J.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:T},S)};J.CIM_MediaAccessDevice_OnlineDevice=function(T,S){J.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:T},S)};J.CIM_MediaAccessDevice_QuiesceDevice=function(T,S){J.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:T},S)};J.CIM_MediaAccessDevice_SaveProperties=function(S){J.Exec("CIM_MediaAccessDevice","SaveProperties",{},S)};J.CIM_MediaAccessDevice_RestoreProperties=function(S){J.Exec("CIM_MediaAccessDevice","RestoreProperties",{},S)};J.CIM_MediaAccessDevice_RequestStateChange=function(T,U,S){J.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.CIM_PhysicalFrame_IsCompatible=function(T,S){J.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:T},S)};J.CIM_PhysicalPackage_IsCompatible=function(T,S){J.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:T},S)};J.CIM_PowerManagementService_RequestPowerStateChange=function(U,T,V,W,S){J.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:U,ManagedElement:T,Time:V,TimeoutPeriod:W},S,0,1)};J.CIM_PowerSupply_SetPowerState=function(T,U,S){J.Exec("CIM_PowerSupply","SetPowerState",{PowerState:T,Time:U},S)};J.CIM_PowerSupply_Reset=function(S){J.Exec("CIM_PowerSupply","Reset",{},S)};J.CIM_PowerSupply_EnableDevice=function(T,S){J.Exec("CIM_PowerSupply","EnableDevice",{Enabled:T},S)};J.CIM_PowerSupply_OnlineDevice=function(T,S){J.Exec("CIM_PowerSupply","OnlineDevice",{Online:T},S)};J.CIM_PowerSupply_QuiesceDevice=function(T,S){J.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:T},S)};J.CIM_PowerSupply_SaveProperties=function(S){J.Exec("CIM_PowerSupply","SaveProperties",{},S)};J.CIM_PowerSupply_RestoreProperties=function(S){J.Exec("CIM_PowerSupply","RestoreProperties",{},S)};J.CIM_PowerSupply_RequestStateChange=function(T,U,S){J.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.CIM_Processor_SetPowerState=function(T,U,S){J.Exec("CIM_Processor","SetPowerState",{PowerState:T,Time:U},S)};J.CIM_Processor_Reset=function(S){J.Exec("CIM_Processor","Reset",{},S)};J.CIM_Processor_EnableDevice=function(T,S){J.Exec("CIM_Processor","EnableDevice",{Enabled:T},S)};J.CIM_Processor_OnlineDevice=function(T,S){J.Exec("CIM_Processor","OnlineDevice",{Online:T},S)};J.CIM_Processor_QuiesceDevice=function(T,S){J.Exec("CIM_Processor","QuiesceDevice",{Quiesce:T},S)};J.CIM_Processor_SaveProperties=function(S){J.Exec("CIM_Processor","SaveProperties",{},S)};J.CIM_Processor_RestoreProperties=function(S){J.Exec("CIM_Processor","RestoreProperties",{},S)};J.CIM_Processor_RequestStateChange=function(T,U,S){J.Exec("CIM_Processor","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.CIM_RecordLog_ClearLog=function(S){J.Exec("CIM_RecordLog","ClearLog",{},S)};J.CIM_RecordLog_RequestStateChange=function(T,U,S){J.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.CIM_RedirectionService_RequestStateChange=function(T,U,S){J.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.CIM_Sensor_SetPowerState=function(T,U,S){J.Exec("CIM_Sensor","SetPowerState",{PowerState:T,Time:U},S)};J.CIM_Sensor_Reset=function(S){J.Exec("CIM_Sensor","Reset",{},S)};J.CIM_Sensor_EnableDevice=function(T,S){J.Exec("CIM_Sensor","EnableDevice",{Enabled:T},S)};J.CIM_Sensor_OnlineDevice=function(T,S){J.Exec("CIM_Sensor","OnlineDevice",{Online:T},S)};J.CIM_Sensor_QuiesceDevice=function(T,S){J.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:T},S)};J.CIM_Sensor_SaveProperties=function(S){J.Exec("CIM_Sensor","SaveProperties",{},S)};J.CIM_Sensor_RestoreProperties=function(S){J.Exec("CIM_Sensor","RestoreProperties",{},S)};J.CIM_Sensor_RequestStateChange=function(T,U,S){J.Exec("CIM_Sensor","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.CIM_StatisticalData_ResetSelectedStats=function(T,S){J.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:T},S)};J.CIM_Watchdog_KeepAlive=function(S){J.Exec("CIM_Watchdog","KeepAlive",{},S)};J.CIM_Watchdog_SetPowerState=function(T,U,S){J.Exec("CIM_Watchdog","SetPowerState",{PowerState:T,Time:U},S)};J.CIM_Watchdog_Reset=function(S){J.Exec("CIM_Watchdog","Reset",{},S)};J.CIM_Watchdog_EnableDevice=function(T,S){J.Exec("CIM_Watchdog","EnableDevice",{Enabled:T},S)};J.CIM_Watchdog_OnlineDevice=function(T,S){J.Exec("CIM_Watchdog","OnlineDevice",{Online:T},S)};J.CIM_Watchdog_QuiesceDevice=function(T,S){J.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:T},S)};J.CIM_Watchdog_SaveProperties=function(S){J.Exec("CIM_Watchdog","SaveProperties",{},S)};J.CIM_Watchdog_RestoreProperties=function(S){J.Exec("CIM_Watchdog","RestoreProperties",{},S)};J.CIM_Watchdog_RequestStateChange=function(T,U,S){J.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.CIM_WiFiPort_SetPowerState=function(T,U,S){J.Exec("CIM_WiFiPort","SetPowerState",{PowerState:T,Time:U},S)};J.CIM_WiFiPort_Reset=function(S){J.Exec("CIM_WiFiPort","Reset",{},S)};J.CIM_WiFiPort_EnableDevice=function(T,S){J.Exec("CIM_WiFiPort","EnableDevice",{Enabled:T},S)};J.CIM_WiFiPort_OnlineDevice=function(T,S){J.Exec("CIM_WiFiPort","OnlineDevice",{Online:T},S)};J.CIM_WiFiPort_QuiesceDevice=function(T,S){J.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:T},S)};J.CIM_WiFiPort_SaveProperties=function(S){J.Exec("CIM_WiFiPort","SaveProperties",{},S)};J.CIM_WiFiPort_RestoreProperties=function(S){J.Exec("CIM_WiFiPort","RestoreProperties",{},S)};J.CIM_WiFiPort_RequestStateChange=function(T,U,S){J.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.IPS_HostBasedSetupService_Setup=function(W,X,V,T,Y,U,S){J.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:W,NetworkAdminPassword:X,McNonce:V,Certificate:T,SigningAlgorithm:Y,DigitalSignature:U},S)};J.IPS_HostBasedSetupService_AddNextCertInChain=function(V,T,U,S){J.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:V,IsLeafCertificate:T,IsRootCertificate:U},S)};J.IPS_HostBasedSetupService_AdminSetup=function(V,W,U,X,T,S){J.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:V,NetworkAdminPassword:W,McNonce:U,SigningAlgorithm:X,DigitalSignature:T},S)};J.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(U,V,T,S){J.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:U,SigningAlgorithm:V,DigitalSignature:T},S)};J.IPS_HostBasedSetupService_DisableClientControlMode=function(S,T){J.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:S},T)};J.IPS_KVMRedirectionSettingData_TerminateSession=function(S){J.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},S)};J.IPS_KVMRedirectionSettingData_DataChannelRead=function(S){J.Exec("IPS_KVMRedirectionSettingData","DataChannelRead",{},S)};J.IPS_KVMRedirectionSettingData_DataChannelWrite=function(T,S){J.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:T},S)};J.IPS_OptInService_StartOptIn=function(S){J.Exec("IPS_OptInService","StartOptIn",{},S)};J.IPS_OptInService_CancelOptIn=function(S){J.Exec("IPS_OptInService","CancelOptIn",{},S)};J.IPS_OptInService_SendOptInCode=function(T,S){J.Exec("IPS_OptInService","SendOptInCode",{OptInCode:T},S)};J.IPS_OptInService_StartService=function(S){J.Exec("IPS_OptInService","StartService",{},S)};J.IPS_OptInService_StopService=function(S){J.Exec("IPS_OptInService","StopService",{},S)};J.IPS_OptInService_RequestStateChange=function(T,U,S){J.Exec("IPS_OptInService","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.IPS_ProvisioningRecordLog_RequestStateChange=function(T,U,S){J.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.IPS_ProvisioningRecordLog_ClearLog=function(S,T){J.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:S},T)};J.IPS_SecIOService_RequestStateChange=function(T,U,S){J.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.AmtStatusToStr=function(S){if(J.AmtStatusCodes[S]){return J.AmtStatusCodes[S]}else{return"UNKNOWN_ERROR"}};J.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};J.GetMessageLog=function(S,T){J.AMT_MessageLog_PositionToFirstRecord(k,[S,T,[]])};function k(U,S,T,V,W){if(V!=200||T.Body.ReturnValue!="0"){W[0](J,null,W[2],V);return}J.AMT_MessageLog_GetRecords(T.Body.IterationIdentifier,390,l,W)}function l(Z,W,Y,aa,ac){if(aa!=200||Y.Body.ReturnValue!="0"){ac[0](J,null,ac[2],aa);return}var U,V,ae,T,S=ac[2],ab=new Date(),ad,X=Y.Body.RecordArray;if(typeof X==="string"){Y.Body.RecordArray=[Y.Body.RecordArray]}for(U in X){T=Buffer.from(X[U],"base64");if(T!=null){ad=M(T,0);if((ad>0)&&(ad<4294967295)){ae={DeviceAddress:T[4],EventSensorType:T[5],EventType:T[6],EventOffset:T[7],EventSourceType:T[8],EventSeverity:T[9],SensorNumber:T[10],Entity:T[11],EntityInstance:T[12],EventData:[],Time:new Date((ad+(ab.getTimezoneOffset()*60))*1000)};for(V=13;V<21;V++){ae.EventData.push(T[V])}ae.EntityStr=o[ae.Entity];ae.Desc=j(ae.EventSensorType,ae.EventOffset,ae.EventData,ae.Entity);if(!ae.EntityStr){ae.EntityStr="Unknown"}S.push(ae)}}}if(Y.Body.NoMoreRecords!=true){J.AMT_MessageLog_GetRecords(Y.Body.IterationIdentifier,390,l,[ac[0],S,ac[2]])}else{ac[0](J,S,ac[2])}}var f="Platform firmware (e.g. BIOS)|SMI handler|ISV system management software|Alert ASIC|IPMI|BIOS vendor|System board set vendor|System integrator|Third party add-in|OSV|NIC|System management card".split("|");var p="Unspecified.|No system memory is physically installed in the system.|No usable system memory, all installed memory has experienced an unrecoverable failure.|Unrecoverable hard-disk/ATAPI/IDE device failure.|Unrecoverable system-board failure.|Unrecoverable diskette subsystem failure.|Unrecoverable hard-disk controller failure.|Unrecoverable PS/2 or USB keyboard failure.|Removable boot media not found.|Unrecoverable video controller failure.|No video device detected.|Firmware (BIOS) ROM corruption detected.|CPU voltage mismatch (processors that share same supply have mismatched voltage requirements)|CPU speed matching failure".split("|");var q="Unspecified.|Memory initialization.|Starting hard-disk initialization and test|Secondary processor(s) initialization|User authentication|User-initiated system setup|USB resource configuration|PCI resource configuration|Option ROM initialization|Video initialization|Cache initialization|SM Bus initialization|Keyboard controller initialization|Embedded controller/management controller initialization|Docking station attachment|Enabling docking station|Docking station ejection|Disabling docking station|Calling operating system wake-up vector|Starting operating system boot process|Baseboard or motherboard initialization|reserved|Floppy initialization|Keyboard test|Pointing device test|Primary processor initialization".split("|");var o="Unspecified|Other|Unknown|Processor|Disk|Peripheral|System management module|System board|Memory module|Processor module|Power supply|Add in card|Front panel board|Back panel board|Power system board|Drive backplane|System internal expansion board|Other system board|Processor board|Power unit|Power module|Power management board|Chassis back panel board|System chassis|Sub chassis|Other chassis board|Disk drive bay|Peripheral bay|Device bay|Fan cooling|Cooling unit|Cable interconnect|Memory device|System management software|BIOS|Intel(r) ME|System bus|Group|Intel(r) ME|External environment|Battery|Processing blade|Connectivity switch|Processor/memory module|I/O module|Processor I/O module|Management controller firmware|IPMI channel|PCI bus|PCI express bus|SCSI bus|SATA/SAS bus|Processor front side bus".split("|");J.RealmNames="||Redirection|PT Administration|Hardware Asset|Remote Control|Storage|Event Manager|Storage Admin|Agent Presence Local|Agent Presence Remote|Circuit Breaker|Network Time|General Information|Firmware Update|EIT|LocalUN|Endpoint Access Control|Endpoint Access Control Admin|Event Log Reader|Audit Log|ACL Realm|||Local System".split("|");J.WatchdogCurrentStates={1:"Not Started",2:"Stopped",4:"Running",8:"Expired",16:"Suspended"};function j(V,U,T,S){if(V==15){if(T[0]==235){return"Invalid Data"}if(U==0){return p[T[1]]}return q[T[1]]}if(V==18&&T[0]==170){return"Agent watchdog "+char2hex(T[4])+char2hex(T[3])+char2hex(T[2])+char2hex(T[1])+"-"+char2hex(T[6])+char2hex(T[5])+"-... changed to "+J.WatchdogCurrentStates[T[7]]}if(V==6){return"Authentication failed "+(T[1]+(T[2]<<8))+" times. The system may be under attack."}if(V==30){return"No bootable media"}if(V==32){return"Operating system lockup or power interrupt"}if(V==35){return"System boot failure"}if(V==37){return"System firmware started (at least one CPU is properly executing)."}return"Unknown Sensor Type #"+V}var a={16:"Security Admin",17:"RCO",18:"Redirection Manager",19:"Firmware Update Manager",20:"Security Audit Log",21:"Network Time",22:"Network Administration",23:"Storage Administration",24:"Event Manager",25:"Circuit Breaker Manager",26:"Agent Presence Manager",27:"Wireless Configuration",28:"EAC",29:"KVM",30:"User Opt-In Events",32:"Screen Blanking",33:"Watchdog Events",1600:"Provisioning Started",1601:"Provisioning Completed",1602:"ACL Entry Added",1603:"ACL Entry Modified",1604:"ACL Entry Removed",1605:"ACL Access with Invalid Credentials",1606:"ACL Entry State",1607:"TLS State Changed",1608:"TLS Server Certificate Set",1609:"TLS Server Certificate Remove",1610:"TLS Trusted Root Certificate Added",1611:"TLS Trusted Root Certificate Removed",1612:"TLS Preshared Key Set",1613:"Kerberos Settings Modified",1614:"Kerberos Master Key Modified",1615:"Flash Wear out Counters Reset",1616:"Power Package Modified",1617:"Set Realm Authentication Mode",1618:"Upgrade Client to Admin Control Mode",1619:"Unprovisioning Started",1700:"Performed Power Up",1701:"Performed Power Down",1702:"Performed Power Cycle",1703:"Performed Reset",1704:"Set Boot Options",1800:"IDER Session Opened",1801:"IDER Session Closed",1802:"IDER Enabled",1803:"IDER Disabled",1804:"SoL Session Opened",1805:"SoL Session Closed",1806:"SoL Enabled",1807:"SoL Disabled",1808:"KVM Session Started",1809:"KVM Session Ended",1810:"KVM Enabled",1811:"KVM Disabled",1812:"VNC Password Failed 3 Times",1900:"Firmware Updated",1901:"Firmware Update Failed",2000:"Security Audit Log Cleared",2001:"Security Audit Policy Modified",2002:"Security Audit Log Disabled",2003:"Security Audit Log Enabled",2004:"Security Audit Log Exported",2005:"Security Audit Log Recovered",2100:"Intel(R) ME Time Set",2200:"TCPIP Parameters Set",2201:"Host Name Set",2202:"Domain Name Set",2203:"VLAN Parameters Set",2204:"Link Policy Set",2205:"IPv6 Parameters Set",2300:"Global Storage Attributes Set",2301:"Storage EACL Modified",2302:"Storage FPACL Modified",2303:"Storage Write Operation",2400:"Alert Subscribed",2401:"Alert Unsubscribed",2402:"Event Log Cleared",2403:"Event Log Frozen",2500:"CB Filter Added",2501:"CB Filter Removed",2502:"CB Policy Added",2503:"CB Policy Removed",2504:"CB Default Policy Set",2505:"CB Heuristics Option Set",2506:"CB Heuristics State Cleared",2600:"Agent Watchdog Added",2601:"Agent Watchdog Removed",2602:"Agent Watchdog Action Set",2700:"Wireless Profile Added",2701:"Wireless Profile Removed",2702:"Wireless Profile Updated",2800:"EAC Posture Signer SET",2801:"EAC Enabled",2802:"EAC Disabled",2803:"EAC Posture State",2804:"EAC Set Options",2900:"KVM Opt-in Enabled",2901:"KVM Opt-in Disabled",2902:"KVM Password Changed",2903:"KVM Consent Succeeded",2904:"KVM Consent Failed",3000:"Opt-In Policy Change",3001:"Send Consent Code Event",3002:"Start Opt-In Blocked Event"};J.GetAuditLogExtendedDataStr=function(T,S){if((T==1602||T==1604)&&S[0]==0){return w(S).splice(2,2+S[1]).toString()}if(T==1603){if(S[1]==0){return w(S).splice(3).toString()}return null}if(T==1605){return["Invalid ME access","Invalid MEBx access"][S[0]]}if(T==1606){var U=["Disabled","Enabled"][S[0]];if(S[1]==0){U+=", "+S[3]}return U}if(T==1607){return"Remote "+["NoAuth","ServerAuth","MutualAuth"][S[0]]+", Local "+["NoAuth","ServerAuth","MutualAuth"][S[1]]}if(T==1617){return J.RealmNames[L(S,0)]+", "+["NoAuth","Auth","Disabled"][S[4]]}if(T==1619){return["BIOS","MEBx","Local MEI","Local WSMAN","Remote WSAMN"][S[0]]}if(T==1900){return"From "+N(S,0)+"."+N(S,2)+"."+N(S,4)+"."+N(S,6)+" to "+N(S,8)+"."+N(S,10)+"."+N(S,12)+"."+N(S,14)}if(T==2100){var V=new Date();V.setTime(L(S,0)*1000+(new Date().getTimezoneOffset()*60000));return V.toLocaleString()}if(T==3000){return"From "+["None","KVM","All"][S[0]]+" to "+["None","KVM","All"][S[1]]}if(T==3001){return["Success","Failed 3 times"][S[0]]}return null};J.GetAuditLog=function(S){J.AMT_AuditLog_ReadRecords(1,i,[S,[]])};function I(S){if(!S||S==null||typeof S=="object"){return S}return[S]}function N(T,S){return(T[S]<<8)+T[S+1]}function L(T,S){return(T[S]*16777216)+(T[S+1]<<16)+(T[S+2]<<8)+T[S+3]}function M(T,S){return(T[S+3]*16777216)+(T[S+2]<<16)+(T[S+1]<<8)+T[S]}function v(S){return Buffer.from(S).toString("base64")}function u(T){var U=null;try{U=Buffer.from(T,"base64").toString()}catch(S){console.log(S)}return U}function w(S){var U=[];for(var T in S){U.push(S[T])}return U}function i(ac,X,ab,ad,af){if(ad!=200){af[0](J,[],ad);return}var Z,W,S,T,ai,aa=af[1],ae=new Date(),ag;if(ab.Body.RecordsReturned>0){ab.Body.EventRecords=I(ab.Body.EventRecords);for(W in ab.Body.EventRecords){S=null;try{T=u(ab.Body.EventRecords[W]);S=Buffer.from(T)}catch(U){console.log(U+" "+ab.Body.EventRecords[W])}ai={AuditAppID:N(S,0),EventID:N(S,2),InitiatorType:S[4]};ai.AuditApp=a[ai.AuditAppID];ai.Event=a[(ai.AuditAppID*100)+ai.EventID];if(!ai.Event){ai.Event="#"+ai.EventID}if(ai.InitiatorType==0){var ah=S[5];ai.Initiator=S.slice(6,6+ah).toString();Z=6+ah}if(ai.InitiatorType==1){ai.KerberosUserInDomain=L(S,5);var ah=S[9];ai.Initiator=G(S.slice(10,10+ah));Z=10+ah}if(ai.InitiatorType==2){ai.Initiator="Local";Z=5}if(ai.InitiatorType==3){ai.Initiator="KVM Default Port";Z=5}ag=L(S,Z);ai.Time=new Date((ag+(ae.getTimezoneOffset()*60))*1000);Z+=4;ai.MCLocationType=S[Z++];var Y=S[Z++];ai.NetAddress=S.slice(Z,Z+Y).toString();Z+=Y;var V=S[Z++];ai.Ex=S.slice(Z,Z+V);ai.ExStr=J.GetAuditLogExtendedDataStr((ai.AuditAppID*100)+ai.EventID,ai.Ex);aa.push(ai)}}if(ab.Body.TotalRecordCount>aa.length){J.AMT_AuditLog_ReadRecords(aa.length+1,i,[af[0],aa])}else{af[0](J,aa,ad)}}function C(U){if(U===undefined||U===null){return null}var V="";for(var T in U){var S=U[T];if(!S){continue}if(S.__parameterType==="reference"){V+=O(T,S)}else{V+=H(T,S)}}return V}function H(V,U){if(U===undefined||U===null){return null}var T=!!U.__namespace;var Z=T?"";for(var X in U){if(!U.hasOwnProperty(X)||X.indexOf("__")===0){continue}if(typeof U[X]==="function"||Array.isArray(U[X])){continue}if(typeof U[X]==="object"){console.error("only convert one level down...")}else{Y+=Z+X+">"+U[X].toString()+S+X+">"}}Y+="";return Y}function O(T,S){if(S===undefined||S===null){return null}var U="/wsman"+S.__resourceUri+"";for(var V in S){if(!S.hasOwnProperty(V)||V.indexOf("__")===0){continue}if(typeof S[V]==="function"||typeof S[V]==="object"||Array.isArray(S[V])){continue}U+=''+S[V].toString()+""}U+="";return U}function G(U){var T="S-"+U.charCodeAt(0)+"-"+U.charCodeAt(7);for(var S=2;S<(U.length/4);S++){T+="-"+M(U,S*4)}return T}function F(V){if(!V||V==null){return null}var U=V.split("-");if(U.length<4||(U[0]!="s"&&U[0]!="S")){return null}for(var S=1;S=J.MaxActiveEnumsCount||J.PendingEnums.length==0){return}var T=J.PendingEnums.shift();J.Enum(T[0],T[1],T[2]);d(0)}J.BatchEnum=function(S,V,T,X,U,W){J.PendingBatchOperations+=(V.length*2);b(S,x(V),T,X,{},U,W);r()};function x(S){return JSON.parse(JSON.stringify(S))}function b(S,X,T,aa,Z,U,Y){J.PendingBatchOperations-=2;var W=X.shift(),V=J.Enum;if(W[0]=="*"){V=J.Get;W=W.substring(1)}V(W,function(ad,ab,ac,ae,af){af[2][ab]={response:(ac==null?null:ac.Body),responses:ac,status:ae};if(af[1].length==0||ae==401||(U!=true&&ae!=200&&ae!=400)){J.PendingBatchOperations-=(X.length*2);r();T.call(J,J,S,af[2],ae,aa)}else{r();b(S,X,T,aa,af[2],Y)}},[S,X,Z],Y);r()}J.BatchGet=function(S,U,T,W,V){h({name:S,names:U,callback:T,current:0,responses:{},tag:W,pri:V});r()};function h(S){if(S.names.length<=S.current){S.callback.call(J,J,S.name,S.responses,200,S.tag)}else{J.wsman.ExecGet(J.CompleteName(S.names[S.current]),function(V,U,T,W){g(S,T,W)},S.pri);S.current++}r()}function g(S,T,U){if(T==null||U!=200){S.callback.call(J,J,S.name,null,U,S.tag)}else{S.responses[T.Header.Method]=T;h(S)}}J.CompleteName=function(S){if(S.indexOf("AMT_")==0){return J.pfx[0]+S}if(S.indexOf("CIM_")==0){return J.pfx[1]+S}if(S.indexOf("IPS_")==0){return J.pfx[2]+S}};J.CompleteExecResponse=function(S){if(S&&S!=null&&S.Body&&(S.Body.ReturnValue!=undefined)){S.Body.ReturnValueStr=J.AmtStatusToStr(S.Body.ReturnValue)}return S};J.RequestPowerStateChange=function(T,S){J.CIM_PowerManagementService_RequestPowerStateChange(T,'
http://schemas.xmlsoap.org/ws/2004/08/addressing
http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystemCIM_ComputerSystemManagedSystem',null,null,S)};J.SetBootConfigRole=function(T,S){J.CIM_BootService_SetBootConfigRole('
http://schemas.xmlsoap.org/ws/2004/08/addressing
http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSettingIntel(r) AMT: Boot Configuration 0',T,S)};J.CancelAllQueries=function(S){J.wsman.CancelAllQueries(S)};J.AMT_AgentPresenceWatchdog_RegisterAgent=function(S,V,T,U){J.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},S,V,T,U)};J.AMT_AgentPresenceWatchdog_AssertPresence=function(V,S,W,T,U){J.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:V},S,W,T,U)};J.AMT_AgentPresenceWatchdog_AssertShutdown=function(V,S,W,T,U){J.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:V},S,W,T,U)};J.AMT_AgentPresenceWatchdog_AddAction=function(X,W,V,T,S,U,aa,Y,Z){J.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:X,NewState:W,EventOnTransition:V,ActionSd:T,ActionEac:S},U,aa,Y,Z)};J.AMT_AgentPresenceWatchdog_DeleteAllActions=function(S,V,T,U){J.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},S,V,T,U)};J.AMT_AgentPresenceWatchdogAction_GetActionEac=function(S){J.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},S)};J.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(S){J.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},S)};J.AMT_AgentPresenceWatchdogVA_AssertPresence=function(T,S){J.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:T},S)};J.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(T,S){J.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:T},S)};J.AMT_AgentPresenceWatchdogVA_AddAction=function(X,W,V,T,S,U){J.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:X,NewState:W,EventOnTransition:V,ActionSd:T,ActionEac:S},U)};J.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(S,T){J.Exec("AMT_AgentPresenceWatchdogVA","DeleteAllActions",{_method_dummy:S},T)};J.AMT_AlarmClockService_AddAlarm=function s(S,T){var V=S.InstanceID;var X=S.ElementName;var Y=S.StartTime.Datetime;var W=S.Interval?S.Interval.Datetime:undefined;var U=S.DeleteOnCompletion;var Z=''+V+""+X+''+Y+""+((W!=undefined)?(''+W+""):"")+""+U+"";J.wsman.ExecMethodXml(J.CompleteName("AMT_AlarmClockService"),"AddAlarm",Z,T)};J.AMT_AuditLog_ClearLog=function(S){J.Exec("AMT_AuditLog","ClearLog",{},S)};J.AMT_AuditLog_RequestStateChange=function(T,U,S){J.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.AMT_AuditLog_ReadRecords=function(T,S,U){J.Exec("AMT_AuditLog","ReadRecords",{StartIndex:T},S,U)};J.AMT_AuditLog_SetAuditLock=function(V,T,U,S){J.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:V,Flag:T,Handle:U},S)};J.AMT_AuditLog_ExportAuditLogSignature=function(T,S){J.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:T},S)};J.AMT_AuditLog_SetSigningKeyMaterial=function(W,V,U,T,S){J.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:W,SigningKey:V,LengthOfCertificates:U,Certificates:T},S)};J.AMT_AuditPolicyRule_SetAuditPolicy=function(U,S,V,W,T){J.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:U,AuditedAppID:S,EventID:V,PolicyType:W},T)};J.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(U,S,V,W,T){J.Exec("AMT_AuditPolicyRule","SetAuditPolicyBulk",{Enable:U,AuditedAppID:S,EventID:V,PolicyType:W},T)};J.AMT_AuthorizationService_AddUserAclEntryEx=function(V,U,W,S,X,T){J.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:V,DigestPassword:U,KerberosUserSid:W,AccessPermission:S,Realms:X},T)};J.AMT_AuthorizationService_EnumerateUserAclEntries=function(T,S){J.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:T},S)};J.AMT_AuthorizationService_GetUserAclEntryEx=function(T,S,U){J.Exec("AMT_AuthorizationService","GetUserAclEntryEx",{Handle:T},S,U)};J.AMT_AuthorizationService_UpdateUserAclEntryEx=function(W,V,U,X,S,Y,T){J.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:W,DigestUsername:V,DigestPassword:U,KerberosUserSid:X,AccessPermission:S,Realms:Y},T)};J.AMT_AuthorizationService_RemoveUserAclEntry=function(T,S){J.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:T},S)};J.AMT_AuthorizationService_SetAdminAclEntryEx=function(U,T,S){J.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",{Username:U,DigestPassword:T},S)};J.AMT_AuthorizationService_GetAdminAclEntry=function(S){J.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},S)};J.AMT_AuthorizationService_GetAdminAclEntryStatus=function(S){J.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},S)};J.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(S){J.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},S)};J.AMT_AuthorizationService_SetAclEnabledState=function(U,T,S,V){J.Exec("AMT_AuthorizationService","SetAclEnabledState",{Handle:U,Enabled:T},S,V)};J.AMT_AuthorizationService_GetAclEnabledState=function(T,S,U){J.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:T},S,U)};J.AMT_EndpointAccessControlService_RequestStateChange=function(T,U,S){J.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.AMT_EndpointAccessControlService_GetPosture=function(T,S){J.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:T},S)};J.AMT_EndpointAccessControlService_GetPostureHash=function(T,S){J.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:T},S)};J.AMT_EndpointAccessControlService_UpdatePostureState=function(T,S){J.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:T},S)};J.AMT_EndpointAccessControlService_GetEacOptions=function(S){J.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},S)};J.AMT_EndpointAccessControlService_SetEacOptions=function(T,U,S){J.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:T,PostureHashAlgorithm:U},S)};J.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(T,S){J.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:T},S)};J.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(T,S){J.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:T},S)};J.AMT_EthernetPortSettings_SetLinkPreference=function(T,U,S){J.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:T,Timeout:U},S)};J.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(T,S){J.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:T},S)};J.AMT_KerberosSettingData_GetCredentialCacheState=function(S){J.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},S)};J.AMT_KerberosSettingData_SetCredentialCacheState=function(T,S){J.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:T},S)};J.AMT_MessageLog_CancelIteration=function(T,S){J.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:T},S)};J.AMT_MessageLog_RequestStateChange=function(T,U,S){J.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.AMT_MessageLog_ClearLog=function(S){J.Exec("AMT_MessageLog","ClearLog",{},S)};J.AMT_MessageLog_GetRecords=function(T,U,S,V){J.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:T,MaxReadRecords:U},S,V)};J.AMT_MessageLog_GetRecord=function(T,U,S){J.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:T,PositionToNext:U},S)};J.AMT_MessageLog_PositionAtRecord=function(T,U,V,S){J.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:T,MoveAbsolute:U,RecordNumber:V},S)};J.AMT_MessageLog_PositionToFirstRecord=function(S,T){J.Exec("AMT_MessageLog","PositionToFirstRecord",{},S,T)};J.AMT_MessageLog_FreezeLog=function(T,S){J.Exec("AMT_MessageLog","FreezeLog",{Freeze:T},S)};J.AMT_PublicKeyManagementService_AddCRL=function(U,T,S){J.Exec("AMT_PublicKeyManagementService","AddCRL",{Url:U,SerialNumbers:T},S)};J.AMT_PublicKeyManagementService_ResetCRLList=function(S,T){J.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:S},T)};J.AMT_PublicKeyManagementService_AddCertificate=function(T,S,U){J.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:T},S,U)};J.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(T,S){J.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:T},S)};J.AMT_PublicKeyManagementService_AddKey=function(T,S){J.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:T},S)};J.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(U,T,V,S){J.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:U,DNName:T,Usage:V},S)};J.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(T,V,U,S){J.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:T,SigningAlgorithm:V,NullSignedCertificateRequest:U},S)};J.AMT_PublicKeyManagementService_GenerateKeyPair=function(T,U,S){J.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:T,KeyLength:U},S)};J.AMT_RedirectionService_RequestStateChange=function(T,S){J.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:T},S)};J.AMT_RedirectionService_TerminateSession=function(T,S){J.Exec("AMT_RedirectionService","TerminateSession",{SessionType:T},S)};J.AMT_RemoteAccessService_AddMpServer=function(S,X,Z,T,V,aa,Y,W,U){J.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:S,InfoFormat:X,Port:Z,AuthMethod:T,Certificate:V,Username:aa,Password:Y,CN:W},U)};J.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(W,X,T,V,U,S){J.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:W,TunnelLifeTime:X,ExtendedData:T,MpServer:V,InternalMpServer:U},S)};J.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(S,T){J.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:S},T)};J.AMT_SetupAndConfigurationService_CommitChanges=function(S,T,U){J.Exec("AMT_SetupAndConfigurationService","CommitChanges",{_method_dummy:S},T,U)};J.AMT_SetupAndConfigurationService_Unprovision=function(T,S){J.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:T},S)};J.AMT_SetupAndConfigurationService_PartialUnprovision=function(S,T){J.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:S},T)};J.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(S,T){J.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:S},T)};J.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(T,S){J.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:T},S)};J.AMT_SetupAndConfigurationService_SetMEBxPassword=function(T,S){J.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:T},S)};J.AMT_SetupAndConfigurationService_SetTLSPSK=function(T,U,S){J.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:T,PPS:U},S)};J.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(S){J.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecord",{},S)};J.AMT_SetupAndConfigurationService_GetUuid=function(S){J.Exec("AMT_SetupAndConfigurationService","GetUuid",{},S)};J.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(S){J.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},S)};J.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(S){J.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},S)};J.AMT_SystemDefensePolicy_GetTimeout=function(S){J.Exec("AMT_SystemDefensePolicy","GetTimeout",{},S)};J.AMT_SystemDefensePolicy_SetTimeout=function(T,S){J.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:T},S)};J.AMT_SystemDefensePolicy_UpdateStatistics=function(T,V,S,X,U,W){J.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:T,ResetOnRead:V},S,X,U,W)};J.AMT_SystemPowerScheme_SetPowerScheme=function(S,T,U){J.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},S,U,0,{InstanceID:T})};J.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=function(S,T){J.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},S,T)};J.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(T,V,W,S,U){J.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:T,Tm1:V,Tm2:W},S,U)};J.AMT_TLSCredentialContext_Create=function t(T,U,S,V){J.Create("AMT_TLSCredentialContext",{ElementInContext:T,ElementProvidingContext:U},S,V)};J.AMT_UserInitiatedConnectionService_RequestStateChange=function(T,U,S){J.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.AMT_WebUIService_RequestStateChange=function(T,V,S,U){J.Exec("AMT_WebUIService","RequestStateChange",{RequestedState:T,TimeoutPeriod:V},S,U)};J.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(W,X,V,U,S,T){J.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:W,WiFiEndpointSettingsInput:X,IEEE8021xSettingsInput:V,ClientCredential:U,CACredential:S},T)};J.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(W,X,V,U,S,T){J.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:W,WiFiEndpointSettingsInput:X,IEEE8021xSettingsInput:V,ClientCredential:U,CACredential:S},T)};J.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(S,T){J.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:S},T)};J.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(S,T){J.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:S},T)};J.CIM_Account_RequestStateChange=function(T,U,S){J.Exec("CIM_Account","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.CIM_AccountManagementService_CreateAccount=function(U,S,T){J.Exec("CIM_AccountManagementService","CreateAccount",{System:U,AccountTemplate:S},T)};J.CIM_BootConfigSetting_ChangeBootOrder=function(T,S){J.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:T},S)};J.CIM_BootService_SetBootConfigRole=function(S,U,T){J.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:S,Role:U},T,0,1)};J.CIM_Card_ConnectorPower=function(T,U,S){J.Exec("CIM_Card","ConnectorPower",{Connector:T,PoweredOn:U},S)};J.CIM_Card_IsCompatible=function(T,S){J.Exec("CIM_Card","IsCompatible",{ElementToCheck:T},S)};J.CIM_Chassis_IsCompatible=function(T,S){J.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:T},S)};J.CIM_Fan_SetSpeed=function(T,S){J.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:T},S)};J.CIM_KVMRedirectionSAP_RequestStateChange=function(T,U,S){J.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:T},S)};J.CIM_MediaAccessDevice_LockMedia=function(T,S){J.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:T},S)};J.CIM_MediaAccessDevice_SetPowerState=function(T,U,S){J.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:T,Time:U},S)};J.CIM_MediaAccessDevice_Reset=function(S){J.Exec("CIM_MediaAccessDevice","Reset",{},S)};J.CIM_MediaAccessDevice_EnableDevice=function(T,S){J.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:T},S)};J.CIM_MediaAccessDevice_OnlineDevice=function(T,S){J.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:T},S)};J.CIM_MediaAccessDevice_QuiesceDevice=function(T,S){J.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:T},S)};J.CIM_MediaAccessDevice_SaveProperties=function(S){J.Exec("CIM_MediaAccessDevice","SaveProperties",{},S)};J.CIM_MediaAccessDevice_RestoreProperties=function(S){J.Exec("CIM_MediaAccessDevice","RestoreProperties",{},S)};J.CIM_MediaAccessDevice_RequestStateChange=function(T,U,S){J.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.CIM_PhysicalFrame_IsCompatible=function(T,S){J.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:T},S)};J.CIM_PhysicalPackage_IsCompatible=function(T,S){J.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:T},S)};J.CIM_PowerManagementService_RequestPowerStateChange=function(U,T,V,W,S){J.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:U,ManagedElement:T,Time:V,TimeoutPeriod:W},S,0,1)};J.CIM_PowerSupply_SetPowerState=function(T,U,S){J.Exec("CIM_PowerSupply","SetPowerState",{PowerState:T,Time:U},S)};J.CIM_PowerSupply_Reset=function(S){J.Exec("CIM_PowerSupply","Reset",{},S)};J.CIM_PowerSupply_EnableDevice=function(T,S){J.Exec("CIM_PowerSupply","EnableDevice",{Enabled:T},S)};J.CIM_PowerSupply_OnlineDevice=function(T,S){J.Exec("CIM_PowerSupply","OnlineDevice",{Online:T},S)};J.CIM_PowerSupply_QuiesceDevice=function(T,S){J.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:T},S)};J.CIM_PowerSupply_SaveProperties=function(S){J.Exec("CIM_PowerSupply","SaveProperties",{},S)};J.CIM_PowerSupply_RestoreProperties=function(S){J.Exec("CIM_PowerSupply","RestoreProperties",{},S)};J.CIM_PowerSupply_RequestStateChange=function(T,U,S){J.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.CIM_Processor_SetPowerState=function(T,U,S){J.Exec("CIM_Processor","SetPowerState",{PowerState:T,Time:U},S)};J.CIM_Processor_Reset=function(S){J.Exec("CIM_Processor","Reset",{},S)};J.CIM_Processor_EnableDevice=function(T,S){J.Exec("CIM_Processor","EnableDevice",{Enabled:T},S)};J.CIM_Processor_OnlineDevice=function(T,S){J.Exec("CIM_Processor","OnlineDevice",{Online:T},S)};J.CIM_Processor_QuiesceDevice=function(T,S){J.Exec("CIM_Processor","QuiesceDevice",{Quiesce:T},S)};J.CIM_Processor_SaveProperties=function(S){J.Exec("CIM_Processor","SaveProperties",{},S)};J.CIM_Processor_RestoreProperties=function(S){J.Exec("CIM_Processor","RestoreProperties",{},S)};J.CIM_Processor_RequestStateChange=function(T,U,S){J.Exec("CIM_Processor","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.CIM_RecordLog_ClearLog=function(S){J.Exec("CIM_RecordLog","ClearLog",{},S)};J.CIM_RecordLog_RequestStateChange=function(T,U,S){J.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.CIM_RedirectionService_RequestStateChange=function(T,U,S){J.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.CIM_Sensor_SetPowerState=function(T,U,S){J.Exec("CIM_Sensor","SetPowerState",{PowerState:T,Time:U},S)};J.CIM_Sensor_Reset=function(S){J.Exec("CIM_Sensor","Reset",{},S)};J.CIM_Sensor_EnableDevice=function(T,S){J.Exec("CIM_Sensor","EnableDevice",{Enabled:T},S)};J.CIM_Sensor_OnlineDevice=function(T,S){J.Exec("CIM_Sensor","OnlineDevice",{Online:T},S)};J.CIM_Sensor_QuiesceDevice=function(T,S){J.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:T},S)};J.CIM_Sensor_SaveProperties=function(S){J.Exec("CIM_Sensor","SaveProperties",{},S)};J.CIM_Sensor_RestoreProperties=function(S){J.Exec("CIM_Sensor","RestoreProperties",{},S)};J.CIM_Sensor_RequestStateChange=function(T,U,S){J.Exec("CIM_Sensor","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.CIM_StatisticalData_ResetSelectedStats=function(T,S){J.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:T},S)};J.CIM_Watchdog_KeepAlive=function(S){J.Exec("CIM_Watchdog","KeepAlive",{},S)};J.CIM_Watchdog_SetPowerState=function(T,U,S){J.Exec("CIM_Watchdog","SetPowerState",{PowerState:T,Time:U},S)};J.CIM_Watchdog_Reset=function(S){J.Exec("CIM_Watchdog","Reset",{},S)};J.CIM_Watchdog_EnableDevice=function(T,S){J.Exec("CIM_Watchdog","EnableDevice",{Enabled:T},S)};J.CIM_Watchdog_OnlineDevice=function(T,S){J.Exec("CIM_Watchdog","OnlineDevice",{Online:T},S)};J.CIM_Watchdog_QuiesceDevice=function(T,S){J.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:T},S)};J.CIM_Watchdog_SaveProperties=function(S){J.Exec("CIM_Watchdog","SaveProperties",{},S)};J.CIM_Watchdog_RestoreProperties=function(S){J.Exec("CIM_Watchdog","RestoreProperties",{},S)};J.CIM_Watchdog_RequestStateChange=function(T,U,S){J.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.CIM_WiFiPort_SetPowerState=function(T,U,S){J.Exec("CIM_WiFiPort","SetPowerState",{PowerState:T,Time:U},S)};J.CIM_WiFiPort_Reset=function(S){J.Exec("CIM_WiFiPort","Reset",{},S)};J.CIM_WiFiPort_EnableDevice=function(T,S){J.Exec("CIM_WiFiPort","EnableDevice",{Enabled:T},S)};J.CIM_WiFiPort_OnlineDevice=function(T,S){J.Exec("CIM_WiFiPort","OnlineDevice",{Online:T},S)};J.CIM_WiFiPort_QuiesceDevice=function(T,S){J.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:T},S)};J.CIM_WiFiPort_SaveProperties=function(S){J.Exec("CIM_WiFiPort","SaveProperties",{},S)};J.CIM_WiFiPort_RestoreProperties=function(S){J.Exec("CIM_WiFiPort","RestoreProperties",{},S)};J.CIM_WiFiPort_RequestStateChange=function(T,U,S){J.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.IPS_HostBasedSetupService_Setup=function(W,X,V,T,Y,U,S){J.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:W,NetworkAdminPassword:X,McNonce:V,Certificate:T,SigningAlgorithm:Y,DigitalSignature:U},S)};J.IPS_HostBasedSetupService_AddNextCertInChain=function(V,T,U,S){J.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:V,IsLeafCertificate:T,IsRootCertificate:U},S)};J.IPS_HostBasedSetupService_AdminSetup=function(V,W,U,X,T,S){J.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:V,NetworkAdminPassword:W,McNonce:U,SigningAlgorithm:X,DigitalSignature:T},S)};J.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(U,V,T,S){J.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:U,SigningAlgorithm:V,DigitalSignature:T},S)};J.IPS_HostBasedSetupService_DisableClientControlMode=function(S,T){J.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:S},T)};J.IPS_KVMRedirectionSettingData_TerminateSession=function(S){J.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},S)};J.IPS_KVMRedirectionSettingData_DataChannelRead=function(S){J.Exec("IPS_KVMRedirectionSettingData","DataChannelRead",{},S)};J.IPS_KVMRedirectionSettingData_DataChannelWrite=function(T,S){J.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:T},S)};J.IPS_OptInService_StartOptIn=function(S){J.Exec("IPS_OptInService","StartOptIn",{},S)};J.IPS_OptInService_CancelOptIn=function(S){J.Exec("IPS_OptInService","CancelOptIn",{},S)};J.IPS_OptInService_SendOptInCode=function(T,S){J.Exec("IPS_OptInService","SendOptInCode",{OptInCode:T},S)};J.IPS_OptInService_StartService=function(S){J.Exec("IPS_OptInService","StartService",{},S)};J.IPS_OptInService_StopService=function(S){J.Exec("IPS_OptInService","StopService",{},S)};J.IPS_OptInService_RequestStateChange=function(T,U,S){J.Exec("IPS_OptInService","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.IPS_ProvisioningRecordLog_RequestStateChange=function(T,U,S){J.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.IPS_ProvisioningRecordLog_ClearLog=function(S,T){J.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:S},T)};J.IPS_SecIOService_RequestStateChange=function(T,U,S){J.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:T,TimeoutPeriod:U},S)};J.AmtStatusToStr=function(S){if(J.AmtStatusCodes[S]){return J.AmtStatusCodes[S]}else{return"UNKNOWN_ERROR"}};J.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};J.GetMessageLog=function(S,T){J.AMT_MessageLog_PositionToFirstRecord(k,[S,T,[]])};function k(U,S,T,V,W){if(V!=200||T.Body.ReturnValue!="0"){W[0](J,null,W[2],V);return}J.AMT_MessageLog_GetRecords(T.Body.IterationIdentifier,390,l,W)}function l(Z,W,Y,aa,ac){if(aa!=200||Y.Body.ReturnValue!="0"){ac[0](J,null,ac[2],aa);return}var U,V,ae,T,S=ac[2],ab=new Date(),ad,X=Y.Body.RecordArray;if(typeof X==="string"){Y.Body.RecordArray=[Y.Body.RecordArray]}for(U in X){T=Buffer.from(X[U],"base64");if(T!=null){ad=M(T,0);if((ad>0)&&(ad<4294967295)){ae={DeviceAddress:T[4],EventSensorType:T[5],EventType:T[6],EventOffset:T[7],EventSourceType:T[8],EventSeverity:T[9],SensorNumber:T[10],Entity:T[11],EntityInstance:T[12],EventData:[],Time:new Date((ad+(ab.getTimezoneOffset()*60))*1000)};for(V=13;V<21;V++){ae.EventData.push(T[V])}ae.EntityStr=o[ae.Entity];ae.Desc=j(ae.EventSensorType,ae.EventOffset,ae.EventData,ae.Entity);if(!ae.EntityStr){ae.EntityStr="Unknown"}S.push(ae)}}}if(Y.Body.NoMoreRecords!=true){J.AMT_MessageLog_GetRecords(Y.Body.IterationIdentifier,390,l,[ac[0],S,ac[2]])}else{ac[0](J,S,ac[2])}}var f="Platform firmware (e.g. BIOS)|SMI handler|ISV system management software|Alert ASIC|IPMI|BIOS vendor|System board set vendor|System integrator|Third party add-in|OSV|NIC|System management card".split("|");var p="Unspecified.|No system memory is physically installed in the system.|No usable system memory, all installed memory has experienced an unrecoverable failure.|Unrecoverable hard-disk/ATAPI/IDE device failure.|Unrecoverable system-board failure.|Unrecoverable diskette subsystem failure.|Unrecoverable hard-disk controller failure.|Unrecoverable PS/2 or USB keyboard failure.|Removable boot media not found.|Unrecoverable video controller failure.|No video device detected.|Firmware (BIOS) ROM corruption detected.|CPU voltage mismatch (processors that share same supply have mismatched voltage requirements)|CPU speed matching failure".split("|");var q="Unspecified.|Memory initialization.|Starting hard-disk initialization and test|Secondary processor(s) initialization|User authentication|User-initiated system setup|USB resource configuration|PCI resource configuration|Option ROM initialization|Video initialization|Cache initialization|SM Bus initialization|Keyboard controller initialization|Embedded controller/management controller initialization|Docking station attachment|Enabling docking station|Docking station ejection|Disabling docking station|Calling operating system wake-up vector|Starting operating system boot process|Baseboard or motherboard initialization|reserved|Floppy initialization|Keyboard test|Pointing device test|Primary processor initialization".split("|");var o="Unspecified|Other|Unknown|Processor|Disk|Peripheral|System management module|System board|Memory module|Processor module|Power supply|Add in card|Front panel board|Back panel board|Power system board|Drive backplane|System internal expansion board|Other system board|Processor board|Power unit|Power module|Power management board|Chassis back panel board|System chassis|Sub chassis|Other chassis board|Disk drive bay|Peripheral bay|Device bay|Fan cooling|Cooling unit|Cable interconnect|Memory device|System management software|BIOS|Intel(r) ME|System bus|Group|Intel(r) ME|External environment|Battery|Processing blade|Connectivity switch|Processor/memory module|I/O module|Processor I/O module|Management controller firmware|IPMI channel|PCI bus|PCI express bus|SCSI bus|SATA/SAS bus|Processor front side bus".split("|");J.RealmNames="||Redirection|PT Administration|Hardware Asset|Remote Control|Storage|Event Manager|Storage Admin|Agent Presence Local|Agent Presence Remote|Circuit Breaker|Network Time|General Information|Firmware Update|EIT|LocalUN|Endpoint Access Control|Endpoint Access Control Admin|Event Log Reader|Audit Log|ACL Realm|||Local System".split("|");J.WatchdogCurrentStates={1:"Not Started",2:"Stopped",4:"Running",8:"Expired",16:"Suspended"};function j(V,U,T,S){if(V==15){if(T[0]==235){return"Invalid Data"}if(U==0){return p[T[1]]}return q[T[1]]}if(V==18&&T[0]==170){return"Agent watchdog "+char2hex(T[4])+char2hex(T[3])+char2hex(T[2])+char2hex(T[1])+"-"+char2hex(T[6])+char2hex(T[5])+"-... changed to "+J.WatchdogCurrentStates[T[7]]}if(V==6){return"Authentication failed "+(T[1]+(T[2]<<8))+" times. The system may be under attack."}if(V==30){return"No bootable media"}if(V==32){return"Operating system lockup or power interrupt"}if(V==35){return"System boot failure"}if(V==37){return"System firmware started (at least one CPU is properly executing)."}return"Unknown Sensor Type #"+V}var a={16:"Security Admin",17:"RCO",18:"Redirection Manager",19:"Firmware Update Manager",20:"Security Audit Log",21:"Network Time",22:"Network Administration",23:"Storage Administration",24:"Event Manager",25:"Circuit Breaker Manager",26:"Agent Presence Manager",27:"Wireless Configuration",28:"EAC",29:"KVM",30:"User Opt-In Events",32:"Screen Blanking",33:"Watchdog Events",1600:"Provisioning Started",1601:"Provisioning Completed",1602:"ACL Entry Added",1603:"ACL Entry Modified",1604:"ACL Entry Removed",1605:"ACL Access with Invalid Credentials",1606:"ACL Entry State",1607:"TLS State Changed",1608:"TLS Server Certificate Set",1609:"TLS Server Certificate Remove",1610:"TLS Trusted Root Certificate Added",1611:"TLS Trusted Root Certificate Removed",1612:"TLS Preshared Key Set",1613:"Kerberos Settings Modified",1614:"Kerberos Master Key Modified",1615:"Flash Wear out Counters Reset",1616:"Power Package Modified",1617:"Set Realm Authentication Mode",1618:"Upgrade Client to Admin Control Mode",1619:"Unprovisioning Started",1700:"Performed Power Up",1701:"Performed Power Down",1702:"Performed Power Cycle",1703:"Performed Reset",1704:"Set Boot Options",1800:"IDER Session Opened",1801:"IDER Session Closed",1802:"IDER Enabled",1803:"IDER Disabled",1804:"SoL Session Opened",1805:"SoL Session Closed",1806:"SoL Enabled",1807:"SoL Disabled",1808:"KVM Session Started",1809:"KVM Session Ended",1810:"KVM Enabled",1811:"KVM Disabled",1812:"VNC Password Failed 3 Times",1900:"Firmware Updated",1901:"Firmware Update Failed",2000:"Security Audit Log Cleared",2001:"Security Audit Policy Modified",2002:"Security Audit Log Disabled",2003:"Security Audit Log Enabled",2004:"Security Audit Log Exported",2005:"Security Audit Log Recovered",2100:"Intel(R) ME Time Set",2200:"TCPIP Parameters Set",2201:"Host Name Set",2202:"Domain Name Set",2203:"VLAN Parameters Set",2204:"Link Policy Set",2205:"IPv6 Parameters Set",2300:"Global Storage Attributes Set",2301:"Storage EACL Modified",2302:"Storage FPACL Modified",2303:"Storage Write Operation",2400:"Alert Subscribed",2401:"Alert Unsubscribed",2402:"Event Log Cleared",2403:"Event Log Frozen",2500:"CB Filter Added",2501:"CB Filter Removed",2502:"CB Policy Added",2503:"CB Policy Removed",2504:"CB Default Policy Set",2505:"CB Heuristics Option Set",2506:"CB Heuristics State Cleared",2600:"Agent Watchdog Added",2601:"Agent Watchdog Removed",2602:"Agent Watchdog Action Set",2700:"Wireless Profile Added",2701:"Wireless Profile Removed",2702:"Wireless Profile Updated",2800:"EAC Posture Signer SET",2801:"EAC Enabled",2802:"EAC Disabled",2803:"EAC Posture State",2804:"EAC Set Options",2900:"KVM Opt-in Enabled",2901:"KVM Opt-in Disabled",2902:"KVM Password Changed",2903:"KVM Consent Succeeded",2904:"KVM Consent Failed",3000:"Opt-In Policy Change",3001:"Send Consent Code Event",3002:"Start Opt-In Blocked Event"};J.GetAuditLogExtendedDataStr=function(T,S){if((T==1602||T==1604)&&S[0]==0){return w(S).splice(2,2+S[1]).toString()}if(T==1603){if(S[1]==0){return w(S).splice(3).toString()}return null}if(T==1605){return["Invalid ME access","Invalid MEBx access"][S[0]]}if(T==1606){var U=["Disabled","Enabled"][S[0]];if(S[1]==0){U+=", "+S[3]}return U}if(T==1607){return"Remote "+["NoAuth","ServerAuth","MutualAuth"][S[0]]+", Local "+["NoAuth","ServerAuth","MutualAuth"][S[1]]}if(T==1617){return J.RealmNames[L(S,0)]+", "+["NoAuth","Auth","Disabled"][S[4]]}if(T==1619){return["BIOS","MEBx","Local MEI","Local WSMAN","Remote WSAMN"][S[0]]}if(T==1900){return"From "+N(S,0)+"."+N(S,2)+"."+N(S,4)+"."+N(S,6)+" to "+N(S,8)+"."+N(S,10)+"."+N(S,12)+"."+N(S,14)}if(T==2100){var V=new Date();V.setTime(L(S,0)*1000+(new Date().getTimezoneOffset()*60000));return V.toLocaleString()}if(T==3000){return"From "+["None","KVM","All"][S[0]]+" to "+["None","KVM","All"][S[1]]}if(T==3001){return["Success","Failed 3 times"][S[0]]}return null};J.GetAuditLog=function(S){J.AMT_AuditLog_ReadRecords(1,i,[S,[]])};function I(S){if(!S||S==null||typeof S=="object"){return S}return[S]}function N(T,S){return(T[S]<<8)+T[S+1]}function L(T,S){return(T[S]*16777216)+(T[S+1]<<16)+(T[S+2]<<8)+T[S+3]}function M(T,S){return(T[S+3]*16777216)+(T[S+2]<<16)+(T[S+1]<<8)+T[S]}function v(S){return Buffer.from(S).toString("base64")}function u(T){var U=null;try{U=Buffer.from(T,"base64").toString()}catch(S){console.log(S)}return U}function w(S){var U=[];for(var T in S){U.push(S[T])}return U}function i(ac,X,ab,ad,af){if(ad!=200){af[0](J,[],ad);return}var Z,W,S,T,ai,aa=af[1],ae=new Date(),ag;if(ab.Body.RecordsReturned>0){ab.Body.EventRecords=I(ab.Body.EventRecords);for(W in ab.Body.EventRecords){S=null;try{T=u(ab.Body.EventRecords[W]);S=Buffer.from(T)}catch(U){console.log(U+" "+ab.Body.EventRecords[W])}ai={AuditAppID:N(S,0),EventID:N(S,2),InitiatorType:S[4]};ai.AuditApp=a[ai.AuditAppID];ai.Event=a[(ai.AuditAppID*100)+ai.EventID];if(!ai.Event){ai.Event="#"+ai.EventID}if(ai.InitiatorType==0){var ah=S[5];ai.Initiator=S.slice(6,6+ah).toString();Z=6+ah}if(ai.InitiatorType==1){ai.KerberosUserInDomain=L(S,5);var ah=S[9];ai.Initiator=G(S.slice(10,10+ah));Z=10+ah}if(ai.InitiatorType==2){ai.Initiator="Local";Z=5}if(ai.InitiatorType==3){ai.Initiator="KVM Default Port";Z=5}ag=L(S,Z);ai.Time=new Date((ag+(ae.getTimezoneOffset()*60))*1000);Z+=4;ai.MCLocationType=S[Z++];var Y=S[Z++];ai.NetAddress=S.slice(Z,Z+Y).toString();Z+=Y;var V=S[Z++];ai.Ex=S.slice(Z,Z+V);ai.ExStr=J.GetAuditLogExtendedDataStr((ai.AuditAppID*100)+ai.EventID,ai.Ex);aa.push(ai)}}if(ab.Body.TotalRecordCount>aa.length){J.AMT_AuditLog_ReadRecords(aa.length+1,i,[af[0],aa])}else{af[0](J,aa,ad)}}function C(U){if(U===undefined||U===null){return null}var V="";for(var T in U){var S=U[T];if(!S){continue}if(S.__parameterType==="reference"){V+=O(T,S)}else{V+=H(T,S)}}return V}function H(V,U){if(U===undefined||U===null){return null}var T=!!U.__namespace;var Z=T?"";for(var X in U){if(!U.hasOwnProperty(X)||X.indexOf("__")===0){continue}if(typeof U[X]==="function"||Array.isArray(U[X])){continue}if(typeof U[X]==="object"){console.error("only convert one level down...")}else{Y+=Z+X+">"+U[X].toString()+S+X+">"}}Y+="";return Y}function O(T,S){if(S===undefined||S===null){return null}var U="/wsman"+S.__resourceUri+"";for(var V in S){if(!S.hasOwnProperty(V)||V.indexOf("__")===0){continue}if(typeof S[V]==="function"||typeof S[V]==="object"||Array.isArray(S[V])){continue}U+=''+S[V].toString()+""}U+="";return U}function G(U){var T="S-"+U.charCodeAt(0)+"-"+U.charCodeAt(7);for(var S=2;S<(U.length/4);S++){T+="-"+M(U,S*4)}return T}function F(V){if(!V||V==null){return null}var U=V.split("-");if(U.length<4||(U[0]!="s"&&U[0]!="S")){return null}for(var S=1;S MeshCentral
{{{title}}}
{{{title2}}}

{{{logoutControl}}}

 

\ No newline at end of file + MeshCentral
{{{title}}}
{{{title2}}}

{{{logoutControl}}}

 

\ No newline at end of file diff --git a/views/default-mobile-min.handlebars b/views/default-mobile-min.handlebars index 87576fb2..380d608c 100644 --- a/views/default-mobile-min.handlebars +++ b/views/default-mobile-min.handlebars @@ -1 +1 @@ - MeshCentral
{{{title}}}
{{{title2}}}
\ No newline at end of file + MeshCentral
{{{title}}}
{{{title2}}}
\ No newline at end of file diff --git a/views/default-mobile.handlebars b/views/default-mobile.handlebars index 4b829a90..b12064f7 100644 --- a/views/default-mobile.handlebars +++ b/views/default-mobile.handlebars @@ -1638,10 +1638,10 @@ var states = []; if (node.state > 0 && node.state < powerStatetable.length) state.push(powerStatetable[node.state]); if (node.conn) { - if ((node.conn & 1) != 0) states.push('Agent'); - if ((node.conn & 2) != 0) states.push('CIRA'); - if ((node.conn & 4) != 0) states.push('Intel® AMT'); - if ((node.conn & 8) != 0) states.push('Relay'); + if ((node.conn & 1) != 0) { states.push('Agent'); } + if ((node.conn & 2) != 0) { states.push('CIRA'); } + else if ((node.conn & 4) != 0) { states.push('Intel® AMT'); } + if ((node.conn & 8) != 0) { states.push('Relay'); } } if ((node.pwr != null) && (node.pwr != 0)) { states.push(powerStateStrings[node.pwr]); } return states.join(', '); @@ -1801,7 +1801,7 @@ var cstate = []; if ((node.conn & 1) != 0) cstate.push('Agent'); if ((node.conn & 2) != 0) cstate.push('Intel® AMT CIRA'); - if ((node.conn & 4) != 0) cstate.push('Intel® AMT'); + else if ((node.conn & 4) != 0) cstate.push('Intel® AMT'); if ((node.conn & 8) != 0) cstate.push('Agent Relay'); x += addDeviceAttribute('Connectivity', cstate.join(', ')); } @@ -1836,8 +1836,8 @@ var powerstate = PowerStateStr(node.state); //if (node.state == 0) { powerstate = 'Unknown State'; } if ((connectivity & 1) != 0) { if (powerstate.length > 0) { powerstate += ', '; } powerstate += 'Mesh Agent'; } - if ((connectivity & 2) != 0) { if (powerstate.length > 0) { powerstate += ', '; } powerstate += 'Intel® AMT connected'; } else - if ((connectivity & 4) != 0) { if (powerstate.length > 0) { powerstate += ', '; } powerstate += 'Intel® AMT detected'; } + if ((connectivity & 2) != 0) { if (powerstate.length > 0) { powerstate += ', '; } powerstate += 'Intel® AMT connected'; } + else if ((connectivity & 4) != 0) { if (powerstate.length > 0) { powerstate += ', '; } powerstate += 'Intel® AMT detected'; } QH('MainComputerState', powerstate); // Set the node icon diff --git a/views/default.handlebars b/views/default.handlebars index 486588fc..4450dbd5 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -2634,10 +2634,10 @@ var states = []; if (node.state > 0 && node.state < powerStatetable.length) state.push(powerStatetable[node.state]); if (node.conn) { - if ((node.conn & 1) != 0) states.push('Agent'); - if ((node.conn & 2) != 0) states.push('CIRA'); - if ((node.conn & 4) != 0) states.push('Intel® AMT'); - if ((node.conn & 8) != 0) states.push('Relay'); + if ((node.conn & 1) != 0) { states.push('Agent'); } + if ((node.conn & 2) != 0) { states.push('CIRA'); } + else if ((node.conn & 4) != 0) { states.push('Intel® AMT'); } + if ((node.conn & 8) != 0) { states.push('Relay'); } } if ((node.pwr != null) && (node.pwr != 0)) { states.push(powerStateStrings[node.pwr]); } return states.join(', '); @@ -3572,7 +3572,7 @@ var cstate = []; if ((node.conn & 1) != 0) cstate.push('Mesh Agent'); if ((node.conn & 2) != 0) cstate.push('Intel® AMT CIRA'); - if ((node.conn & 4) != 0) cstate.push('Intel® AMT'); + else if ((node.conn & 4) != 0) cstate.push('Intel® AMT'); if ((node.conn & 8) != 0) cstate.push('Mesh Relay'); x += addDeviceAttribute('Connectivity', cstate.join(', ')); } @@ -3621,7 +3621,7 @@ //if (node.state == 0) { powerstate = 'Unknown State'; } if ((connectivity & 1) != 0) { if (powerstate.length > 0) { powerstate += '
'; } powerstate += 'Agent connected'; } if ((connectivity & 2) != 0) { if (powerstate.length > 0) { powerstate += '
'; } powerstate += 'Intel® AMT connected'; } - if ((connectivity & 4) != 0) { if (powerstate.length > 0) { powerstate += '
'; } powerstate += 'Intel® AMT detected'; } + else if ((connectivity & 4) != 0) { if (powerstate.length > 0) { powerstate += '
'; } powerstate += 'Intel® AMT detected'; } if ((powerstate == '') && node.lastconnect) { powerstate = 'Last seen:
' + new Date(node.lastconnect).toLocaleDateString() + ', ' + new Date(node.lastconnect).toLocaleTimeString() + '
'; } QH('MainComputerState', powerstate); @@ -5909,7 +5909,7 @@ if (currentMesh.amt && currentMesh.amt.type == 2) { Q('dp20amtpolicypass').value = currentMesh.amt.password; Q('dp20amtbadpass').value = currentMesh.amt.badpass; - Q('dp20amtcira').value = currentMesh.amt.cirasetup; + if ((features & 0x400) == 0) { Q('dp20amtcira').value = currentMesh.amt.cirasetup; } } dp20amtValidatePolicy(); @@ -5920,7 +5920,7 @@ if (ptype == 2) { x = addHtmlValue('Password*', '') x += addHtmlValue('Password mismatch', ""); - x += addHtmlValue('CIRA', ""); + if ((features & 0x400) == 0) { x += addHtmlValue('CIRA', ""); } x += '
* Recommanded, leave blank to assign a random password to each device.
'; x += 'This policy will not impact devices with Intel® AMT in ACM mode.
'; x += 'This is not a secure policy as agents will be performing activation.'; @@ -5936,7 +5936,10 @@ function p20editMeshAmtEx() { var ptype = parseInt(Q('dp20amtpolicy').value), amtpolicy = { type: ptype }; - if (ptype == 2) { amtpolicy = { type: ptype, password: Q('dp20amtpolicypass').value, badpass: parseInt(Q('dp20amtbadpass').value), cirasetup: parseInt(Q('dp20amtcira').value) }; } + if (ptype == 2) { + amtpolicy = { type: ptype, password: Q('dp20amtpolicypass').value, badpass: parseInt(Q('dp20amtbadpass').value) }; + if ((features & 0x400) == 0) { amtpolicy.cirasetup = parseInt(Q('dp20amtcira').value); } else { amtpolicy.cirasetup = 1; } + } meshserver.send({ action: 'meshamtpolicy', meshid: currentMesh._id, amtpolicy: amtpolicy }); }