mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-07-17 04:32:40 -04:00
1 line
40 KiB
JavaScript
1 line
40 KiB
JavaScript
function AmtStackCreateService(e){var t=new Object;t.wsman=e,t.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/"],t.PendingEnums=[],t.PendingBatchOperations=0,t.ActiveEnumsCount=0,t.MaxActiveEnumsCount=1,t.onProcessChanged=null;var n=0,i=0;function o(){var e=t.GetPendingActions();n<e&&(n=e),null!=t.onProcessChanged&&i!=e&&(i=e,t.onProcessChanged(e,n)),0==e&&(n=0)}function r(e,n,i,a,s,u,d,S){if(200!=u)return i(t,e,null,u,d),void c(1);if(null==n||"PullResponse"!=n.Header.Method)return i(t,e,null,604,d),void c(1);for(var A in n.Body.Items)if(n.Body.Items[A]instanceof Array)for(var _ in n.Body.Items[A])s.push(n.Body.Items[A][_]);else s.push(n.Body.Items[A]);if(n.Body.EnumerationContext){var l=n.Body.EnumerationContext;t.wsman.ExecPull(a,l,(function(t,n,o,c){r(e,o,i,n,s,c,d,1)}))}else c(1),i(t,e,s,u,d),o()}function c(e){if(t.ActiveEnumsCount-=e,!(t.ActiveEnumsCount>=t.MaxActiveEnumsCount||0==t.PendingEnums.length)){var n=t.PendingEnums.shift();t.Enum(n[0],n[1],n[2]),c(0)}}function a(e,n,i,r,c,s,u){t.PendingBatchOperations-=2;var d=n.shift(),S=t.Enum;"*"==d[0]&&(S=t.Get,d=d.substring(1)),S(d,(function(c,d,S,A,_){_[2][d]={response:null==S?null:S.Body,responses:S,status:A},0==_[1].length||401==A||1!=s&&200!=A&&400!=A?(t.PendingBatchOperations-=2*n.length,o(),i(t,e,_[2],A,r)):(o(),a(e,n,i,r,_[2],u))}),[e,n,c],u),o()}function s(e){e.names.length<=e.current?e.callback(t,e.name,e.responses,200,e.tag):(t.wsman.ExecGet(t.CompleteName(e.names[e.current]),(function(n,i,o,r){!function(e,n,i){null==n||200!=i?e.callback(t,e.name,null,i,e.tag):(e.responses[n.Header.Method]=n,s(e))}(e,o,r)}),e.pri),e.current++),o()}function u(e,n,i,o,r){200==o&&"0"==i.Body.ReturnValue?t.AMT_MessageLog_GetRecords(i.Body.IterationIdentifier,390,d,r):r[0](t,null,r[2])}function d(e,n,i,o,r){if(200==o&&"0"==i.Body.ReturnValue){var c,a,s,u,S,A=r[2],E=new Date,C=i.Body.RecordArray;for(c in"string"==typeof C&&(i.Body.RecordArray=[i.Body.RecordArray]),C){u=null;try{u=window.atob(C[c])}catch(e){}if(null!=u&&(S=ReadIntX(u,0))>0&&S<4294967295){for(s={DeviceAddress:u.charCodeAt(4),EventSensorType:u.charCodeAt(5),EventType:u.charCodeAt(6),EventOffset:u.charCodeAt(7),EventSourceType:u.charCodeAt(8),EventSeverity:u.charCodeAt(9),SensorNumber:u.charCodeAt(10),Entity:u.charCodeAt(11),EntityInstance:u.charCodeAt(12),EventData:[],Time:new Date(1e3*(S+60*E.getTimezoneOffset()))},a=13;a<21;a++)s.EventData.push(u.charCodeAt(a));s.EntityStr=_[s.Entity],s.Desc=l(s.EventSensorType,s.EventOffset,s.EventData,s.Entity),s.EntityStr||(s.EntityStr="Unknown"),A.push(s)}}1!=i.Body.NoMoreRecords?t.AMT_MessageLog_GetRecords(i.Body.IterationIdentifier,390,d,[r[0],A,r[2]]):r[0](t,A,r[2])}else r[0](t,null,r[2])}t.GetPendingActions=function(){return 2*t.PendingEnums.length+t.ActiveEnumsCount+t.wsman.comm.PendingAjax.length+t.wsman.comm.ActiveAjaxCount+t.PendingBatchOperations},t.Subscribe=function(e,n,i,r,c,a,s,u,d,S){t.wsman.ExecSubscribe(t.CompleteName(e),n,i,(function(n,i,a,s){o(),r(t,e,a,s,c)}),0,a,s,u,d,S),o()},t.UnSubscribe=function(e,n,i,r,c){t.wsman.ExecUnSubscribe(t.CompleteName(e),(function(r,c,a,s){o(),n(t,e,a,s,i)}),0,r,c),o()},t.Get=function(e,n,i,r){t.wsman.ExecGet(t.CompleteName(e),(function(r,c,a,s){o(),n(t,e,a,s,i)}),0,r),o()},t.Put=function(e,n,i,r,c,a){t.wsman.ExecPut(t.CompleteName(e),n,(function(n,c,a,s){o(),i(t,e,a,s,r)}),0,c,a),o()},t.Create=function(e,n,i,r,c){t.wsman.ExecCreate(t.CompleteName(e),n,(function(n,c,a,s){o(),i(t,e,a,s,r)}),0,c),o()},t.Delete=function(e,n,i,r,c){t.wsman.ExecDelete(t.CompleteName(e),n,(function(n,c,a,s){o(),i(t,e,a,s,r)}),0,c),o()},t.Exec=function(e,n,i,r,c,a,s){t.wsman.ExecMethod(t.CompleteName(e),n,i,(function(n,i,a,s){o(),r(t,e,t.CompleteExecResponse(a),s,c)}),0,a,s),o()},t.ExecWithXml=function(e,n,i,r,c,a,s){t.wsman.ExecMethodXml(t.CompleteName(e),n,execArgumentsToXml(i),(function(n,i,a,s){o(),r(t,e,t.CompleteExecResponse(a),s,c)}),0,a,s),o()},t.Enum=function(e,n,i,a){t.ActiveEnumsCount<t.MaxActiveEnumsCount?(t.ActiveEnumsCount++,t.wsman.ExecEnum(t.CompleteName(e),(function(i,a,s,u,d){o(),function(e,n,i,o,a,s,u){if(200!=a)return i(t,e,null,a,s),void c(1);if(null==n||"EnumerateResponse"!=n.Header.Method||!n.Body.EnumerationContext)return i(t,e,null,603,s),void c(1);var d=n.Body.EnumerationContext;t.wsman.ExecPull(o,d,(function(t,n,o,c){r(e,o,i,n,[],c,s,u)}))}(e,s,n,a,u,d)}),i,a)):t.PendingEnums.push([e,n,i,a]),o()},t.BatchEnum=function(e,n,i,r,c,s){t.PendingBatchOperations+=2*n.length,a(e,Clone(n),i,r,{},c,s),o()},t.BatchGet=function(e,t,n,i,r){s({name:e,names:t,callback:n,current:0,responses:{},tag:i,pri:r}),o()},t.CompleteName=function(e){return 0==e.indexOf("AMT_")?t.pfx[0]+e:0==e.indexOf("CIM_")?t.pfx[1]+e:0==e.indexOf("IPS_")?t.pfx[2]+e:void 0},t.CompleteExecResponse=function(e){return e&&null!=e&&e.Body&&e.Body.ReturnValue&&(e.Body.ReturnValueStr=t.AmtStatusToStr(e.Body.ReturnValue)),e},t.RequestPowerStateChange=function(e,n){t.CIM_PowerManagementService_RequestPowerStateChange(e,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',null,null,n)},t.SetBootConfigRole=function(e,n){t.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',e,n)},t.CancelAllQueries=function(e){t.wsman.CancelAllQueries(e)},t.AMT_AgentPresenceWatchdog_RegisterAgent=function(e){t.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},e)},t.AMT_AgentPresenceWatchdog_AssertPresence=function(e,n){t.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:e},n)},t.AMT_AgentPresenceWatchdog_AssertShutdown=function(e,n){t.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:e},n)},t.AMT_AgentPresenceWatchdog_AddAction=function(e,n,i,o,r,c,a,s,u){t.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:e,NewState:n,EventOnTransition:i,ActionSd:o,ActionEac:r},c,a,s,u)},t.AMT_AgentPresenceWatchdog_DeleteAllActions=function(e,n,i,o){t.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},e,n,i,o)},t.AMT_AgentPresenceWatchdogAction_GetActionEac=function(e){t.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},e)},t.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(e){t.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},e)},t.AMT_AgentPresenceWatchdogVA_AssertPresence=function(e,n){t.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:e},n)},t.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(e,n){t.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:e},n)},t.AMT_AgentPresenceWatchdogVA_AddAction=function(e,n,i,o,r,c){t.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:e,NewState:n,EventOnTransition:i,ActionSd:o,ActionEac:r},c)},t.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(e,n){t.Exec("AMT_AgentPresenceWatchdogVA","DeleteAllActions",{_method_dummy:e},n)},t.AMT_AuditLog_ClearLog=function(e){t.Exec("AMT_AuditLog","ClearLog",{},e)},t.AMT_AuditLog_RequestStateChange=function(e,n,i){t.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:n},i)},t.AMT_AuditLog_ReadRecords=function(e,n,i){t.Exec("AMT_AuditLog","ReadRecords",{StartIndex:e},n,i)},t.AMT_AuditLog_SetAuditLock=function(e,n,i,o){t.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:e,Flag:n,Handle:i},o)},t.AMT_AuditLog_ExportAuditLogSignature=function(e,n){t.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:e},n)},t.AMT_AuditLog_SetSigningKeyMaterial=function(e,n,i,o,r){t.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:e,SigningKey:n,LengthOfCertificates:i,Certificates:o},r)},t.AMT_AuditPolicyRule_SetAuditPolicy=function(e,n,i,o,r){t.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:e,AuditedAppID:n,EventID:i,PolicyType:o},r)},t.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(e,n,i,o,r){t.Exec("AMT_AuditPolicyRule","SetAuditPolicyBulk",{Enable:e,AuditedAppID:n,EventID:i,PolicyType:o},r)},t.AMT_AuthorizationService_AddUserAclEntryEx=function(e,n,i,o,r,c){t.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:e,DigestPassword:n,KerberosUserSid:i,AccessPermission:o,Realms:r},c)},t.AMT_AuthorizationService_EnumerateUserAclEntries=function(e,n){t.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:e},n)},t.AMT_AuthorizationService_GetUserAclEntryEx=function(e,n,i){t.Exec("AMT_AuthorizationService","GetUserAclEntryEx",{Handle:e},n,i)},t.AMT_AuthorizationService_UpdateUserAclEntryEx=function(e,n,i,o,r,c,a){t.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:e,DigestUsername:n,DigestPassword:i,KerberosUserSid:o,AccessPermission:r,Realms:c},a)},t.AMT_AuthorizationService_RemoveUserAclEntry=function(e,n){t.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:e},n)},t.AMT_AuthorizationService_SetAdminAclEntryEx=function(e,n,i){t.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",{Username:e,DigestPassword:n},i)},t.AMT_AuthorizationService_GetAdminAclEntry=function(e){t.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},e)},t.AMT_AuthorizationService_GetAdminAclEntryStatus=function(e){t.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},e)},t.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(e){t.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},e)},t.AMT_AuthorizationService_SetAclEnabledState=function(e,n,i,o){t.Exec("AMT_AuthorizationService","SetAclEnabledState",{Handle:e,Enabled:n},i,o)},t.AMT_AuthorizationService_GetAclEnabledState=function(e,n,i){t.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:e},n,i)},t.AMT_EndpointAccessControlService_RequestStateChange=function(e,n,i){t.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:e,TimeoutPeriod:n},i)},t.AMT_EndpointAccessControlService_GetPosture=function(e,n){t.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:e},n)},t.AMT_EndpointAccessControlService_GetPostureHash=function(e,n){t.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:e},n)},t.AMT_EndpointAccessControlService_UpdatePostureState=function(e,n){t.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:e},n)},t.AMT_EndpointAccessControlService_GetEacOptions=function(e){t.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},e)},t.AMT_EndpointAccessControlService_SetEacOptions=function(e,n,i){t.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:e,PostureHashAlgorithm:n},i)},t.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(e,n){t.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:e},n)},t.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(e,n){t.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:e},n)},t.AMT_EthernetPortSettings_SetLinkPreference=function(e,n,i){t.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:e,Timeout:n},i)},t.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(e,n){t.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:e},n)},t.AMT_KerberosSettingData_GetCredentialCacheState=function(e){t.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},e)},t.AMT_KerberosSettingData_SetCredentialCacheState=function(e,n){t.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:e},n)},t.AMT_MessageLog_CancelIteration=function(e,n){t.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:e},n)},t.AMT_MessageLog_RequestStateChange=function(e,n,i){t.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:n},i)},t.AMT_MessageLog_ClearLog=function(e){t.Exec("AMT_MessageLog","ClearLog",{},e)},t.AMT_MessageLog_GetRecords=function(e,n,i,o){t.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:e,MaxReadRecords:n},i,o)},t.AMT_MessageLog_GetRecord=function(e,n,i){t.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:e,PositionToNext:n},i)},t.AMT_MessageLog_PositionAtRecord=function(e,n,i,o){t.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:e,MoveAbsolute:n,RecordNumber:i},o)},t.AMT_MessageLog_PositionToFirstRecord=function(e,n){t.Exec("AMT_MessageLog","PositionToFirstRecord",{},e,n)},t.AMT_MessageLog_FreezeLog=function(e,n){t.Exec("AMT_MessageLog","FreezeLog",{Freeze:e},n)},t.AMT_PublicKeyManagementService_AddCRL=function(e,n,i){t.Exec("AMT_PublicKeyManagementService","AddCRL",{Url:e,SerialNumbers:n},i)},t.AMT_PublicKeyManagementService_ResetCRLList=function(e,n){t.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:e},n)},t.AMT_PublicKeyManagementService_AddCertificate=function(e,n){t.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:e},n)},t.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(e,n){t.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:e},n)},t.AMT_PublicKeyManagementService_AddKey=function(e,n){t.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:e},n)},t.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(e,n,i,o){t.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:e,DNName:n,Usage:i},o)},t.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(e,n,i,o){t.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:e,SigningAlgorithm:n,NullSignedCertificateRequest:i},o)},t.AMT_PublicKeyManagementService_GenerateKeyPair=function(e,n,i){t.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:e,KeyLength:n},i)},t.AMT_RedirectionService_RequestStateChange=function(e,n){t.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:e},n)},t.AMT_RedirectionService_TerminateSession=function(e,n){t.Exec("AMT_RedirectionService","TerminateSession",{SessionType:e},n)},t.AMT_RemoteAccessService_AddMpServer=function(e,n,i,o,r,c,a,s,u){t.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:e,InfoFormat:n,Port:i,AuthMethod:o,Certificate:r,Username:c,Password:a,CN:s},u)},t.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(e,n,i,o,r){t.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:e,TunnelLifeTime:n,ExtendedData:i,MpServer:o},r)},t.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(e,n){t.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:e},n)},t.AMT_SetupAndConfigurationService_CommitChanges=function(e,n){t.Exec("AMT_SetupAndConfigurationService","CommitChanges",{_method_dummy:e},n)},t.AMT_SetupAndConfigurationService_Unprovision=function(e,n){t.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:e},n)},t.AMT_SetupAndConfigurationService_PartialUnprovision=function(e,n){t.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:e},n)},t.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(e,n){t.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:e},n)},t.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(e,n){t.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:e},n)},t.AMT_SetupAndConfigurationService_SetMEBxPassword=function(e,n){t.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:e},n)},t.AMT_SetupAndConfigurationService_SetTLSPSK=function(e,n,i){t.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:e,PPS:n},i)},t.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(e){t.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecord",{},e)},t.AMT_SetupAndConfigurationService_GetUuid=function(e){t.Exec("AMT_SetupAndConfigurationService","GetUuid",{},e)},t.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(e){t.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},e)},t.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(e){t.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},e)},t.AMT_SystemDefensePolicy_GetTimeout=function(e){t.Exec("AMT_SystemDefensePolicy","GetTimeout",{},e)},t.AMT_SystemDefensePolicy_SetTimeout=function(e,n){t.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:e},n)},t.AMT_SystemDefensePolicy_UpdateStatistics=function(e,n,i,o,r,c){t.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:e,ResetOnRead:n},i,o,r,c)},t.AMT_SystemPowerScheme_SetPowerScheme=function(e,n,i){t.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},e,i,0,{InstanceID:n})},t.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=function(e,n){t.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},e,n)},t.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(e,n,i,o,r){t.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:e,Tm1:n,Tm2:i},o,r)},t.AMT_UserInitiatedConnectionService_RequestStateChange=function(e,n,i){t.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:e,TimeoutPeriod:n},i)},t.AMT_WebUIService_RequestStateChange=function(e,n,i){t.Exec("AMT_WebUIService","RequestStateChange",{RequestedState:e,TimeoutPeriod:n},i)},t.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(e,n,i,o,r,c){t.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:e,WiFiEndpointSettingsInput:n,IEEE8021xSettingsInput:i,ClientCredential:o,CACredential:r},c)},t.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(e,n,i,o,r,c){t.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:e,WiFiEndpointSettingsInput:n,IEEE8021xSettingsInput:i,ClientCredential:o,CACredential:r},c)},t.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(e,n){t.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:e},n)},t.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(e,n){t.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:e},n)},t.CIM_Account_RequestStateChange=function(e,n,i){t.Exec("CIM_Account","RequestStateChange",{RequestedState:e,TimeoutPeriod:n},i)},t.CIM_AccountManagementService_CreateAccount=function(e,n,i){t.Exec("CIM_AccountManagementService","CreateAccount",{System:e,AccountTemplate:n},i)},t.CIM_BootConfigSetting_ChangeBootOrder=function(e,n){t.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:e},n)},t.CIM_BootService_SetBootConfigRole=function(e,n,i){t.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:e,Role:n},i,0,1)},t.CIM_Card_ConnectorPower=function(e,n,i){t.Exec("CIM_Card","ConnectorPower",{Connector:e,PoweredOn:n},i)},t.CIM_Card_IsCompatible=function(e,n){t.Exec("CIM_Card","IsCompatible",{ElementToCheck:e},n)},t.CIM_Chassis_IsCompatible=function(e,n){t.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:e},n)},t.CIM_Fan_SetSpeed=function(e,n){t.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:e},n)},t.CIM_KVMRedirectionSAP_RequestStateChange=function(e,n,i){t.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:e},i)},t.CIM_MediaAccessDevice_LockMedia=function(e,n){t.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:e},n)},t.CIM_MediaAccessDevice_SetPowerState=function(e,n,i){t.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:e,Time:n},i)},t.CIM_MediaAccessDevice_Reset=function(e){t.Exec("CIM_MediaAccessDevice","Reset",{},e)},t.CIM_MediaAccessDevice_EnableDevice=function(e,n){t.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:e},n)},t.CIM_MediaAccessDevice_OnlineDevice=function(e,n){t.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:e},n)},t.CIM_MediaAccessDevice_QuiesceDevice=function(e,n){t.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:e},n)},t.CIM_MediaAccessDevice_SaveProperties=function(e){t.Exec("CIM_MediaAccessDevice","SaveProperties",{},e)},t.CIM_MediaAccessDevice_RestoreProperties=function(e){t.Exec("CIM_MediaAccessDevice","RestoreProperties",{},e)},t.CIM_MediaAccessDevice_RequestStateChange=function(e,n,i){t.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:e,TimeoutPeriod:n},i)},t.CIM_PhysicalFrame_IsCompatible=function(e,n){t.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:e},n)},t.CIM_PhysicalPackage_IsCompatible=function(e,n){t.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:e},n)},t.CIM_PowerManagementService_RequestPowerStateChange=function(e,n,i,o,r){t.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:e,ManagedElement:n,Time:i,TimeoutPeriod:o},r,0,1)},t.CIM_PowerSupply_SetPowerState=function(e,n,i){t.Exec("CIM_PowerSupply","SetPowerState",{PowerState:e,Time:n},i)},t.CIM_PowerSupply_Reset=function(e){t.Exec("CIM_PowerSupply","Reset",{},e)},t.CIM_PowerSupply_EnableDevice=function(e,n){t.Exec("CIM_PowerSupply","EnableDevice",{Enabled:e},n)},t.CIM_PowerSupply_OnlineDevice=function(e,n){t.Exec("CIM_PowerSupply","OnlineDevice",{Online:e},n)},t.CIM_PowerSupply_QuiesceDevice=function(e,n){t.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:e},n)},t.CIM_PowerSupply_SaveProperties=function(e){t.Exec("CIM_PowerSupply","SaveProperties",{},e)},t.CIM_PowerSupply_RestoreProperties=function(e){t.Exec("CIM_PowerSupply","RestoreProperties",{},e)},t.CIM_PowerSupply_RequestStateChange=function(e,n,i){t.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:e,TimeoutPeriod:n},i)},t.CIM_Processor_SetPowerState=function(e,n,i){t.Exec("CIM_Processor","SetPowerState",{PowerState:e,Time:n},i)},t.CIM_Processor_Reset=function(e){t.Exec("CIM_Processor","Reset",{},e)},t.CIM_Processor_EnableDevice=function(e,n){t.Exec("CIM_Processor","EnableDevice",{Enabled:e},n)},t.CIM_Processor_OnlineDevice=function(e,n){t.Exec("CIM_Processor","OnlineDevice",{Online:e},n)},t.CIM_Processor_QuiesceDevice=function(e,n){t.Exec("CIM_Processor","QuiesceDevice",{Quiesce:e},n)},t.CIM_Processor_SaveProperties=function(e){t.Exec("CIM_Processor","SaveProperties",{},e)},t.CIM_Processor_RestoreProperties=function(e){t.Exec("CIM_Processor","RestoreProperties",{},e)},t.CIM_Processor_RequestStateChange=function(e,n,i){t.Exec("CIM_Processor","RequestStateChange",{RequestedState:e,TimeoutPeriod:n},i)},t.CIM_RecordLog_ClearLog=function(e){t.Exec("CIM_RecordLog","ClearLog",{},e)},t.CIM_RecordLog_RequestStateChange=function(e,n,i){t.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:n},i)},t.CIM_RedirectionService_RequestStateChange=function(e,n,i){t.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:e,TimeoutPeriod:n},i)},t.CIM_Sensor_SetPowerState=function(e,n,i){t.Exec("CIM_Sensor","SetPowerState",{PowerState:e,Time:n},i)},t.CIM_Sensor_Reset=function(e){t.Exec("CIM_Sensor","Reset",{},e)},t.CIM_Sensor_EnableDevice=function(e,n){t.Exec("CIM_Sensor","EnableDevice",{Enabled:e},n)},t.CIM_Sensor_OnlineDevice=function(e,n){t.Exec("CIM_Sensor","OnlineDevice",{Online:e},n)},t.CIM_Sensor_QuiesceDevice=function(e,n){t.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:e},n)},t.CIM_Sensor_SaveProperties=function(e){t.Exec("CIM_Sensor","SaveProperties",{},e)},t.CIM_Sensor_RestoreProperties=function(e){t.Exec("CIM_Sensor","RestoreProperties",{},e)},t.CIM_Sensor_RequestStateChange=function(e,n,i){t.Exec("CIM_Sensor","RequestStateChange",{RequestedState:e,TimeoutPeriod:n},i)},t.CIM_StatisticalData_ResetSelectedStats=function(e,n){t.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:e},n)},t.CIM_Watchdog_KeepAlive=function(e){t.Exec("CIM_Watchdog","KeepAlive",{},e)},t.CIM_Watchdog_SetPowerState=function(e,n,i){t.Exec("CIM_Watchdog","SetPowerState",{PowerState:e,Time:n},i)},t.CIM_Watchdog_Reset=function(e){t.Exec("CIM_Watchdog","Reset",{},e)},t.CIM_Watchdog_EnableDevice=function(e,n){t.Exec("CIM_Watchdog","EnableDevice",{Enabled:e},n)},t.CIM_Watchdog_OnlineDevice=function(e,n){t.Exec("CIM_Watchdog","OnlineDevice",{Online:e},n)},t.CIM_Watchdog_QuiesceDevice=function(e,n){t.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:e},n)},t.CIM_Watchdog_SaveProperties=function(e){t.Exec("CIM_Watchdog","SaveProperties",{},e)},t.CIM_Watchdog_RestoreProperties=function(e){t.Exec("CIM_Watchdog","RestoreProperties",{},e)},t.CIM_Watchdog_RequestStateChange=function(e,n,i){t.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:e,TimeoutPeriod:n},i)},t.CIM_WiFiPort_SetPowerState=function(e,n,i){t.Exec("CIM_WiFiPort","SetPowerState",{PowerState:e,Time:n},i)},t.CIM_WiFiPort_Reset=function(e){t.Exec("CIM_WiFiPort","Reset",{},e)},t.CIM_WiFiPort_EnableDevice=function(e,n){t.Exec("CIM_WiFiPort","EnableDevice",{Enabled:e},n)},t.CIM_WiFiPort_OnlineDevice=function(e,n){t.Exec("CIM_WiFiPort","OnlineDevice",{Online:e},n)},t.CIM_WiFiPort_QuiesceDevice=function(e,n){t.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:e},n)},t.CIM_WiFiPort_SaveProperties=function(e){t.Exec("CIM_WiFiPort","SaveProperties",{},e)},t.CIM_WiFiPort_RestoreProperties=function(e){t.Exec("CIM_WiFiPort","RestoreProperties",{},e)},t.CIM_WiFiPort_RequestStateChange=function(e,n,i){t.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:e,TimeoutPeriod:n},i)},t.IPS_HostBasedSetupService_Setup=function(e,n,i,o,r,c,a){t.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:e,NetworkAdminPassword:n,McNonce:i,Certificate:o,SigningAlgorithm:r,DigitalSignature:c},a)},t.IPS_HostBasedSetupService_AddNextCertInChain=function(e,n,i,o){t.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:e,IsLeafCertificate:n,IsRootCertificate:i},o)},t.IPS_HostBasedSetupService_AdminSetup=function(e,n,i,o,r,c){t.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:e,NetworkAdminPassword:n,McNonce:i,SigningAlgorithm:o,DigitalSignature:r},c)},t.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(e,n,i,o){t.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:e,SigningAlgorithm:n,DigitalSignature:i},o)},t.IPS_HostBasedSetupService_DisableClientControlMode=function(e,n){t.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:e},n)},t.IPS_KVMRedirectionSettingData_TerminateSession=function(e){t.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},e)},t.IPS_OptInService_StartOptIn=function(e){t.Exec("IPS_OptInService","StartOptIn",{},e)},t.IPS_OptInService_CancelOptIn=function(e){t.Exec("IPS_OptInService","CancelOptIn",{},e)},t.IPS_OptInService_SendOptInCode=function(e,n){t.Exec("IPS_OptInService","SendOptInCode",{OptInCode:e},n)},t.IPS_OptInService_StartService=function(e){t.Exec("IPS_OptInService","StartService",{},e)},t.IPS_OptInService_StopService=function(e){t.Exec("IPS_OptInService","StopService",{},e)},t.IPS_OptInService_RequestStateChange=function(e,n,i){t.Exec("IPS_OptInService","RequestStateChange",{RequestedState:e,TimeoutPeriod:n},i)},t.IPS_ProvisioningRecordLog_RequestStateChange=function(e,n,i){t.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:n},i)},t.IPS_ProvisioningRecordLog_ClearLog=function(e,n){t.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:e},n)},t.IPS_SecIOService_RequestStateChange=function(e,n,i){t.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:e,TimeoutPeriod:n},i)},t.AmtStatusToStr=function(e){return t.AmtStatusCodes[e]?t.AmtStatusCodes[e]:"UNKNOWN_ERROR"},t.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"},t.GetMessageLog=function(e,n){t.AMT_MessageLog_PositionToFirstRecord(u,[e,n,[]])};"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 S="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("|"),A="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("|"),_="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("|");function l(e,n,i,o){return 15==e?235==i[0]?"Invalid Data":0==n?S[i[1]]:A[i[1]]:18==e&&170==i[0]?"Agent watchdog "+char2hex(i[4])+char2hex(i[3])+char2hex(i[2])+char2hex(i[1])+"-"+char2hex(i[6])+char2hex(i[5])+"-... changed to "+t.WatchdogCurrentStates[i[7]]:6==e?"Authentication failed "+(i[1]+(i[2]<<8))+" times. The system may be under attack.":30==e?"No bootable media":32==e?"Operating system lockup or power interrupt":35==e?64==i[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"System boot failure":37==e?"System firmware started (at least one CPU is properly executing).":"Unknown Sensor Type #"+e}t.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("|"),t.WatchdogCurrentStates={1:"Not Started",2:"Stopped",4:"Running",8:"Expired",16:"Suspended"};var E={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 Main 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",2e3:"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® 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",3e3:"Opt-In Policy Change",3001:"Send Consent Code Event",3002:"Start Opt-In Blocked Event"};function C(e,n,i,o,r){if(200==o){var c,a,s,u,d,S=r[1],A=new Date;if(i.Body.RecordsReturned>0)for(a in i.Body.EventRecords=MakeToArray(i.Body.EventRecords),i.Body.EventRecords){s=null;try{s=window.atob(i.Body.EventRecords[a])}catch(s){console.log(s+" "+i.Body.EventRecords[a])}if((u={AuditAppID:ReadShort(s,0),EventID:ReadShort(s,2),InitiatorType:s.charCodeAt(4)}).AuditApp=E[u.AuditAppID],u.Event=E[100*u.AuditAppID+u.EventID],u.Event||(u.Event="#"+u.EventID),0==u.InitiatorType){var _=s.charCodeAt(5);u.Initiator=s.substring(6,6+_),c=6+_}if(1==u.InitiatorType){u.KerberosUserInDomain=ReadInt(s,5);_=s.charCodeAt(9);u.Initiator=GetSidString(s.substring(10,10+_)),c=10+_}2==u.InitiatorType&&(u.Initiator="<i>Local</i>",c=5),3==u.InitiatorType&&(u.Initiator="<i>KVM Default Port</i>",c=5),d=ReadInt(s,c),u.Time=new Date(1e3*(d+60*A.getTimezoneOffset())),c+=4,u.MCLocationType=s.charCodeAt(c++);var l=s.charCodeAt(c++);u.NetAddress=s.substring(c,c+l),c+=l;var m=s.charCodeAt(c++);u.Ex=s.substring(c,c+m),u.ExStr=t.GetAuditLogExtendedDataStr(100*u.AuditAppID+u.EventID,u.Ex),S.push(u)}i.Body.TotalRecordCount>S.length?t.AMT_AuditLog_ReadRecords(S.length+1,C,[r[0],S]):r[0](t,S,o)}else r[0](t,[],o)}return t.GetAuditLogExtendedDataStr=function(e,n){if((1602==e||1604==e)&&0==n.charCodeAt(0))return n.substring(2,2+n.charCodeAt(1));if(1603==e)return 0==n.charCodeAt(1)?n.substring(3):null;if(1605==e)return["Invalid ME access","Invalid MEBx access"][n.charCodeAt(0)];if(1606==e){var i=["Disabled","Enabled"][n.charCodeAt(0)];return 0==n.charCodeAt(1)&&(i+=", "+n.substring(3)),i}if(1607==e)return"Remote "+["NoAuth","ServerAuth","MutualAuth"][n.charCodeAt(0)]+", Local "+["NoAuth","ServerAuth","MutualAuth"][n.charCodeAt(1)];if(1617==e)return t.RealmNames[ReadInt(n,0)]+", "+["NoAuth","Auth","Disabled"][n.charCodeAt(4)];if(1619==e)return["BIOS","MEBx","Local MEI","Local WSMAN","Remote WSAMN"][n.charCodeAt(0)];if(1900==e)return"From "+ReadShort(n,0)+"."+ReadShort(n,2)+"."+ReadShort(n,4)+"."+ReadShort(n,6)+" to "+ReadShort(n,8)+"."+ReadShort(n,10)+"."+ReadShort(n,12)+"."+ReadShort(n,14);if(2100==e){var o=new Date;return o.setTime(1e3*ReadInt(n,0)+6e4*(new Date).getTimezoneOffset()),o.toLocaleString()}return 3e3==e?"From "+["None","KVM","All"][n.charCodeAt(0)]+" to "+["None","KVM","All"][n.charCodeAt(1)]:3001==e?["Success","Failed 3 times"][n.charCodeAt(0)]:null},t.GetAuditLog=function(e){t.AMT_AuditLog_ReadRecords(1,C,[e,[]])},t}function hex_md5(e){return null==e&&(e=""),forge.md.md5.create().update(e).digest().toHex()}for(var md5_k=[],i=0;i<64;)md5_k[i]=0|4294967296*Math.abs(Math.sin(++i));function hex_md5(e){null==e&&(e="");for(var t,n,i,o,r=[],c=unescape(encodeURI(e)),a=c.length,s=[t=1732584193,n=-271733879,~t,~n],u=0;u<=a;)r[u>>2]|=(c.charCodeAt(u)||128)<<u++%4*8;for(r[e=16*(a+8>>6)+14]=8*a,u=0;u<e;u+=16){for(a=s,o=0;o<64;)a=[i=a[3],(t=0|a[1])+((i=a[0]+[t&(n=a[2])|~t&i,i&t|~i&n,t^n^i,n^(t|~i)][a=o>>4]+(md5_k[o]+(0|r[[o,5*o+1,3*o+5,7*o][a]%16+u])))<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+o++%4])|i>>>32-a),t,n];for(o=4;o;)s[--o]=s[o]+a[o]}for(e="";o<32;)e+=(s[o>>3]>>4*(1^7&o++)&15).toString(16);return e}function rstr_md5(e){return hex2rstr(hex_md5(e))}function execArgumentsToXml(e){if(null==e)return null;var t="";for(var n in e){var i=e[n];i&&("reference"===i.__parameterType?t+=referenceToXml(n,i):t+=instanceToXml(n,i))}return t}function instanceToXml(e,t){if(null==t)return null;var n=!!t.__namespace,i=n?"<q:":"<",o=n?"</q:":"</",r="<r:"+e+(n?' xmlns:q="'+t.__namespace+'"':"")+">";if("string"==typeof t)r+=t;else for(var c in t)t.hasOwnProperty(c)&&0!==c.indexOf("__")&&("function"==typeof t[c]||Array.isArray(t[c])||("object"==typeof t[c]?console.error("only convert one level down..."):r+=i+c+">"+t[c].toString()+o+c+">"));return r+="</r:"+e+">"}function referenceToXml(e,t){if(null==t)return null;var n="<r:"+e+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+t.__resourceUri+"</w:ResourceURI><w:SelectorSet>";for(var i in t)t.hasOwnProperty(i)&&0!==i.indexOf("__")&&("function"==typeof t[i]||"object"==typeof t[i]||Array.isArray(t[i])||(n+='<w:Selector Name="'+i+'">'+t[i].toString()+"</w:Selector>"));return n+="</w:SelectorSet></a:ReferenceParameters></r:"+e+">"}function GetSidString(e){for(var t="S-"+e.charCodeAt(0)+"-"+e.charCodeAt(7),n=2;n<e.length/4;n++)t+="-"+ReadIntX(e,4*n);return t}function GetSidByteArray(e){if(!e||null==e)return null;var t=e.split("-");if(t.length<4||"s"!=t[0]&&"S"!=t[0])return null;for(var n=1;n<t.length;n++){var i=parseInt(t[n]);if(i!=t[n])return null;t[n]=i}var o=String.fromCharCode(t[1])+String.fromCharCode(t.length-3)+ShortToStr(Math.floor(t[2]/Math.pow(2,32)))+IntToStr(65535&t[2]);for(n=3;n<t.length;n++)o+=IntToStrX(t[n]);return o} |