tis-glpi-plugin-export-to-glpi9
9-20
Package for tis-glpi-plugin-export-to-glpi
2196 downloads
See build result See VirusTotal scan
control
package : tis-glpi-plugin-export-to-glpi9
version : 9-20
architecture : all
section : base
priority : optional
name :
categories :
maintainer : sfonteneau
description : Package for tis-glpi-plugin-export-to-glpi
depends :
conflicts :
maturity : PROD
locale : all
target_os : all
min_wapt_version :
sources :
installed_size :
impacted_process :
description_fr : Paquet pour tis-glpi-plugin-export-to-glpi
description_pl : Pakiet dla tis-glpi-plugin-export-to-glpi
description_de : Paket für tis-glpi-plugin-export-to-glpi
description_es : Paquete para tis-glpi-plugin-export-to-glpi
description_pt : Pacote para tis-glpi-plugin-export-to-glpi
description_it : Pacchetto per tis-glpi-plugin-export-to-glpi
description_nl : Pakket voor tis-glpi-plugin-export-naar-glpi
description_ru : Пакет для tis-glpi-plugin-export-to-glpi
audit_schedule : 1h
editor :
keywords :
licence :
homepage :
package_uuid : b56940b2-96f0-4b9f-b98d-0b479936592c
valid_from :
valid_until :
forced_install_on :
changelog :
min_os_version :
max_os_version :
icon_sha256sum : dbe1285588343cbdf5a6d18fd0cf0038de795d7a8a79cbaf90fb34720f7be890
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date : 2024-11-21T13:02:18.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature : ddugnGNbC7DMsmYF9ycMhDNmF197LRGCf+hVUDiq4S2xORnTijmG8T51zIDNAhRTg4meGJGyBZEj3+eoWUQPun4MzFrB3JEqCXGUsZSzwxbbcoBA9uOZ7HevdsV2edWIfBubObLSB255nUOcCw9kNei1AcjSpBdOo3xDBBXohBv0gjqDSSGstYkcLbg4L8YwZdeaHFrjyYwIGJtri1TU0JiQHtSNBgN1HKga2XWxwfw3Song0GK69OVy0UMRcHeC4cyC1pJMBTFh8rtdWovNFQWhSI8x/+yK3XMGWSRYKCp7CvHSN7ZFQO6HLib/emGk2KTdmaAUy2JabLCcYwi+ow==
Setup.py
# -*- coding: utf-8 -*-
## -----------------------------------------------------------------
## This file is part of WAPT Software Deployment
## Copyright (C) 2012 - 2022 Tranquil IT https://www.tranquil.it
## All Rights Reserved.
##
## This package is to be used with a valid WAPT Enterprise license only
##
## WAPT helps systems administrators to efficiently deploy
## setup, update and configure applications.
## ------------------------------------------------------------------
from setuphelpers import *
from configparser import ConfigParser
from jinja2 import Template
import copy
import hashlib
import json
import sys
import os
import time
import ctypes
import requests
import re
import datetime
import platform
"""
Please do not modify ini files inside the package but directly in "private" directory after package installation.
(linux : "/opt/wapt/private", windows : "C:\Program Files (x86)\wapt\private")
You will also need to activate "show host audit data tab" in the console display preferences to check each host export to GLPI
"""
def install():
if not inifile_readstring("glpi_api.ini", "glpi", "password") == "glpi":
error(
"This package must not contain login/password !, you have to go directly into %s to edit the files,"
% makepath(WAPT.private_dir, "glpi_api.ini")
)
if not inifile_readstring("wapt_api.ini", "wapt", "password") == "password":
error(
"This package must not contain login/password !, you have to go directly into %s to edit the files,"
% makepath(WAPT.private_dir, "wapt_api.ini")
)
if not isfile(makepath(WAPT.private_dir, "glpi_api.ini")):
filecopyto("glpi_api.ini", makepath(WAPT.private_dir, "glpi_api.ini"))
if not isfile(makepath(WAPT.private_dir, "wapt_api.ini")):
filecopyto("wapt_api.ini", makepath(WAPT.private_dir, "wapt_api.ini"))
def audit():
tools = Tools()
CONFWAPT = ConfigParser()
CONFWAPT.read(makepath(WAPT.private_dir, "wapt_api.ini"))
username_wapt = CONFWAPT.get("wapt", "username")
password_wapt = CONFWAPT.get("wapt", "password")
# certifi import with system_redirection but install run without system_redirection so copy cacert.pem
if platform.system() == "Windows":
if isfile(r"C:\Windows\SysWOW64\config\systemprofile\AppData\Local\.certifi\cacert.pem"):
mkdirs(r"C:\WINDOWS\system32\config\systemprofile\AppData\Local\.certifi")
filecopyto(
r"C:\Windows\SysWOW64\config\systemprofile\AppData\Local\.certifi\cacert.pem",
r"C:\WINDOWS\system32\config\systemprofile\AppData\Local\.certifi\cacert.pem",
)
WAPT.waptserver.post('api/v3/login' ,data=json.dumps({'user': username_wapt, 'password': password_wapt}))
CONFGLPI = ConfigParser()
CONFGLPI.read(makepath(WAPT.private_dir, "glpi_api.ini"))
list_pc_wapt = WAPT.waptserver.get(
"api/v3/hosts?columns=host_audit%2Fglpi%2Fupload%2Fvalue%2Flastid,host_audit%2Fglpi%2Fupload%2Fvalue%2Fhash&limit=10000"
)["result"]
vlist = ["wmi", "dmi", "host_info", "uuid", "host_metrics", "host_networking"]
for pc in list_pc_wapt:
# DEBUG UN SEUL PC
## if pc['uuid'] != '42370ACC-209A-11B2-A85C-987D5DEDFDAD':
## continue
last_hash = pc.get("host_audit/glpi/upload/value/hash", "")
d = copy.deepcopy(default)
host_data = WAPT.waptserver.get(
"api/v3/hosts?columns=host_info,host_metrics,waptwua_status,wuauserv_status,host_capabilities,host_networking,wapt_status&uuid=%s"
% pc["uuid"]
)["result"][0]
data = WAPT.waptserver.get('api/v3/audit_data?section=audit-wmi&keys=audit-wmi&latest_only=1&host_uuids=%s' % pc["uuid"])
if data["result"]:
host_data['wmi'] = data["result"][0]['value']
else:
host_data['wmi'] = {}
data = WAPT.waptserver.get('api/v3/audit_data?section=audit-dmi&keys=audit-dmi&latest_only=1&host_uuids=%s' % pc["uuid"])
if data["result"]:
host_data['dmi'] = data["result"][0]['value']
else:
host_data['dmi'] = {}
qlist = [
host_data["wmi"],
host_data["dmi"],
host_data["host_info"],
pc["uuid"],
host_data["host_metrics"],
host_data.get("host_networking", {}),
]
# in 2.4 version and above, netowrking info are in host_networking but before, it's not the case, so we'll try to find another way
if Version(host_data["wapt_version"]) < Version("2.4.0"):
print(
"Your agent on this host %s is too old for this package. Wanted min version is 2.4 and you seems to be under : %s"
% (host_data["computer_fqdn"], host_data["wapt_version"])
)
continue
# qlist = [list_pc_wapt[]]
for y in range(len(vlist)):
if qlist[y]:
(d[vlist[y]], qlist[y]) = tools.merge_dicts(d[vlist[y]], qlist[y])
list_soft = WAPT.waptserver.get("api/v3/host_data?field=installed_softwares&uuid=%s" % pc["uuid"])["result"]
d["installed_softwares"] = list_soft
datahash = ""
try:
HI = HostInventory()
HI.data = d
HI.data_refactoring()
HI.create_inventory(HI.data)
datahash = hashlib.sha256(json.dumps(HI.data).encode("utf-8")).hexdigest()
if datahash == last_hash:
print("Skip %s hash not change" % pc["uuid"])
continue
result = HI.upload_to_glpi(CONFGLPI.get("glpi", "username"), CONFGLPI.get("glpi", "password"), CONFGLPI.get("glpi", "url"))
output = result.content.decode("utf-8")
except Exception as e:
datahash = "failed"
output = str(e)
if not "<REPLY>\n</REPLY>" in str(output):
datahash = "failed"
status = "ERROR"
else:
status = "OK"
if pc.get("host_audit/glpi/upload/value/lastid", ""):
value_id = int(pc["host_audit/glpi/upload/value/lastid"])
else:
value_id = int(time.monotonic() * 1000)
result_glpi = {"status": status, "output": output, "hash": datahash, "synchro_date": str(datetime.datetime.now()), "lastid": value_id}
waptdata = []
waptdata.append(
{
"host_id": pc["uuid"],
"value_id": value_id,
"value_date": datetime2isodate(datetime.datetime.utcnow()),
"value_section": "glpi",
"value_key": "upload",
"value": result_glpi,
"expiration_date": datetime2isodate(datetime.datetime.utcnow() + datetime.timedelta(days=365)),
}
)
print(pc["computer_name"])
WAPT.waptserver.post("api/v3/update_hosts_audit_data", data=json.dumps(waptdata))
time.sleep(0.0000001)
return "OK"
def srn(serialnumber):
if serialnumber >= 0:
return hex(serialnumber)[2:-1].upper()
else:
return hex(int(ctypes.c_uint32(serialnumber).value))[2:-1].upper()
def get_cpu_infos(data):
cpu = {}
items_key = ["Core_Count", "Thread_Count", "ID", "Max_Speed", "Manufacturer", "Serial_Number"]
items = ["core", "thread", "id", "speed", "manufacturer", "serial"]
stepping = re.split("stepping", data["host_info"]["cpu_identifier"], flags=re.IGNORECASE)
if len(stepping) > 1:
cpu["stepping"] = [v.strip() for v in stepping[1].split(" ") if v.isdigit()][0]
else:
cpu["stepping"] = ""
for i in range(len(items)):
if not items_key[i] in data["dmi"]["Processor_Information"][0].keys():
continue
cpu[items[i]] = data["dmi"]["Processor_Information"][0][items_key[i]]
cpu["speed"] = cpu["speed"].replace(" MHz", "")
cpu["name"] = data["host_info"]["cpu_name"]
cpu["model"] = data["host_info"]["cpu_identifier"]
try:
val = data["dmi"]["Processor_Information"][0]["Signature"]
if "Family" in val:
cpu["familynumber"] = val.split("Family")[1].split(",")[0].strip()
cpu["modelnumber"] = val.split("Model")[1].split(",")[0].strip()
except:
pass
if "intel" in cpu["manufacturer"].lower():
cpu["manufacturer"] = "Intel"
return cpu
def delete_empty_entry_in_dict(data):
list_delete = []
for entry in data:
if (not data[entry]) or (data[entry] == "Unknown"):
list_delete.append(entry)
for entry in list_delete:
del data[entry]
return data
def convert_int_if_possible(value, defaultvalue=None):
try:
return int(value)
except:
return defaultvalue
def get_ram_infos(data):
ram = []
nb = 0
for entry in data["dmi"]["Memory_Device"]:
d = {}
nb = nb + 1
d["capacity"] = str(entry.get("Size", ""))
if "No Module Installed" == d["capacity"]:
d["capacity"] = None
if d["capacity"]:
if "mb" in d["capacity"].lower():
d["capacity"] = d["capacity"].split(" ")[0]
elif "gb" in d["capacity"].lower():
d["capacity"] = int(d["capacity"].split(" ")[0]) * 1024
elif "tb" in d["capacity"].lower():
d["capacity"] = int(d["capacity"].split(" ")[0]) * 1024 * 1024
else:
d["capacity"] = d["capacity"].split(" ")[0]
else:
del d["capacity"]
d["caption"] = entry.get("Locator", "")
d["description"] = entry.get("From_Factor", "")
d["manufacturer"] = entry.get("Manufacturer", "")
d["model"] = entry.get("Part_Number", "")
d["numslots"] = str(str(nb))
d["serialnumber"] = entry.get("Serial_Number", "")
d["speed"] = entry.get("Speed", "")
d["type"] = entry.get("Type", "")
ram.append(d)
return ram
class HostInventory:
def __init__(self):
self.data = {}
self.date = time.strftime("%Y-%m-%d") + " " + time.strftime("%H:%M:%S")
self.inventory_data = None
def data_refactoring(self):
if not self.data:
return -1
newsoft = []
for soft in self.data["installed_softwares"]:
try:
soft["install_date"] = datetime.datetime.strptime(soft["install_date"], "%Y-%m-%d %H:%M:%S").strftime("%d/%m/%Y")
except:
pass
newsoft.append(soft)
self.data["installed_softwares"] = newsoft
if type(self.data["wmi"]["Win32_LogicalDisk"]) == dict:
self.data["wmi"]["Win32_LogicalDisk"] = [self.data["wmi"]["Win32_LogicalDisk"]]
if type(self.data["wmi"]["Win32_Volume"]) == dict:
self.data["wmi"]["Win32_Volume"] = [self.data["wmi"]["Win32_Volume"]]
if type(self.data["wmi"]["Win32_NetworkAdapter"]) == dict:
self.data["wmi"]["Win32_NetworkAdapter"] = [self.data["wmi"]["Win32_NetworkAdapter"]]
if type(self.data["wmi"]["Win32_Printer"]) == dict:
self.data["wmi"]["Win32_Printer"] = [self.data["wmi"]["Win32_Printer"]]
if type(self.data["dmi"]["Processor_Information"]) == dict:
self.data["dmi"]["Processor_Information"] = [self.data["dmi"]["Processor_Information"]]
if type(self.data["dmi"]["Memory_Device"]) == dict:
self.data["dmi"]["Memory_Device"] = [self.data["dmi"]["Memory_Device"]]
if self.data["host_info"].get("workgroup_name", "") in ("AUTORITE NT", "NT AUTHORITY"):
self.data["host_info"]["workgroup_name"] = self.data["host_info"]["computer_name"]
self.data["host_metrics"]["physical_memory"] = int(int(self.data["host_metrics"].get("physical_memory", "0")) / 1024 / 1024)
self.data["is_virtual"] = ""
model = None
if self.data["wmi"]["Win32_ComputerSystem"]["Model"]:
model = self.data["wmi"]["Win32_ComputerSystem"]["Model"]
elif self.data["dmi"]["System_Information"]["Product_Name"]:
model = self.data["dmi"]["System_Information"]["Product_Name"]
if model is not None:
self.data["is_virtual"] = int((any(vm_type in model.lower() for vm_type in ("vmware", "hvm", "virtual")) == True))
if self.data["host_metrics"].get("last_logged_on_user"):
if isinstance(self.data["host_metrics"].get("last_logged_on_user"), list):
self.data["host_metrics"]["last_logged_on_user"] = self.data["host_metrics"]["last_logged_on_user"][0].split("\\")[-1]
else:
self.data["host_metrics"]["last_logged_on_user"] = self.data["host_metrics"]["last_logged_on_user"].split("\\")[-1]
self.data["typedisk"] = ["Unknown", "No Root Directory", "Removable Disk", "Local Disk", "Network Drive", "Compact Disc", "RAM Disk"]
self.data["cpu"] = get_cpu_infos(self.data) # TODO reconstruction of cpu informations from database to json
self.data["ram"] = get_ram_infos(self.data)
self.data["allip"] = "/".join([addr for addr in self.data["host_info"]["connected_ips"] if addr])
if self.data["wmi"]["Win32_OperatingSystem"]["OSArchitecture"]:
if self.data["wmi"]["Win32_OperatingSystem"]["OSArchitecture"] == "64 bits":
self.data["wmi"]["Win32_OperatingSystem"]["OSArchitecture"] = "64-bit"
if self.data["wmi"]["Win32_OperatingSystem"]["LastBootUpTime"]:
val = self.data["wmi"]["Win32_OperatingSystem"]["LastBootUpTime"]
self.data["wmi"]["Win32_OperatingSystem"]["LastBootUpTime"] = "%s-%s-%s %s:%s:%s" % (
val[0:4],
val[4:6],
val[6:8],
val[8:10],
val[10:12],
val[12:14],
)
if self.data["wmi"]["Win32_OperatingSystem"]["InstallDate"]:
val = self.data["wmi"]["Win32_OperatingSystem"]["InstallDate"]
self.data["wmi"]["Win32_OperatingSystem"]["InstallDate"] = "%s-%s-%s %s:%s:%s" % (
val[0:4],
val[4:6],
val[6:8],
val[8:10],
val[10:12],
val[12:14],
)
if self.data["host_info"]["windows_version"]:
corresp = {
"10240": "1507",
"10586": "1511",
"14393": "1607",
"15063": "1703",
"16299": "1709",
"17134": "1803",
"17763": "1809",
"18362": "1903",
"18363": "1909",
"19041": "2004",
"19042": "20H2",
"19043": "21H1",
"19044": "21H2",
"19045": "22H2",
}
try:
if "windows_version_releaseid" in self.data["host_info"]:
self.data["operatingsystem_version"] = self.data["host_info"]["windows_version_releaseid"]
if "windows_version_prettyname" in self.data["host_info"]:
self.data["operatingsystem_version"] = self.data["host_info"]["windows_version_prettyname"]
if not "operatingsystem_version" in self.data:
self.data["operatingsystem_version"] = corresp[self.data["host_info"]["windows_version"].split(".")[-1]]
except:
pass
if self.data["wmi"]["Win32_OperatingSystem"]["CSDVersion"] == None:
self.data["wmi"]["Win32_OperatingSystem"]["CSDVersion"] = ""
if "windows" in self.data["host_info"]["os_name"].lower():
self.data["host_info"]["os_shortname"] = "Windows"
if "Portable_Battery" in self.data["dmi"]:
orig_data = self.data["dmi"]["Portable_Battery"]
temp_list = list()
if isinstance(orig_data, dict):
orig_data = [orig_data]
for battery in orig_data:
battery["Design_Capacity"] = battery["Design_Capacity"].replace("mWh", "").strip()
try:
val = battery["SBDS_Manufacture_Date"]
except:
val = battery["Manufacture_Date"]
battery["SBDS_Manufacture_Date"] = "%s/%s/%s" % (val[8:10], val[5:7], val[0:4])
try:
val = battery["SBDS_Serial_Number"]
except:
val = battery["Serial_Number"]
try:
battery["SBDS_Serial_Number"] = int(val, 16)
except:
pass
battery["Design_Voltage"] = battery["Design_Voltage"].replace("mV", "").strip()
temp_list.append(battery)
self.data["dmi"]["Portable_Battery"] = temp_list
self.data["host_metrics"]["last_bootup_time"] = self.data["host_metrics"]["last_bootup_time"].replace("T", " ")
# for env_var in data['host_info']['environ']:
if self.data["wmi"]["Win32_OperatingSystem"]["Caption"]:
self.data["host_info"]["os_name"] = self.data["wmi"]["Win32_OperatingSystem"]["Caption"]
dict_mac_addr = {}
for network in self.data["host_networking"]["interfaces"]:
# dict_mac_addr[network["mac"]] = {"ip": "", "netmask": ""}
if network.get("addr") and type(network["addr"]) == list:
if network["mac"] != "":
dict_mac_addr[network["mac"].lower()] = {"ip": network["addr"][0]["addr"], "netmask": network["addr"][0]["netmask"],'description':'','pnpdeviceid':'','speed':'','type':'','virtualdev':''}
for network in self.data['wmi']['Win32_NetworkAdapter']:
if str(network.get('MACAddress')).lower() in dict_mac_addr:
dict_mac_addr[network.get('MACAddress').lower()].update(
{'description':network['Description'],
'pnpdeviceid':network['PNPDeviceID'],
'speed':int(network['Speed']) //1000 //1000 if network['Speed'] else 0,
'type':network['AdapterType'],
'virtualdev': 0 if network['PhysicalAdapter'] else 1
})
self.data["dict_mac_addr"] = dict_mac_addr
if self.data["dmi"]["System_Information"]["Manufacturer"] == "LENOVO":
self.data["smodel"] = self.data["dmi"]["System_Information"]["Version"]
else:
self.data["smodel"] = self.data["dmi"]["System_Information"]["Product_Name"]
return 0
def create_inventory(self, data):
self.data = {}
self.data = data
if self.data_refactoring() == -1:
return
tm = Template(template_xml)
tm.environment.autoescape = True
tm.environment.trim_blocks = False
self.inventory_data = tm.render(data=self.data, date=self.date, srn=srn)
def write_inventory(self, file="inventory_debug.xml"):
if not self.inventory_data:
logger.error("Inventory data not created, please create_inventory()")
return
with open(file, "w", encoding="utf-8") as outfile:
outfile.write(self.inventory_data)
def upload_to_glpi(self, username, password, endpoint, headers=None, quiet=False):
if not self.inventory_data:
logger.error("Inventory data not created, please create_inventory()")
return
if not headers:
headers = {"charset": "utf-8", "Pragma": "no-cache", "content-type": "Application/xml"}
creds = (username.encode(encoding="UTF-8"), password.encode(encoding="UTF-8"))
r = requests.post(endpoint, data=self.inventory_data.encode("utf-8"), headers=headers, auth=creds)
if not quiet:
logger.info(r.content)
return r
class Tools:
def sort_dict(self, d):
result = {}
keys = list(d.keys())
keys.sort()
for k in keys:
result[k] = d[k]
return result
def merge_dicts(self, d1, d2):
"""
Replace d1 values by d2 ones
d1 key created from d2 if doesn't exist yet
if types are different, d2 erase d1
return: (d1, d2)
"""
try:
if d1 == d2:
return (d1, d2)
if type(d2) == str or type(d2) == int or type(d2) != type(d1):
d1 = d2
return (d1, d2)
if type(d2) == dict:
for k in d2.keys():
if k not in d1.keys():
d1[k] = d2[k]
continue
(d1[k], d2[k]) = self.merge_dicts(d1[k], d2[k])
return (d1, d2)
if type(d2) == list:
added = [d2[i] for i in range(len(d2)) if d2[i] not in d1]
d1 = added + [d1[i] for i in range(len(d1)) if d1[i] or (len(d1) > len(added) + i)]
return (d1, d2)
return (d1, d2)
except Exception as e:
print(e)
default = {
"wmi": {
"Win32_BIOS": {
"Name": "",
"Status": "",
"Caption": "",
"CodeSet": None,
"Version": "",
"BIOSVersion": ["", ""],
"BuildNumber": None,
"Description": "",
"InstallDate": None,
"PrimaryBIOS": True,
"ReleaseDate": "",
"Manufacturer": "",
"SerialNumber": "",
"OtherTargetOS": None,
"SMBIOSPresent": True,
"CurrentLanguage": None,
"LanguageEdition": None,
"ListOfLanguages": [],
"SMBIOSBIOSVersion": "",
"SoftwareElementID": "",
"IdentificationCode": None,
"SMBIOSMajorVersion": 0,
"SMBIOSMinorVersion": 0,
"BiosCharacteristics": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"InstallableLanguages": None,
"SoftwareElementState": 0,
"TargetOperatingSystem": 0,
},
"Win32_Volume": [
{
"Name": "",
"Label": "",
"Access": None,
"Status": None,
"Caption": "",
"Purpose": None,
"Capacity": "",
"DeviceID": "",
"Automount": True,
"BlockSize": "",
"DriveType": 0,
"FreeSpace": "",
"BootVolume": True,
"Compressed": False,
"FileSystem": "",
"StatusInfo": None,
"SystemName": "",
"Description": None,
"DirtyBitSet": False,
"DriveLetter": "",
"InstallDate": None,
"PNPDeviceID": None,
"Availability": None,
"ErrorCleared": None,
"SerialNumber": 0,
"SystemVolume": True,
"LastErrorCode": None,
"QuotasEnabled": False,
"NumberOfBlocks": None,
"IndexingEnabled": True,
"PageFilePresent": True,
"ErrorDescription": None,
"ErrorMethodology": None,
"QuotasIncomplete": False,
"QuotasRebuilding": False,
"CreationClassName": None,
"SupportsDiskQuotas": True,
"MaximumFileNameLength": 0,
"ConfigManagerErrorCode": None,
"ConfigManagerUserConfig": None,
"SystemCreationClassName": None,
"PowerManagementSupported": None,
"PowerManagementCapabilities": None,
"SupportsFileBasedCompression": True,
},
{
"Name": "",
"Label": None,
"Access": None,
"Status": None,
"Caption": "",
"Purpose": None,
"Capacity": None,
"DeviceID": "",
"Automount": True,
"BlockSize": None,
"DriveType": 0,
"FreeSpace": None,
"BootVolume": None,
"Compressed": None,
"FileSystem": None,
"StatusInfo": None,
"SystemName": "",
"Description": None,
"DirtyBitSet": None,
"DriveLetter": "",
"InstallDate": None,
"PNPDeviceID": None,
"Availability": None,
"ErrorCleared": None,
"SerialNumber": None,
"SystemVolume": None,
"LastErrorCode": None,
"QuotasEnabled": None,
"NumberOfBlocks": None,
"IndexingEnabled": None,
"PageFilePresent": None,
"ErrorDescription": None,
"ErrorMethodology": None,
"QuotasIncomplete": None,
"QuotasRebuilding": None,
"CreationClassName": None,
"SupportsDiskQuotas": None,
"MaximumFileNameLength": None,
"ConfigManagerErrorCode": None,
"ConfigManagerUserConfig": None,
"SystemCreationClassName": None,
"PowerManagementSupported": None,
"PowerManagementCapabilities": None,
"SupportsFileBasedCompression": None,
},
],
"Win32_Printer": [
{
"Name": "",
"Local": True,
"Direct": False,
"Hidden": False,
"Queued": False,
"Shared": False,
"Status": "",
"Caption": "",
"Comment": None,
"Default": True,
"Network": False,
"RawOnly": False,
"DeviceID": "",
"Location": None,
"PortName": "",
"Priority": 0,
"MaxCopies": None,
"Published": False,
"ShareName": None,
"StartTime": None,
"UntilTime": None,
"Attributes": 0,
"DriverName": "",
"EnableBIDI": False,
"Parameters": None,
"ServerName": None,
"StatusInfo": None,
"SystemName": "",
"Description": None,
"InstallDate": None,
"MaxNumberUp": None,
"PNPDeviceID": None,
"WorkOffline": False,
"Availability": None,
"Capabilities": [0, 0, 0, 0],
"ErrorCleared": None,
"PrinterState": 0,
"SpoolEnabled": True,
"DefaultCopies": None,
"LastErrorCode": None,
"PrinterStatus": 0,
"SeparatorFile": None,
"CurrentCharSet": None,
"PrintProcessor": "",
"CurrentLanguage": None,
"CurrentMimeType": None,
"DefaultLanguage": None,
"DefaultMimeType": None,
"DefaultNumberUp": None,
"DefaultPriority": 0,
"DoCompleteFirst": True,
"KeepPrintedJobs": False,
"TimeOfLastReset": None,
"CurrentPaperType": None,
"DefaultPaperType": None,
"ErrorDescription": None,
"ErrorInformation": None,
"MaxSizeSupported": None,
"PrintJobDataType": "",
"CharSetsSupported": None,
"CreationClassName": "",
"MarkingTechnology": None,
"PrinterPaperNames": [
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
],
"AvailableJobSheets": None,
"DetectedErrorState": 0,
"LanguagesSupported": None,
"MimeTypesSupported": None,
"VerticalResolution": 0,
"CurrentCapabilities": None,
"DefaultCapabilities": None,
"EnableDevQueryPrint": False,
"PaperSizesSupported": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"PaperTypesAvailable": None,
"HorizontalResolution": 0,
"AveragePagesPerMinute": 0,
"ExtendedPrinterStatus": 0,
"CapabilityDescriptions": ["", "", "", ""],
"ConfigManagerErrorCode": None,
"CurrentNaturalLanguage": None,
"JobCountSinceLastReset": 0,
"ConfigManagerUserConfig": None,
"SystemCreationClassName": "",
"PowerManagementSupported": None,
"NaturalLanguagesSupported": None,
"ExtendedDetectedErrorState": 0,
"PowerManagementCapabilities": None,
},
{
"Name": "",
"Local": True,
"Direct": False,
"Hidden": False,
"Queued": False,
"Shared": False,
"Status": "",
"Caption": "",
"Comment": None,
"Default": False,
"Network": False,
"RawOnly": False,
"DeviceID": "",
"Location": None,
"PortName": "",
"Priority": 0,
"MaxCopies": None,
"Published": False,
"ShareName": None,
"StartTime": None,
"UntilTime": None,
"Attributes": 0,
"DriverName": "",
"EnableBIDI": False,
"Parameters": None,
"ServerName": None,
"StatusInfo": None,
"SystemName": "",
"Description": None,
"InstallDate": None,
"MaxNumberUp": None,
"PNPDeviceID": None,
"WorkOffline": False,
"Availability": None,
"Capabilities": [0, 0],
"ErrorCleared": None,
"PrinterState": 0,
"SpoolEnabled": True,
"DefaultCopies": None,
"LastErrorCode": None,
"PrinterStatus": 0,
"SeparatorFile": None,
"CurrentCharSet": None,
"PrintProcessor": "",
"CurrentLanguage": None,
"CurrentMimeType": None,
"DefaultLanguage": None,
"DefaultMimeType": None,
"DefaultNumberUp": None,
"DefaultPriority": 0,
"DoCompleteFirst": False,
"KeepPrintedJobs": False,
"TimeOfLastReset": None,
"CurrentPaperType": None,
"DefaultPaperType": None,
"ErrorDescription": None,
"ErrorInformation": None,
"MaxSizeSupported": None,
"PrintJobDataType": "",
"CharSetsSupported": None,
"CreationClassName": "",
"MarkingTechnology": None,
"PrinterPaperNames": [
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
],
"AvailableJobSheets": None,
"DetectedErrorState": 0,
"LanguagesSupported": None,
"MimeTypesSupported": None,
"VerticalResolution": 0,
"CurrentCapabilities": None,
"DefaultCapabilities": None,
"EnableDevQueryPrint": False,
"PaperSizesSupported": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"PaperTypesAvailable": None,
"HorizontalResolution": 0,
"AveragePagesPerMinute": 0,
"ExtendedPrinterStatus": 0,
"CapabilityDescriptions": ["", ""],
"ConfigManagerErrorCode": None,
"CurrentNaturalLanguage": None,
"JobCountSinceLastReset": 0,
"ConfigManagerUserConfig": None,
"SystemCreationClassName": "",
"PowerManagementSupported": None,
"NaturalLanguagesSupported": None,
"ExtendedDetectedErrorState": 0,
"PowerManagementCapabilities": None,
},
],
"Win32_DiskDrive": {
"Name": "",
"Size": "",
"Index": 0,
"Model": "",
"Status": "",
"Caption": "",
"SCSIBus": 0,
"DeviceID": "",
"SCSIPort": 0,
"MediaType": "",
"Signature": 0,
"Partitions": 0,
"StatusInfo": None,
"SystemName": "",
"TotalHeads": 0,
"Description": "",
"InstallDate": None,
"MediaLoaded": True,
"PNPDeviceID": "",
"TotalTracks": "",
"Availability": None,
"Capabilities": [0, 0],
"ErrorCleared": None,
"Manufacturer": "",
"MaxBlockSize": None,
"MaxMediaSize": None,
"MinBlockSize": None,
"SCSITargetId": 0,
"SerialNumber": "",
"TotalSectors": "",
"InterfaceType": "",
"LastErrorCode": None,
"NeedsCleaning": None,
"BytesPerSector": 0,
"TotalCylinders": "",
"SCSILogicalUnit": 0,
"SectorsPerTrack": 0,
"DefaultBlockSize": None,
"ErrorDescription": None,
"ErrorMethodology": None,
"FirmwareRevision": "",
"CompressionMethod": None,
"CreationClassName": "",
"TracksPerCylinder": 0,
"CapabilityDescriptions": ["", ""],
"ConfigManagerErrorCode": 0,
"NumberOfMediaSupported": None,
"ConfigManagerUserConfig": False,
"SystemCreationClassName": "",
"PowerManagementSupported": None,
"PowerManagementCapabilities": None,
},
"Win32_LogicalDisk": [
{
"Name": "",
"Size": "",
"Access": 0,
"Status": None,
"Caption": "",
"Purpose": None,
"DeviceID": "",
"BlockSize": None,
"DriveType": 0,
"FreeSpace": "",
"MediaType": 0,
"Compressed": False,
"FileSystem": "",
"StatusInfo": None,
"SystemName": "",
"VolumeName": "",
"Description": "",
"InstallDate": None,
"PNPDeviceID": None,
"VolumeDirty": False,
"Availability": None,
"ErrorCleared": None,
"ProviderName": None,
"LastErrorCode": None,
"NumberOfBlocks": None,
"QuotasDisabled": True,
"ErrorDescription": None,
"ErrorMethodology": None,
"QuotasIncomplete": False,
"QuotasRebuilding": False,
"CreationClassName": "",
"SupportsDiskQuotas": True,
"VolumeSerialNumber": "",
"ConfigManagerErrorCode": None,
"MaximumComponentLength": 0,
"ConfigManagerUserConfig": None,
"SystemCreationClassName": "",
"PowerManagementSupported": None,
"PowerManagementCapabilities": None,
"SupportsFileBasedCompression": True,
},
{
"Name": "",
"Size": None,
"Access": None,
"Status": None,
"Caption": "",
"Purpose": None,
"DeviceID": "",
"BlockSize": None,
"DriveType": 0,
"FreeSpace": None,
"MediaType": 0,
"Compressed": None,
"FileSystem": None,
"StatusInfo": None,
"SystemName": "",
"VolumeName": None,
"Description": "",
"InstallDate": None,
"PNPDeviceID": None,
"VolumeDirty": None,
"Availability": None,
"ErrorCleared": None,
"ProviderName": None,
"LastErrorCode": None,
"NumberOfBlocks": None,
"QuotasDisabled": None,
"ErrorDescription": None,
"ErrorMethodology": None,
"QuotasIncomplete": None,
"QuotasRebuilding": None,
"CreationClassName": "",
"SupportsDiskQuotas": None,
"VolumeSerialNumber": None,
"ConfigManagerErrorCode": None,
"MaximumComponentLength": None,
"ConfigManagerUserConfig": None,
"SystemCreationClassName": "",
"PowerManagementSupported": None,
"PowerManagementCapabilities": None,
"SupportsFileBasedCompression": None,
},
],
"Win32_USBController": {
"Name": "",
"Status": "",
"Caption": "",
"DeviceID": "",
"StatusInfo": None,
"SystemName": "",
"Description": "",
"InstallDate": None,
"PNPDeviceID": "",
"Availability": None,
"ErrorCleared": None,
"Manufacturer": "",
"LastErrorCode": None,
"TimeOfLastReset": None,
"ErrorDescription": None,
"CreationClassName": "",
"ProtocolSupported": 0,
"MaxNumberControlled": None,
"ConfigManagerErrorCode": 0,
"ConfigManagerUserConfig": False,
"SystemCreationClassName": "",
"PowerManagementSupported": None,
"PowerManagementCapabilities": None,
},
"Win32_ComputerSystem": {
"Name": "",
"Model": "",
"Roles": ["", "", ""],
"Domain": "",
"Status": "",
"Caption": "",
"UserName": None,
"Workgroup": None,
"DomainRole": 0,
"NameFormat": None,
"PowerState": 0,
"ResetCount": 0,
"ResetLimit": 0,
"SystemType": "",
"WakeUpType": 0,
"BootupState": "",
"DNSHostName": "",
"Description": "",
"InstallDate": None,
"LastLoadInfo": None,
"Manufacturer": "",
"PCSystemType": 0,
"PartOfDomain": True,
"ThermalState": 0,
"OEMStringArray": ["", ""],
"CurrentTimeZone": 0,
"InitialLoadInfo": None,
"PauseAfterReset": "",
"ResetCapability": 0,
"BootROMSupported": True,
"DaylightInEffect": True,
"PowerSupplyState": 0,
"PrimaryOwnerName": "",
"BootOptionOnLimit": None,
"CreationClassName": "",
"InfraredSupported": False,
"ChassisBootupState": 0,
"NumberOfProcessors": 0,
"SystemStartupDelay": None,
"AdminPasswordStatus": 0,
"PrimaryOwnerContact": None,
"TotalPhysicalMemory": "",
"BootOptionOnWatchDog": None,
"SystemStartupOptions": None,
"SystemStartupSetting": None,
"FrontPanelResetStatus": 0,
"PowerOnPasswordStatus": 0,
"KeyboardPasswordStatus": 0,
"AutomaticManagedPagefile": True,
"AutomaticResetBootOption": True,
"AutomaticResetCapability": True,
"NetworkServerModeEnabled": True,
"PowerManagementSupported": None,
"EnableDaylightSavingsTime": True,
"NumberOfLogicalProcessors": 0,
"SupportContactDescription": None,
"PowerManagementCapabilities": None,
},
"Win32_DesktopMonitor": {
"Name": "",
"Status": "",
"Caption": "",
"DeviceID": "",
"IsLocked": None,
"Bandwidth": None,
"StatusInfo": None,
"SystemName": "",
"Description": "",
"DisplayType": None,
"InstallDate": None,
"MonitorType": "",
"PNPDeviceID": "",
"ScreenWidth": None,
"Availability": 0,
"ErrorCleared": None,
"ScreenHeight": None,
"LastErrorCode": None,
"ErrorDescription": None,
"CreationClassName": "",
"MonitorManufacturer": "",
"PixelsPerXLogicalInch": 0,
"PixelsPerYLogicalInch": 0,
"ConfigManagerErrorCode": 0,
"ConfigManagerUserConfig": False,
"SystemCreationClassName": "",
"PowerManagementSupported": None,
"PowerManagementCapabilities": None,
},
"Win32_NetworkAdapter": [
{
"GUID": None,
"Name": "",
"Index": 0,
"Speed": None,
"Status": None,
"Caption": "",
"DeviceID": "",
"MaxSpeed": None,
"AutoSense": None,
"Installed": True,
"MACAddress": None,
"NetEnabled": None,
"StatusInfo": None,
"SystemName": "",
"AdapterType": None,
"Description": "",
"InstallDate": None,
"PNPDeviceID": "",
"ProductName": "",
"ServiceName": "",
"Availability": 0,
"ErrorCleared": None,
"Manufacturer": "",
"AdapterTypeId": None,
"LastErrorCode": None,
"InterfaceIndex": 0,
"NetConnectionID": None,
"PhysicalAdapter": False,
"TimeOfLastReset": "",
"ErrorDescription": None,
"NetworkAddresses": None,
"PermanentAddress": None,
"CreationClassName": "",
"MaxNumberControlled": 0,
"NetConnectionStatus": None,
"ConfigManagerErrorCode": 0,
"ConfigManagerUserConfig": False,
"SystemCreationClassName": "",
"PowerManagementSupported": False,
"PowerManagementCapabilities": None,
},
{
"GUID": None,
"Name": "",
"Index": 0,
"Speed": None,
"Status": None,
"Caption": "",
"DeviceID": "",
"MaxSpeed": None,
"AutoSense": None,
"Installed": True,
"MACAddress": None,
"NetEnabled": None,
"StatusInfo": None,
"SystemName": "",
"AdapterType": None,
"Description": "",
"InstallDate": None,
"PNPDeviceID": "",
"ProductName": "",
"ServiceName": "",
"Availability": 0,
"ErrorCleared": None,
"Manufacturer": "",
"AdapterTypeId": None,
"LastErrorCode": None,
"InterfaceIndex": 0,
"NetConnectionID": None,
"PhysicalAdapter": False,
"TimeOfLastReset": "",
"ErrorDescription": None,
"NetworkAddresses": None,
"PermanentAddress": None,
"CreationClassName": "",
"MaxNumberControlled": 0,
"NetConnectionStatus": None,
"ConfigManagerErrorCode": 0,
"ConfigManagerUserConfig": False,
"SystemCreationClassName": "",
"PowerManagementSupported": False,
"PowerManagementCapabilities": None,
},
{
"GUID": None,
"Name": "",
"Index": 0,
"Speed": None,
"Status": None,
"Caption": "",
"DeviceID": "",
"MaxSpeed": None,
"AutoSense": None,
"Installed": True,
"MACAddress": None,
"NetEnabled": None,
"StatusInfo": None,
"SystemName": "",
"AdapterType": None,
"Description": "",
"InstallDate": None,
"PNPDeviceID": "",
"ProductName": "",
"ServiceName": "",
"Availability": 0,
"ErrorCleared": None,
"Manufacturer": "",
"AdapterTypeId": None,
"LastErrorCode": None,
"InterfaceIndex": 0,
"NetConnectionID": None,
"PhysicalAdapter": False,
"TimeOfLastReset": "",
"ErrorDescription": None,
"NetworkAddresses": None,
"PermanentAddress": None,
"CreationClassName": "",
"MaxNumberControlled": 0,
"NetConnectionStatus": None,
"ConfigManagerErrorCode": 0,
"ConfigManagerUserConfig": False,
"SystemCreationClassName": "",
"PowerManagementSupported": False,
"PowerManagementCapabilities": None,
},
{
"GUID": None,
"Name": "",
"Index": 0,
"Speed": None,
"Status": None,
"Caption": "",
"DeviceID": "",
"MaxSpeed": None,
"AutoSense": None,
"Installed": True,
"MACAddress": None,
"NetEnabled": None,
"StatusInfo": None,
"SystemName": "",
"AdapterType": None,
"Description": "",
"InstallDate": None,
"PNPDeviceID": "",
"ProductName": "",
"ServiceName": "",
"Availability": 0,
"ErrorCleared": None,
"Manufacturer": "",
"AdapterTypeId": None,
"LastErrorCode": None,
"InterfaceIndex": 0,
"NetConnectionID": None,
"PhysicalAdapter": False,
"TimeOfLastReset": "",
"ErrorDescription": None,
"NetworkAddresses": None,
"PermanentAddress": None,
"CreationClassName": "",
"MaxNumberControlled": 0,
"NetConnectionStatus": None,
"ConfigManagerErrorCode": 0,
"ConfigManagerUserConfig": False,
"SystemCreationClassName": "",
"PowerManagementSupported": False,
"PowerManagementCapabilities": None,
},
{
"GUID": None,
"Name": "",
"Index": 0,
"Speed": None,
"Status": None,
"Caption": "",
"DeviceID": "",
"MaxSpeed": None,
"AutoSense": None,
"Installed": True,
"MACAddress": None,
"NetEnabled": None,
"StatusInfo": None,
"SystemName": "",
"AdapterType": None,
"Description": "",
"InstallDate": None,
"PNPDeviceID": "",
"ProductName": "",
"ServiceName": "",
"Availability": 0,
"ErrorCleared": None,
"Manufacturer": "",
"AdapterTypeId": None,
"LastErrorCode": None,
"InterfaceIndex": 0,
"NetConnectionID": None,
"PhysicalAdapter": False,
"TimeOfLastReset": "",
"ErrorDescription": None,
"NetworkAddresses": None,
"PermanentAddress": None,
"CreationClassName": "",
"MaxNumberControlled": 0,
"NetConnectionStatus": None,
"ConfigManagerErrorCode": 0,
"ConfigManagerUserConfig": False,
"SystemCreationClassName": "",
"PowerManagementSupported": False,
"PowerManagementCapabilities": None,
},
{
"GUID": None,
"Name": "",
"Index": 0,
"Speed": None,
"Status": None,
"Caption": "",
"DeviceID": "",
"MaxSpeed": None,
"AutoSense": None,
"Installed": True,
"MACAddress": None,
"NetEnabled": None,
"StatusInfo": None,
"SystemName": "",
"AdapterType": None,
"Description": "",
"InstallDate": None,
"PNPDeviceID": "",
"ProductName": "",
"ServiceName": "",
"Availability": 0,
"ErrorCleared": None,
"Manufacturer": "",
"AdapterTypeId": None,
"LastErrorCode": None,
"InterfaceIndex": 0,
"NetConnectionID": None,
"PhysicalAdapter": False,
"TimeOfLastReset": "",
"ErrorDescription": None,
"NetworkAddresses": None,
"PermanentAddress": None,
"CreationClassName": "",
"MaxNumberControlled": 0,
"NetConnectionStatus": None,
"ConfigManagerErrorCode": 0,
"ConfigManagerUserConfig": False,
"SystemCreationClassName": "",
"PowerManagementSupported": False,
"PowerManagementCapabilities": None,
},
{
"GUID": None,
"Name": "",
"Index": 0,
"Speed": None,
"Status": None,
"Caption": "",
"DeviceID": "",
"MaxSpeed": None,
"AutoSense": None,
"Installed": True,
"MACAddress": None,
"NetEnabled": None,
"StatusInfo": None,
"SystemName": "",
"AdapterType": None,
"Description": "",
"InstallDate": None,
"PNPDeviceID": "",
"ProductName": "",
"ServiceName": "",
"Availability": 0,
"ErrorCleared": None,
"Manufacturer": "",
"AdapterTypeId": None,
"LastErrorCode": None,
"InterfaceIndex": 0,
"NetConnectionID": None,
"PhysicalAdapter": False,
"TimeOfLastReset": "",
"ErrorDescription": None,
"NetworkAddresses": None,
"PermanentAddress": None,
"CreationClassName": "",
"MaxNumberControlled": 0,
"NetConnectionStatus": None,
"ConfigManagerErrorCode": 0,
"ConfigManagerUserConfig": False,
"SystemCreationClassName": "",
"PowerManagementSupported": False,
"PowerManagementCapabilities": None,
},
{
"GUID": None,
"Name": "",
"Index": 0,
"Speed": None,
"Status": None,
"Caption": "",
"DeviceID": "",
"MaxSpeed": None,
"AutoSense": None,
"Installed": True,
"MACAddress": None,
"NetEnabled": None,
"StatusInfo": None,
"SystemName": "",
"AdapterType": None,
"Description": "",
"InstallDate": None,
"PNPDeviceID": None,
"ProductName": "",
"ServiceName": None,
"Availability": 0,
"ErrorCleared": None,
"Manufacturer": None,
"AdapterTypeId": None,
"LastErrorCode": None,
"InterfaceIndex": 0,
"NetConnectionID": None,
"PhysicalAdapter": False,
"TimeOfLastReset": "",
"ErrorDescription": None,
"NetworkAddresses": None,
"PermanentAddress": None,
"CreationClassName": "",
"MaxNumberControlled": 0,
"NetConnectionStatus": None,
"ConfigManagerErrorCode": None,
"ConfigManagerUserConfig": None,
"SystemCreationClassName": "",
"PowerManagementSupported": False,
"PowerManagementCapabilities": None,
},
{
"GUID": None,
"Name": "",
"Index": 0,
"Speed": None,
"Status": None,
"Caption": "",
"DeviceID": "",
"MaxSpeed": None,
"AutoSense": None,
"Installed": True,
"MACAddress": None,
"NetEnabled": None,
"StatusInfo": None,
"SystemName": "",
"AdapterType": None,
"Description": "",
"InstallDate": None,
"PNPDeviceID": "",
"ProductName": "",
"ServiceName": "",
"Availability": 0,
"ErrorCleared": None,
"Manufacturer": "",
"AdapterTypeId": None,
"LastErrorCode": None,
"InterfaceIndex": 0,
"NetConnectionID": None,
"PhysicalAdapter": False,
"TimeOfLastReset": "",
"ErrorDescription": None,
"NetworkAddresses": None,
"PermanentAddress": None,
"CreationClassName": "",
"MaxNumberControlled": 0,
"NetConnectionStatus": None,
"ConfigManagerErrorCode": 0,
"ConfigManagerUserConfig": False,
"SystemCreationClassName": "",
"PowerManagementSupported": False,
"PowerManagementCapabilities": None,
},
{
"GUID": None,
"Name": "",
"Index": 0,
"Speed": "",
"Status": None,
"Caption": "",
"DeviceID": "",
"MaxSpeed": None,
"AutoSense": None,
"Installed": True,
"MACAddress": None,
"NetEnabled": None,
"StatusInfo": None,
"SystemName": "",
"AdapterType": "",
"Description": "",
"InstallDate": None,
"PNPDeviceID": "",
"ProductName": "",
"ServiceName": "",
"Availability": 0,
"ErrorCleared": None,
"Manufacturer": "",
"AdapterTypeId": 0,
"LastErrorCode": None,
"InterfaceIndex": 0,
"NetConnectionID": None,
"PhysicalAdapter": False,
"TimeOfLastReset": "",
"ErrorDescription": None,
"NetworkAddresses": None,
"PermanentAddress": None,
"CreationClassName": "",
"MaxNumberControlled": 0,
"NetConnectionStatus": None,
"ConfigManagerErrorCode": 0,
"ConfigManagerUserConfig": False,
"SystemCreationClassName": "",
"PowerManagementSupported": False,
"PowerManagementCapabilities": None,
},
{
"GUID": None,
"Name": "",
"Index": 0,
"Speed": None,
"Status": None,
"Caption": "",
"DeviceID": "",
"MaxSpeed": None,
"AutoSense": None,
"Installed": True,
"MACAddress": "",
"NetEnabled": None,
"StatusInfo": None,
"SystemName": "",
"AdapterType": "",
"Description": "",
"InstallDate": None,
"PNPDeviceID": "",
"ProductName": "",
"ServiceName": "",
"Availability": 0,
"ErrorCleared": None,
"Manufacturer": "",
"AdapterTypeId": 0,
"LastErrorCode": None,
"InterfaceIndex": 0,
"NetConnectionID": None,
"PhysicalAdapter": False,
"TimeOfLastReset": "",
"ErrorDescription": None,
"NetworkAddresses": None,
"PermanentAddress": None,
"CreationClassName": "",
"MaxNumberControlled": 0,
"NetConnectionStatus": None,
"ConfigManagerErrorCode": 0,
"ConfigManagerUserConfig": False,
"SystemCreationClassName": "",
"PowerManagementSupported": False,
"PowerManagementCapabilities": None,
},
{
"GUID": "",
"Name": "",
"Index": 0,
"Speed": "",
"Status": None,
"Caption": "",
"DeviceID": "",
"MaxSpeed": None,
"AutoSense": None,
"Installed": True,
"MACAddress": "",
"NetEnabled": True,
"StatusInfo": None,
"SystemName": "",
"AdapterType": "",
"Description": "",
"InstallDate": None,
"PNPDeviceID": "",
"ProductName": "",
"ServiceName": "",
"Availability": 0,
"ErrorCleared": None,
"Manufacturer": "",
"AdapterTypeId": 0,
"LastErrorCode": None,
"InterfaceIndex": 0,
"NetConnectionID": "",
"PhysicalAdapter": True,
"TimeOfLastReset": "",
"ErrorDescription": None,
"NetworkAddresses": None,
"PermanentAddress": None,
"CreationClassName": "",
"MaxNumberControlled": 0,
"NetConnectionStatus": 0,
"ConfigManagerErrorCode": 0,
"ConfigManagerUserConfig": False,
"SystemCreationClassName": "",
"PowerManagementSupported": False,
"PowerManagementCapabilities": None,
},
{
"GUID": None,
"Name": "",
"Index": 0,
"Speed": None,
"Status": None,
"Caption": "",
"DeviceID": "",
"MaxSpeed": None,
"AutoSense": None,
"Installed": True,
"MACAddress": None,
"NetEnabled": None,
"StatusInfo": None,
"SystemName": "",
"AdapterType": "",
"Description": "",
"InstallDate": None,
"PNPDeviceID": "",
"ProductName": "",
"ServiceName": "",
"Availability": 0,
"ErrorCleared": None,
"Manufacturer": "",
"AdapterTypeId": 0,
"LastErrorCode": None,
"InterfaceIndex": 0,
"NetConnectionID": None,
"PhysicalAdapter": False,
"TimeOfLastReset": "",
"ErrorDescription": None,
"NetworkAddresses": None,
"PermanentAddress": None,
"CreationClassName": "",
"MaxNumberControlled": 0,
"NetConnectionStatus": None,
"ConfigManagerErrorCode": 0,
"ConfigManagerUserConfig": False,
"SystemCreationClassName": "",
"PowerManagementSupported": False,
"PowerManagementCapabilities": None,
},
],
"Win32_OperatingSystem": {
"Name": "",
"Debug": False,
"CSName": "",
"Locale": "",
"OSType": 0,
"Status": "",
"Caption": "",
"CodeSet": "",
"Primary": True,
"Version": "",
"BuildType": "",
"SuiteMask": 0,
"BootDevice": "",
"CSDVersion": "",
"OSLanguage": 0,
"PAEEnabled": None,
"BuildNumber": "",
"CountryCode": "",
"Description": "",
"Distributed": False,
"InstallDate": "",
"ProductType": 0,
"SystemDrive": "",
"MUILanguages": [""],
"Manufacturer": "",
"Organization": "",
"SerialNumber": "",
"SystemDevice": "",
"LocalDateTime": "",
"NumberOfUsers": 0,
"PlusProductID": None,
"LastBootUpTime": "",
"OSArchitecture": "",
"OSProductSuite": 0,
"RegisteredUser": "",
"CurrentTimeZone": 0,
"EncryptionLevel": 0,
"SystemDirectory": "",
"LargeSystemCache": None,
"WindowsDirectory": "",
"CreationClassName": "",
"FreeVirtualMemory": "",
"NumberOfProcesses": 0,
"PlusVersionNumber": None,
"FreePhysicalMemory": "",
"OperatingSystemSKU": 0,
"TotalSwapSpaceSize": None,
"CSCreationClassName": "",
"MaxNumberOfProcesses": 0,
"MaxProcessMemorySize": "",
"OtherTypeDescription": None,
"NumberOfLicensedUsers": 0,
"FreeSpaceInPagingFiles": "",
"TotalVirtualMemorySize": "",
"TotalVisibleMemorySize": "",
"ServicePackMajorVersion": 0,
"ServicePackMinorVersion": 0,
"SizeStoredInPagingFiles": "",
"ForegroundApplicationBoost": 0,
"DataExecutionPrevention_Drivers": True,
"DataExecutionPrevention_Available": True,
"DataExecutionPrevention_SupportPolicy": 0,
"DataExecutionPrevention_32BitApplications": True,
},
"Win32_VideoController": {
"Name": "",
"Status": "",
"Caption": "",
"DeviceID": "",
"ICMIntent": None,
"ICMMethod": None,
"VideoMode": None,
"AdapterRAM": None,
"DitherType": None,
"DriverDate": "",
"InfSection": "",
"Monochrome": False,
"StatusInfo": None,
"SystemName": "",
"Description": "",
"InfFilename": "",
"InstallDate": None,
"PNPDeviceID": "",
"Availability": 0,
"ErrorCleared": None,
"DriverVersion": "",
"LastErrorCode": None,
"AdapterDACType": None,
"MaxRefreshRate": None,
"MinRefreshRate": None,
"VideoProcessor": None,
"CurrentScanMode": None,
"TimeOfLastReset": None,
"VideoMemoryType": 0,
"ErrorDescription": None,
"ColorTableEntries": None,
"CreationClassName": "",
"ProtocolSupported": None,
"VideoArchitecture": 0,
"CurrentRefreshRate": None,
"DeviceSpecificPens": None,
"MaxMemorySupported": None,
"NumberOfVideoPages": None,
"CurrentBitsPerPixel": None,
"CurrentNumberOfRows": None,
"MaxNumberControlled": None,
"NumberOfColorPlanes": None,
"AdapterCompatibility": "",
"SpecificationVersion": None,
"SystemPaletteEntries": None,
"VideoModeDescription": None,
"CurrentNumberOfColors": None,
"CapabilityDescriptions": None,
"ConfigManagerErrorCode": 0,
"CurrentNumberOfColumns": None,
"AcceleratorCapabilities": None,
"ConfigManagerUserConfig": False,
"InstalledDisplayDrivers": None,
"SystemCreationClassName": "",
"PowerManagementSupported": None,
"CurrentVerticalResolution": None,
"CurrentHorizontalResolution": None,
"PowerManagementCapabilities": None,
"ReservedSystemPaletteEntries": None,
},
"Win32_ComputerSystemProduct": {
"Name": "",
"UUID": "",
"Vendor": "",
"Caption": "",
"Version": "",
"SKUNumber": None,
"Description": "",
"IdentifyingNumber": "",
},
},
"dmi": {
"Base_Board_Information": {"Manufacturer": ""},
"OEM_Strings": {"String_1": "", "String_2": ""},
"Memory_Device": {
"Set": "",
"Size": "",
"Type": "",
"Speed": "",
"Locator": "",
"Asset_Tag": "",
"Data_Width": "",
"Form_Factor": "",
"Part_Number": "",
"Total_Width": "",
"Type_Detail": "",
"Bank_Locator": "",
"Manufacturer": "",
"Serial_Number": "",
},
"BIOS_Information": {
"Vendor": "",
"Address": "",
"Version": "",
"ROM_Size": "",
"Release_Date": "",
"Runtime_Size": "",
"BIOS_Revision": "",
"Characteristics": ["", "", ""],
},
"System_Information": {
"UUID": "",
"Family": "",
"Version": "",
"SKU_Number": "",
"Manufacturer": "",
"Product_Name": "",
"Wake-up_Type": "",
"Serial_Number": "",
},
"Chassis_Information": {
"Lock": "",
"Type": "",
"Height": "",
"Version": "",
"Asset_Tag": "",
"Manufacturer": "",
"Boot-up_State": "",
"Serial_Number": "",
"Thermal_State": "",
"OEM_Information": "",
"Security_Status": "",
"Contained_Elements": "",
"Power_Supply_State": "",
"Number_Of_Power_Cords": "",
},
"Physical_Memory_Array": {"Use": "", "Location": "", "Maximum_Capacity": "", "Number_Of_Devices": "", "Error_Correction_Type": ""},
"Processor_Information": [
{
"ID": "",
"Type": "",
"Family": "",
"Status": "",
"Upgrade": "",
"Version": "",
"Voltage": "",
"Asset_Tag": "",
"Max_Speed": "",
"Part_Number": "",
"Manufacturer": "",
"Current_Speed": "",
"Serial_Number": "",
"External_Clock": "",
"Socket_Designation": "",
},
{
"ID": "",
"Type": "",
"Family": "",
"Status": "",
"Upgrade": "",
"Version": "",
"Voltage": "",
"Asset_Tag": "",
"Max_Speed": "",
"Part_Number": "",
"Manufacturer": "",
"Current_Speed": "",
"Serial_Number": "",
"External_Clock": "",
"Socket_Designation": "",
},
{
"ID": "",
"Type": "",
"Family": "",
"Status": "",
"Upgrade": "",
"Version": "",
"Voltage": "",
"Asset_Tag": "",
"Max_Speed": "",
"Part_Number": "",
"Manufacturer": "",
"Current_Speed": "",
"Serial_Number": "",
"External_Clock": "",
"Socket_Designation": "",
},
{
"ID": "",
"Type": "",
"Family": "",
"Status": "",
"Upgrade": "",
"Version": "",
"Voltage": "",
"Asset_Tag": "",
"Max_Speed": "",
"Part_Number": "",
"Manufacturer": "",
"Current_Speed": "",
"Serial_Number": "",
"External_Clock": "",
"Socket_Designation": "",
},
{
"ID": "",
"Type": "",
"Family": "",
"Status": "",
"Upgrade": "",
"Version": "",
"Voltage": "",
"Asset_Tag": "",
"Max_Speed": "",
"Part_Number": "",
"Manufacturer": "",
"Current_Speed": "",
"Serial_Number": "",
"External_Clock": "",
"Socket_Designation": "",
},
{
"ID": "",
"Type": "",
"Family": "",
"Status": "",
"Upgrade": "",
"Version": "",
"Voltage": "",
"Asset_Tag": "",
"Max_Speed": "",
"Part_Number": "",
"Manufacturer": "",
"Current_Speed": "",
"Serial_Number": "",
"External_Clock": "",
"Socket_Designation": "",
},
{
"ID": "",
"Type": "",
"Family": "",
"Status": "",
"Upgrade": "",
"Version": "",
"Voltage": "",
"Asset_Tag": "",
"Max_Speed": "",
"Part_Number": "",
"Manufacturer": "",
"Current_Speed": "",
"Serial_Number": "",
"External_Clock": "",
"Socket_Designation": "",
},
{
"ID": "",
"Type": "",
"Family": "",
"Status": "",
"Upgrade": "",
"Version": "",
"Voltage": "",
"Asset_Tag": "",
"Max_Speed": "",
"Part_Number": "",
"Manufacturer": "",
"Current_Speed": "",
"Serial_Number": "",
"External_Clock": "",
"Socket_Designation": "",
},
],
"System_Boot_Information": {"Status": ""},
"Memory_Array_Mapped_Address": {"Range_Size": "", "Ending_Address": "", "Partition_Width": "", "Starting_Address": ""},
"Memory_Device_Mapped_Address": {"Range_Size": "", "Ending_Address": "", "Starting_Address": "", "Partition_Row_Position": ""},
},
"host_info": {
"mac": [""],
"win64": True,
"environ": {
"OS": "",
"TMP": "",
"PATH": "",
"TEMP": "",
"PUBLIC": "",
"WINDIR": "",
"APPDATA": "",
"COMSPEC": "",
"PATHEXT": "",
"USERNAME": "",
"SYSTEMROOT": "",
"USERDOMAIN": "",
"PROGRAMDATA": "",
"SYSTEMDRIVE": "",
"USERPROFILE": "",
"COMPUTERNAME": "",
"LOCALAPPDATA": "",
"OPENSSL_CONF": "",
"PROGRAMFILES": "",
"PROGRAMW6432": "",
"PSMODULEPATH": "",
"DOKANLIBRARY1": "",
"UD_INSTALL_DIR": "",
"ALLUSERSPROFILE": "",
"MOZ_PLUGIN_PATH": "",
"PROCESSOR_LEVEL": "",
"FP_NO_HOST_CHECK": "",
"PROGRAMFILES(X86)": "",
"COMMONPROGRAMFILES": "",
"COMMONPROGRAMW6432": "",
"PROCESSOR_REVISION": "",
"NUMBER_OF_PROCESSORS": "",
"PROCESSOR_IDENTIFIER": "",
"PROCESSOR_ARCHITECTURE": "",
"PROCESSOR_ARCHITEW6432": "",
"COMMONPROGRAMFILES(X86)": "",
},
"main_ip": ["", ""],
"os_name": "",
"cpu_name": "",
"gateways": [""],
"platform": "",
"dnsdomain": "",
"uac_level": "",
"networking": [
{
"mac": "",
"addr": [
{"addr": "", "netmask": "", "broadcast": "", "connected": True},
{"addr": "", "netmask": "", "broadcast": "", "connected": True},
],
"iface": "",
}
],
"os_version": "",
"description": "",
"dns_servers": ["", ""],
"domain_name": "",
"local_users": ["", "", ""],
"local_groups": {
"Invités": [""],
"IIS_IUSRS": [""],
"Duplicateurs": [],
"Utilisateurs": ["", "", "", ""],
"Administrateurs": ["", "", "", "", ""],
"Opérateurs de sauvegarde": [],
"Utilisateurs avec pouvoir": [],
"Opérateurs de chiffrement": [],
"Utilisateurs du Bureau à distance": ["", ""],
"Opérateurs de configuration réseau": [],
"Lecteurs des journaux d'événements": [],
"Utilisateurs du modèle COM distribué": [],
"Utilisateurs du journal de performances": [],
"Utilisateurs de l'Analyseur de performances": [],
},
"repositories": "",
"computer_fqdn": "",
"computer_name": "",
"connected_ips": ["", "", ""],
"computer_ad_dn": "",
"cpu_identifier": "",
"local_profiles": [
{"sid": "", "user": "", "profile_path": ""},
{"sid": "", "user": "", "profile_path": ""},
{"sid": "", "user": "", "profile_path": ""},
{"sid": "", "user": "", "profile_path": ""},
{"sid": "", "user": "", "profile_path": ""},
{"sid": "", "user": "", "profile_path": ""},
{"sid": "", "user": "", "profile_path": ""},
{"sid": "", "user": "", "profile_path": ""},
{"sid": "", "user": "", "profile_path": ""},
{"sid": "", "user": "", "profile_path": ""},
{"sid": "", "user": "", "profile_path": ""},
{"sid": "", "user": "", "profile_path": ""},
],
"profiles_users": ["", "", "", "", "", "", "", "", "", "", "", ""],
"workgroup_name": "",
"windows_version": "",
"computer_ad_site": "",
"registered_owner": "",
"domain_controller": "",
"installation_date": "",
"wua_agent_version": "",
"computer_ad_groups": [""],
"domain_info_source": "",
"system_productname": "",
"system_manufacturer": "",
"local_administrators": ["", ""],
"windows_product_infos": {"version": "", "key_match": True, "product_id": "", "product_key": "", "product_partnr": "", "product_source": ""},
"windows_startup_items": {"run": [], "common_startup": [{"name": "", "command": ""}, {"name": "", "command": ""}]},
"registered_organization": "",
"domain_controller_address": "",
},
"host_metrics": {
"boot_count": "0",
"local_drives": {},
"virtual_memory": 0,
"logged_in_users": [],
"physical_memory": 0,
"last_bootup_time": "",
"wapt-memory-usage": {
"rss": 0,
"vms": 0,
"wset": 0,
"private": 0,
"pagefile": 0,
"peak_wset": 0,
"paged_pool": 0,
"nonpaged_pool": 0,
"peak_pagefile": 0,
"num_page_faults": 0,
"peak_paged_pool": 0,
"peak_nonpaged_pool": 0,
},
"last_logged_on_user": "",
},
"host_networking": {
"mac": {},
"connected_ips": {},
"gateways": {},
"dbs_servers": {},
"physical_memory": 0,
"interfaces": [{"mac": "", "iface": "", "addr": [{"netmask": "", "connected": True, "broadcast": "", "addr": ""}]}],
"main_ip": {},
"dnsdomain": "",
},
"uuid": "",
}
template_xml = r"""<?xml version="1.0" encoding="UTF-8" ?>
<REQUEST>
<CONTENT>
<ACCESSLOG>
<LOGDATE>{{ date }}</LOGDATE>
</ACCESSLOG>
<ANTIVIRUS>
<BASE_VERSION></BASE_VERSION>
<COMPANY></COMPANY>
<ENABLED></ENABLED>
<GUID></GUID>
<NAME></NAME>
<UPTODATE></UPTODATE>
<VERSION></VERSION>
</ANTIVIRUS>{% for battery in data['dmi']['Portable_Battery'] %}
<BATTERIES>
<CAPACITY>{{ battery['Design_Capacity'] }}</CAPACITY>
<CHEMISTRY>{{ battery['SBDS_Chemistry'] }}</CHEMISTRY>
<DATE>{{ battery['SBDS_Manufacture_Date'] }}</DATE>
<MANUFACTURER>{{ battery['Manufacturer'] }}</MANUFACTURER>
<NAME>{{ battery['Name'] }}</NAME>
<SERIAL>{{ battery['SBDS_Serial_Number'] }}</SERIAL>
<VOLTAGE>{{ battery['Design_Voltage'] }}</VOLTAGE>
</BATTERIES>{% endfor %}
<BIOS>
<ASSETTAG>{{ data['dmi']['Chassis_Information']['Asset_Tag'] }}</ASSETTAG>
<BDATE>{{ data['dmi']['BIOS_Information']['Release_Date'] }}</BDATE>
<BMANUFACTURER>{{ data['dmi']['BIOS_Information']['Vendor'] }}</BMANUFACTURER>
<BVERSION>{{ data['dmi']['BIOS_Information']['Version'] }}</BVERSION>
<MMANUFACTURER>{{ data['dmi']['Base_Board_Information']['Manufacturer'] }}</MMANUFACTURER>
<MMODEL>{{ data['dmi']['System_Information']['Product_Name'] }}</MMODEL>
<MSN>{{ data['dmi']['Base_Board_Information']['Serial_Number'] }}</MSN>
<SKUNUMBER>{{ data['dmi']['System_Information']['SKU_Number'] }}</SKUNUMBER>
<SMANUFACTURER>{{ data['dmi']['System_Information']['Manufacturer'] }}</SMANUFACTURER>
<SMODEL>{{ data['smodel'] }}</SMODEL>
<SSN>{{ data['dmi']['System_Information']['Serial_Number'] }}</SSN>
</BIOS>
<CPUS>
<CORE>{{ data['cpu']['core'] }}</CORE>
<DESCRIPTION>{{ data['host_info']['cpu_identifier'] }}</DESCRIPTION>
<FAMILYNUMBER>{{ data['cpu']['familynumber'] }}</FAMILYNUMBER>
<ID>{{ data['cpu']['id'] }}</ID>
<MANUFACTURER>{{ data['cpu']['manufacturer'] }}</MANUFACTURER>
<MODEL>{{ data['cpu']['modelnumber'] }}</MODEL>
<NAME>{{ data['cpu']['name'] }}</NAME>
<SERIAL>{{ data['cpu']['serial'] }}</SERIAL>
<SPEED>{{ data['cpu']['speed'] }}</SPEED>
<STEPPING>{{ data['cpu']['stepping'] }}</STEPPING>
<THREAD>{{ data['cpu']['thread'] }}</THREAD>
</CPUS>
{% for drive in data['wmi']['Win32_LogicalDisk'] %}
{% if drive['Name'] %}
<DRIVES>
{% if drive['Description'] != None %}<DESCRIPTION>{{ drive['Description'] }}</DESCRIPTION>{% endif %}
{% if drive['FileSystem'] != None %}<FILESYSTEM>{{ drive['FileSystem'] }}</FILESYSTEM>{% endif %}
{% if drive['FreeSpace'] != None %}<FREE>{{ drive['FreeSpace']|int//1024//1024}}</FREE>{% endif %}
{% if drive['VolumeName'] != None %}<LABEL>{{ drive['VolumeName'] }}</LABEL> {% endif %}
{% if drive['Name'] != None %}<LETTER>{{ drive['Name'] }}</LETTER> {% endif %}
{% if drive['VolumeSerialNumber'] != None %}<SERIAL>{{ drive['VolumeSerialNumber'] }}</SERIAL>{% endif %}
{% if (drive['Name'] != None) and (drive['Name'] == data['wmi']['Win32_OperatingSystem']['SystemDrive']) %}<SYSTEMDRIVE>1</SYSTEMDRIVE>{% else %}<SYSTEMDRIVE></SYSTEMDRIVE> {% endif %}
{% if drive['Size'] != None %}<TOTAL>{{ drive['Size']|int//1024//1024 }}</TOTAL>{% endif %}
{% if drive['typedisk'] != None %}<TYPE>{{ data['typedisk'][drive['DriveType']] }}</TYPE>{% endif %}
{% if drive['VolumeName'] != None %}<VOLUMN>{{ drive['VolumeName'] }}</VOLUMN>{% endif %}
</DRIVES>
{% endif %}
{% endfor %}
{% for drive in data['wmi']['Win32_Volume'] %}
{% if drive['Label'] %}
<DRIVES>
{% if drive['InstallDate'] != None %}<CREATEDATE>{{ drive['InstallDate'] }}</CREATEDATE>{% endif %}
{% if drive['Description'] != None %}<DESCRIPTION>{{ drive['Description'] }}</DESCRIPTION>{% endif %}
{% if drive['FileSystem'] != None %}<FILESYSTEM>{{ drive['FileSystem'] }}</FILESYSTEM>{% endif %}
{% if drive['FreeSpace'] != None %}<FREE>{{ drive['FreeSpace']|int//1024//1024}}</FREE>{% endif %}
{% if drive['Label'] != None %}<LABEL>{{ drive['Label'] }}</LABEL>{% endif %}
{% if drive['Label'] != None %}<LETTER>{{ drive['Label'] }}</LETTER>{% endif %}
{% if drive['SerialNumber'] != None %}<SERIAL>{{ srn(drive['SerialNumber']) }}</SERIAL>{% endif %}
{% if (drive['Label'] != None) and (drive['Label'] == data['wmi']['Win32_OperatingSystem']['SystemDrive']) %}<SYSTEMDRIVE>1</SYSTEMDRIVE>{% else %}<SYSTEMDRIVE></SYSTEMDRIVE> {% endif %}
{% if drive['DriveLetter'] != None %}<SYSTEMDRIVE>{{ data['typedisk'][drive['DriveLetter']] }}</SYSTEMDRIVE>{% endif %}
{% if drive['Capacity'] != None %}<TOTAL>{{ drive['Capacity']|int//1024//1024}}</TOTAL>{% endif %}
{% if drive['DriveType'] != None %}<TYPE>{{ drive['DriveType'] }}</TYPE>{% endif %}
{% if drive['Label'] != None %}<VOLUMN>{{ drive['Label'] }}</VOLUMN>{% endif %}
</DRIVES>
{% endif %}
{% endfor %}
{% for env in data['host_info']['environ'] %} <ENVS>
<KEY>{{ env }}</KEY>
<VAL>{{ data['host_info']['environ'][env] }}</VAL>
</ENVS>
{% endfor %}
<HARDWARE>
<CHASSIS_TYPE>{{ data['dmi']['Chassis_Information']['Type'] }}</CHASSIS_TYPE>
<CHECKSUM></CHECKSUM>
<DEFAULTGATEWAY>{{ data['host_info']['gateways'][0] }}</DEFAULTGATEWAY>
<DESCRIPTION>{{ data['host_info']['description'] }}</DESCRIPTION>
<DNS>{{ data['host_info']['dns_servers'][0] }}</DNS>
<ETIME></ETIME>
<IPADDR>{{ data['allip'] }}</IPADDR>
<LASTLOGGEDUSER>{{ data['host_metrics']['last_logged_on_user'] }}</LASTLOGGEDUSER>
<MEMORY>{{ data['host_metrics']['physical_memory'] }}</MEMORY>
<NAME>{{ data['host_info']['computer_name'].lower()}}</NAME>
<OSNAME>{{ data['host_info']['os_name'] }}</OSNAME>
<OSVERSION>{{ data['host_info']['os_version'] }}</OSVERSION>
<PROCESSORN></PROCESSORN>
<PROCESSORS>{{ data['dmi']['Processor_Information'][0]['Current_Speed'].split(' ')[0] }}</PROCESSORS>
<PROCESSORT>{{ data['host_info']['cpu_name'] }}</PROCESSORT>
<USERID>{{ data['host_metrics']['last_logged_on_user'] }}</USERID>
<UUID>{{ data['uuid'] }}</UUID>
<VMSYSTEM>{% if data['is_virtual'] == 0 %}Physical{% else %}Virtual{% endif %}</VMSYSTEM>
<WINCOMPANY>{{ data['host_info']['registered_organization'] }}</WINCOMPANY>
<WINLANG>{% if data['wmi']['Win32_OperatingSystem']['OSLanguage'] %}{{ data['wmi']['Win32_OperatingSystem']['OSLanguage'] }}{% else %}{{ data['host_info']['environ']['LANG'] }}{% endif %}</WINLANG>
<WINPRODID>{{ data['host_info']['windows_product_infos']['product_id'] }}</WINPRODID>
<WINPRODKEY>{{ data['host_info']['windows_product_infos']['product_key'] }}</WINPRODKEY>
<WINOWNER>{{ data['host_info']['registered_owner'] }}</WINOWNER>
</HARDWARE>
{% for memories in data['ram'] %}
<MEMORIES>
<CAPACITY>{{ memories['CAPACITY'] }}</CAPACITY>
<CAPTION>{{ memories['CAPTION'] }}</CAPTION>
<DESCRIPTION>{{ memories['DESCRIPTION'] }}</DESCRIPTION>
<MANUFACTURER>{{ memories['MANUFACTURER'] }}</MANUFACTURER>
<MODEL>{{ memories['MODEL'] }}</MODEL>
<NUMSLOTS>{{ memories['NUMSLOTS'] }}</NUMSLOTS>
<SERIALNUMBER>{{ memories['SERIALNUMBER'] }}</SERIALNUMBER>
<SPEED>{{ memories['SPEED'] }}</SPEED>
<TYPE>{{ memories['TYPE'] }}</TYPE>
</MEMORIES>
{% endfor %}
{% for monitor in data['host_info']['monitors'] %}
<MONITORS>
<BASE64>{{ monitor['b64_edid'] }}</BASE64>
<CAPTION>{{ monitor['name'] }}</CAPTION>
<DESCRIPTION>0/{{ monitor['manufactured'] }}</DESCRIPTION>
<MANUFACTURER>{{ monitor['manufacturer'] }}</MANUFACTURER>
<PORT>{{ monitor['technology'] }}</PORT>
<SERIAL>{{ monitor['serialno'] }}</SERIAL>
</MONITORS>{% endfor %}
{% for network in data['dict_mac_addr'] %}
<NETWORKS>
<DESCRIPTION>{{ data['dict_mac_addr'][network]['description'] }}</DESCRIPTION>{% if data['dict_mac_addr'][network]['ip'] %}
<IPADDRESS>{{ data['dict_mac_addr'][network]['ip']}}</IPADDRESS>
<IPMASK>{{ data['dict_mac_addr'][network]['netmask'] }}</IPMASK>{% endif %}
<MACADDR>{{ network }}</MACADDR>
<PNPDEVICEID>{{ data['dict_mac_addr'][network]['pnpdeviceid'] }}</PNPDEVICEID>
<SPEED>{{ data['dict_mac_addr'][network]['speed'] }}</SPEED>
<TYPE>{{ data['dict_mac_addr'][network]['type'] }}</TYPE>
<VIRTUALDEV>{{ data['dict_mac_addr'][network]['virtualdev'] }}</VIRTUALDEV>
</NETWORKS>{% endfor %}
<OPERATINGSYSTEM>
<ARCH>{% if data['wmi']['Win32_OperatingSystem']['OSArchitecture'] %}{{ data['wmi']['Win32_OperatingSystem']['OSArchitecture'] }}{% else %}{{ data['dmi']['Memory_Device']['Data_Width'] }}{% endif %}</ARCH>
<BOOT_TIME>{{ data['host_metrics']['last_bootup_time'] }}</BOOT_TIME>
<DNS_DOMAIN>{{ data['host_info']['domain_name'] }}</DNS_DOMAIN>
<FQDN>{{ data['host_info']['computer_fqdn'] }}</FQDN>
<FULL_NAME>{{ data['wmi']['Win32_OperatingSystem']['Caption'] }}</FULL_NAME>
<INSTALL_DATE>{{ data['wmi']['Win32_OperatingSystem']['InstallDate'] }}</INSTALL_DATE>
<KERNEL_NAME>{% if data['host_info']['os']=='windows' %}MSWin32{% endif %}</KERNEL_NAME>
<KERNEL_VERSION>{% if data['host_info']['kernel_version'] %}{{ data['host_info']['kernel_version'] }}{% else %}{{ data['host_info']['os_version'] }}{% endif %}</KERNEL_VERSION>
<NAME>{{ data['host_info']['os_shortname'] }}</NAME>
<SERVICE_PACK>{{ data['wmi']['Win32_OperatingSystem']['CSDVersion'] }}</SERVICE_PACK>
<TIMEZONE>
<NAME></NAME>
<OFFSET></OFFSET>
</TIMEZONE>
<VERSION>{{ data['operatingsystem_version'] }}</VERSION>
</OPERATINGSYSTEM>{% for printer in data['wmi']['Win32_Printer'] %}
<PRINTERS>
<DRIVER>{{ printer['DriverName'] }}</DRIVER>
<NAME>{{ printer['Name'] }}</NAME>
<NETWORK>{% if printer['Network'] %}1{% else %}0{% endif %}</NETWORK>
<PORT>{{ printer['PortName'] }}</PORT>
<PRINTPROCESSOR>{{ printer['PrintProcessor'] }}</PRINTPROCESSOR>
<RESOLUTION>{{ printer['VerticalResolution'] }}x{{ printer['HorizontalResolution'] }}</RESOLUTION>
<SHARED>{% if printer['Shared'] %}1{% else %}0{% endif %}</SHARED>
</PRINTERS>{% endfor %}{% for software in data['installed_softwares'] %}
<SOFTWARES>
<FROM>registry</FROM>
<GUID>{{ software['key'] }}</GUID>
<INSTALLDATE>{{ software['install_date'] }}</INSTALLDATE>
<NAME>{{ software['name'] }}</NAME>
<PUBLISHER>{{ software['publisher'] }}</PUBLISHER>
<SYSTEM_CATEGORY>application</SYSTEM_CATEGORY>
<UNINSTALL_STRING>{{ software['uninstall_string'] }}</UNINSTALL_STRING>
<VERSION>{{ software['version'] }}</VERSION>
</SOFTWARES>{% endfor %}
<USERS>
<DOMAIN>{% if data['host_info']['domain_name'] %}{{ data['host_info']['domain_name'] }}{% else %}{{ data['host_info']['workgroup_name'] }}{% endif %}</DOMAIN>
<LOGIN>{{ data['host_metrics']['last_logged_on_user'] }}</LOGIN>
</USERS>
<VERSIONCLIENT>FusionInventory-Agent_v2.6</VERSIONCLIENT>
<VERSIONPROVIDER>
<COMMENTS>Provided by Tranquil IT</COMMENTS>
<COMMENTS>Inventory uploaded from WAPTServer</COMMENTS>
<NAME>FusionInventory</NAME>
<PERL_EXE></PERL_EXE>
<PERL_VERSION></PERL_VERSION>
<PROGRAM>fusioninventory-agent</PROGRAM>
<VERSION>2.6</VERSION>
</VERSIONPROVIDER>
<VIDEOS>
<NAME>{{ data['wmi']['Win32_VideoController']['Name'] }}</NAME>
</VIDEOS>
</CONTENT>
<DEVICEID>{{ data['uuid'] }}</DEVICEID>
<QUERY>INVENTORY</QUERY>
</REQUEST>"""
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
b28e8c754d3fd4ba68e16693edc7ace65facba11e203465e377184244d74ca27 : WAPT/control
dbe1285588343cbdf5a6d18fd0cf0038de795d7a8a79cbaf90fb34720f7be890 : WAPT/icon.png
3b71e9d3fb970833dbe2c65dc581d3a8197e926b57d43ad9c9078bc51b872015 : glpi_api.ini
43fc64984bb4a77d83bd4908082a64287bfc8913ab88577852bc1138dff2c715 : luti.json
c189d8f2e5a9ee3be04c88fe92d717ed53a15f24a7f5afa9f996eb2bf8035f5d : setup.py
cb302f842cf1695f553389a436898f9e580d7d866a6726789dca1994a55e9c3c : wapt_api.ini