mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	Added SMBIOS field 131 as AMT verification fallback if 130 is undefined
This commit is contained in:
		
							parent
							
								
									9eab6881ca
								
							
						
					
					
						commit
						5ba4636b9e
					
				
					 2 changed files with 28 additions and 6 deletions
				
			
		| 
						 | 
					@ -269,15 +269,18 @@ function SMBiosTables()
 | 
				
			||||||
    this.amtInfo = function amtInfo(data) {
 | 
					    this.amtInfo = function amtInfo(data) {
 | 
				
			||||||
        if (!data) { throw ('no data'); }
 | 
					        if (!data) { throw ('no data'); }
 | 
				
			||||||
        var retVal = { AMT: false };
 | 
					        var retVal = { AMT: false };
 | 
				
			||||||
        if (data[130] && data[130].peek().slice(0, 4).toString() == '$AMT') {
 | 
					        if (data[130] && data[130].peek().slice(0, 4).toString() == '$AMT')
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
            var amt = data[130].peek();
 | 
					            var amt = data[130].peek();
 | 
				
			||||||
            retVal.AMT = amt[4] ? true : false;
 | 
					            retVal.AMT = amt[4] ? true : false;
 | 
				
			||||||
            if (retVal.AMT) {
 | 
					            if (retVal.AMT)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
                retVal.enabled = amt[5] ? true : false;
 | 
					                retVal.enabled = amt[5] ? true : false;
 | 
				
			||||||
                retVal.storageRedirection = amt[6] ? true : false;
 | 
					                retVal.storageRedirection = amt[6] ? true : false;
 | 
				
			||||||
                retVal.serialOverLan = amt[7] ? true : false;
 | 
					                retVal.serialOverLan = amt[7] ? true : false;
 | 
				
			||||||
                retVal.kvm = amt[14] ? true : false;
 | 
					                retVal.kvm = amt[14] ? true : false;
 | 
				
			||||||
                if (data[131].peek() && data[131].peek().slice(52, 56).toString() == 'vPro') {
 | 
					                if (data[131].peek() && data[131].peek().slice(52, 56).toString() == 'vPro')
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
                    var settings = data[131].peek();
 | 
					                    var settings = data[131].peek();
 | 
				
			||||||
                    if (settings[0] & 0x04) { retVal.TXT = (settings[0] & 0x08) ? true : false; }
 | 
					                    if (settings[0] & 0x04) { retVal.TXT = (settings[0] & 0x08) ? true : false; }
 | 
				
			||||||
                    if (settings[0] & 0x10) { retVal.VMX = (settings[0] & 0x20) ? true : false; }
 | 
					                    if (settings[0] & 0x10) { retVal.VMX = (settings[0] & 0x20) ? true : false; }
 | 
				
			||||||
| 
						 | 
					@ -295,6 +298,14 @@ function SMBiosTables()
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        if (!retVal.AMT)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if (data[131].peek() && data[131].peek().slice(52, 56).toString() == 'vPro')
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                var settings = data[131].peek();
 | 
				
			||||||
 | 
					                if ((settings[20] & 0x08) == 0x08) { retVal.AMT = true; }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        return (retVal);
 | 
					        return (retVal);
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    this.smTableTypes = {
 | 
					    this.smTableTypes = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -269,15 +269,18 @@ function SMBiosTables()
 | 
				
			||||||
    this.amtInfo = function amtInfo(data) {
 | 
					    this.amtInfo = function amtInfo(data) {
 | 
				
			||||||
        if (!data) { throw ('no data'); }
 | 
					        if (!data) { throw ('no data'); }
 | 
				
			||||||
        var retVal = { AMT: false };
 | 
					        var retVal = { AMT: false };
 | 
				
			||||||
        if (data[130] && data[130].peek().slice(0, 4).toString() == '$AMT') {
 | 
					        if (data[130] && data[130].peek().slice(0, 4).toString() == '$AMT')
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
            var amt = data[130].peek();
 | 
					            var amt = data[130].peek();
 | 
				
			||||||
            retVal.AMT = amt[4] ? true : false;
 | 
					            retVal.AMT = amt[4] ? true : false;
 | 
				
			||||||
            if (retVal.AMT) {
 | 
					            if (retVal.AMT)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
                retVal.enabled = amt[5] ? true : false;
 | 
					                retVal.enabled = amt[5] ? true : false;
 | 
				
			||||||
                retVal.storageRedirection = amt[6] ? true : false;
 | 
					                retVal.storageRedirection = amt[6] ? true : false;
 | 
				
			||||||
                retVal.serialOverLan = amt[7] ? true : false;
 | 
					                retVal.serialOverLan = amt[7] ? true : false;
 | 
				
			||||||
                retVal.kvm = amt[14] ? true : false;
 | 
					                retVal.kvm = amt[14] ? true : false;
 | 
				
			||||||
                if (data[131].peek() && data[131].peek().slice(52, 56).toString() == 'vPro') {
 | 
					                if (data[131].peek() && data[131].peek().slice(52, 56).toString() == 'vPro')
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
                    var settings = data[131].peek();
 | 
					                    var settings = data[131].peek();
 | 
				
			||||||
                    if (settings[0] & 0x04) { retVal.TXT = (settings[0] & 0x08) ? true : false; }
 | 
					                    if (settings[0] & 0x04) { retVal.TXT = (settings[0] & 0x08) ? true : false; }
 | 
				
			||||||
                    if (settings[0] & 0x10) { retVal.VMX = (settings[0] & 0x20) ? true : false; }
 | 
					                    if (settings[0] & 0x10) { retVal.VMX = (settings[0] & 0x20) ? true : false; }
 | 
				
			||||||
| 
						 | 
					@ -295,6 +298,14 @@ function SMBiosTables()
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        if (!retVal.AMT)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if (data[131].peek() && data[131].peek().slice(52, 56).toString() == 'vPro')
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                var settings = data[131].peek();
 | 
				
			||||||
 | 
					                if ((settings[20] & 0x08) == 0x08) { retVal.AMT = true; }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        return (retVal);
 | 
					        return (retVal);
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    this.smTableTypes = {
 | 
					    this.smTableTypes = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue