mirror of
				https://github.com/Ylianst/MeshCentral.git
				synced 2025-03-09 15:40:18 +00:00 
			
		
		
		
	add tpm to csv (#5660)
This commit is contained in:
		
							parent
							
								
									97a624e2fc
								
							
						
					
					
						commit
						b0bb66fee8
					
				
					 1 changed files with 33 additions and 3 deletions
				
			
		
							
								
								
									
										36
									
								
								meshuser.js
									
										
									
									
									
								
							
							
						
						
									
										36
									
								
								meshuser.js
									
										
									
									
									
								
							|  | @ -4940,7 +4940,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use | |||
|                         if (type == 'csv') { | ||||
|                             try { | ||||
|                                 // Create the CSV file
 | ||||
|                                 output = 'id,name,rname,host,icon,ip,osdesc,groupname,av,update,firewall,bitlocker,avdetails,tags,cpu,osbuild,biosDate,biosVendor,biosVersion,boardName,boardVendor,boardVersion,productUuid,totalMemory,agentOpenSSL,agentCommitDate,agentCommitHash,agentCompileTime,netIfCount,macs,addresses,lastConnectTime,lastConnectAddr\r\n'; | ||||
|                                 output = 'id,name,rname,host,icon,ip,osdesc,groupname,av,update,firewall,bitlocker,avdetails,tags,cpu,osbuild,biosDate,biosVendor,biosVersion,boardName,boardVendor,boardVersion,productUuid,tpmversion,tpmmanufacturer,tpmmanufacturerversion,tpmisactivated,tpmisenabled,tpmisowned,totalMemory,agentOpenSSL,agentCommitDate,agentCommitHash,agentCompileTime,netIfCount,macs,addresses,lastConnectTime,lastConnectAddr\r\n'; | ||||
|                                 for (var i = 0; i < results.length; i++) { | ||||
|                                     const nodeinfo = results[i]; | ||||
| 
 | ||||
|  | @ -4973,7 +4973,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use | |||
|                                             output += ','; | ||||
|                                         } | ||||
|                                     } else { | ||||
|                                         output += ',,,,,,,,,,,,,'; | ||||
|                                         output += ',,,,,,,,,,,,,,,,,,,'; | ||||
|                                     } | ||||
| 
 | ||||
|                                     // System infomation
 | ||||
|  | @ -4998,6 +4998,18 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use | |||
|                                         output += ','; | ||||
|                                         if (nodeinfo.sys.hardware.identifiers && (nodeinfo.sys.hardware.identifiers.product_uuid)) { output += csvClean(nodeinfo.sys.hardware.identifiers.product_uuid); } | ||||
|                                         output += ','; | ||||
|                                         if (nodeinfo.sys.hardware.tpm && nodeinfo.sys.hardware.tpm.SpecVersion) { output += csvClean(nodeinfo.sys.hardware.tpm.SpecVersion); } | ||||
|                                         output += ','; | ||||
|                                         if (nodeinfo.sys.hardware.tpm && nodeinfo.sys.hardware.tpm.ManufacturerId) { output += csvClean(nodeinfo.sys.hardware.tpm.ManufacturerId); } | ||||
|                                         output += ','; | ||||
|                                         if (nodeinfo.sys.hardware.tpm && nodeinfo.sys.hardware.tpm.ManufacturerVersion) { output += csvClean(nodeinfo.sys.hardware.tpm.ManufacturerVersion); } | ||||
|                                         output += ','; | ||||
|                                         if (nodeinfo.sys.hardware.tpm && nodeinfo.sys.hardware.tpm.IsActivated) { output += csvClean(nodeinfo.sys.hardware.tpm.IsActivated ? 'true' : 'false'); } | ||||
|                                         output += ','; | ||||
|                                         if (nodeinfo.sys.hardware.tpm && nodeinfo.sys.hardware.tpm.IsEnabled) { output += csvClean(nodeinfo.sys.hardware.tpm.IsEnabled ? 'true' : 'false'); } | ||||
|                                         output += ','; | ||||
|                                         if (nodeinfo.sys.hardware.tpm && nodeinfo.sys.hardware.tpm.IsOwned) { output += csvClean(nodeinfo.sys.hardware.tpm.IsOwned ? 'true' : 'false'); } | ||||
|                                         output += ','; | ||||
|                                         if (nodeinfo.sys.hardware.windows.memory) { | ||||
|                                             var totalMemory = 0; | ||||
|                                             for (var j in nodeinfo.sys.hardware.windows.memory) { | ||||
|  | @ -5024,6 +5036,12 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use | |||
|                                         output += ','; | ||||
|                                         if (nodeinfo.sys.hardware.mobile && (nodeinfo.sys.hardware.mobile.id)) { output += csvClean(nodeinfo.sys.hardware.mobile.id); } | ||||
|                                         output += ','; | ||||
|                                         output += ','; | ||||
|                                         output += ','; | ||||
|                                         output += ','; | ||||
|                                         output += ','; | ||||
|                                         output += ','; | ||||
|                                         output += ','; | ||||
|                                     } else if ((nodeinfo.sys) && (nodeinfo.sys.hardware) && (nodeinfo.sys.hardware.windows) && (nodeinfo.sys.hardware.linux)) { | ||||
|                                         // Linux
 | ||||
|                                         output += ','; | ||||
|  | @ -5043,8 +5061,20 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use | |||
|                                         output += ','; | ||||
|                                         if (nodeinfo.sys.hardware.linux && (nodeinfo.sys.hardware.linux.product_uuid)) { output += csvClean(nodeinfo.sys.hardware.linux.product_uuid); } | ||||
|                                         output += ','; | ||||
|                                         if (nodeinfo.sys.hardware.tpm && nodeinfo.sys.hardware.tpm.SpecVersion) { output += csvClean(nodeinfo.sys.hardware.tpm.SpecVersion); } | ||||
|                                         output += ','; | ||||
|                                         if (nodeinfo.sys.hardware.tpm && nodeinfo.sys.hardware.tpm.ManufacturerId) { output += csvClean(nodeinfo.sys.hardware.tpm.ManufacturerId); } | ||||
|                                         output += ','; | ||||
|                                         if (nodeinfo.sys.hardware.tpm && nodeinfo.sys.hardware.tpm.ManufacturerVersion) { output += csvClean(nodeinfo.sys.hardware.tpm.ManufacturerVersion); } | ||||
|                                         output += ','; | ||||
|                                         if (nodeinfo.sys.hardware.tpm && nodeinfo.sys.hardware.tpm.IsActivated) { output += csvClean(nodeinfo.sys.hardware.tpm.IsActivated ? 'true' : 'false'); } | ||||
|                                         output += ','; | ||||
|                                         if (nodeinfo.sys.hardware.tpm && nodeinfo.sys.hardware.tpm.IsEnabled) { output += csvClean(nodeinfo.sys.hardware.tpm.IsEnabled ? 'true' : 'false'); } | ||||
|                                         output += ','; | ||||
|                                         if (nodeinfo.sys.hardware.tpm && nodeinfo.sys.hardware.tpm.IsOwned) { output += csvClean(nodeinfo.sys.hardware.tpm.IsOwned ? 'true' : 'false'); } | ||||
|                                         output += ','; | ||||
|                                     } else { | ||||
|                                         output += ',,,,,,,,,,'; | ||||
|                                         output += ',,,,,,,,,,,,,,,,'; | ||||
|                                     } | ||||
| 
 | ||||
|                                     // Agent information
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue