mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-19 00:17:51 +02:00
update systeminfo parser with updated timestamps, normalized blank fields, and new doc style
This commit is contained in:
@ -183,6 +183,7 @@ The JSON output can be compact (default) or pretty formatted with the `-p` optio
|
||||
- `--systemctl-lj` enables the `systemctl list-jobs` command parser ([documentation](https://kellyjonbrazil.github.io/jc/docs/parsers/systemctl_lj))
|
||||
- `--systemctl-ls` enables the `systemctl list-sockets` command parser ([documentation](https://kellyjonbrazil.github.io/jc/docs/parsers/systemctl_ls))
|
||||
- `--systemctl-luf` enables the `systemctl list-unit-files` command parser ([documentation](https://kellyjonbrazil.github.io/jc/docs/parsers/systemctl_luf))
|
||||
- `--systeminfo` enables the `systeminfo` command parser ([documentation](https://kellyjonbrazil.github.io/jc/docs/parsers/systeminfo))
|
||||
- `--time` enables the `/usr/bin/time` command parser ([documentation](https://kellyjonbrazil.github.io/jc/docs/parsers/time))
|
||||
- `--timedatectl` enables the `timedatectl status` command parser ([documentation](https://kellyjonbrazil.github.io/jc/docs/parsers/timedatectl))
|
||||
- `--tracepath` enables the `tracepath` and `tracepath6` command parser ([documentation](https://kellyjonbrazil.github.io/jc/docs/parsers/tracepath))
|
||||
|
@ -1,9 +1,13 @@
|
||||
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||
|
||||
# jc.parsers.systeminfo
|
||||
jc - JSON CLI output utility `systeminfo` command output parser
|
||||
|
||||
Parses Windows "systeminfo" command. Multiline values such as
|
||||
hotfixes or network cards are unparsed.
|
||||
Blank or missing elements are set to `null`.
|
||||
|
||||
The `original_install_date_epoch` and `system_boot_time_epoch` calculated timestamp fields are naive (i.e. based on the local time of the system the parser is run on)
|
||||
|
||||
The `original_install_date_epoch_utc` and `system_boot_time_epoch_utc` calculated timestamp fields are timezone-aware and are only available if the timezone field is UTC.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
@ -14,50 +18,188 @@ Usage (module):
|
||||
import jc.parsers.systeminfo
|
||||
result = jc.parsers.systeminfo.parse(systeminfo_command_output)
|
||||
|
||||
Compatibility:
|
||||
Schema:
|
||||
|
||||
'win32'
|
||||
{
|
||||
"host_name": string,
|
||||
"os_name": string,
|
||||
"os_version": string,
|
||||
"os_manufacturer": string,
|
||||
"os_configuration": string,
|
||||
"os_build_type": string,
|
||||
"registered_owner": string,
|
||||
"registered_organization": string,
|
||||
"product_id": string,
|
||||
"original_install_date": string,
|
||||
"original_install_date_epoch": integer, # naive timestamp
|
||||
"original_install_date_epoch_utc": integer, # timezone-aware timestamp
|
||||
"system_boot_time": string,
|
||||
"system_boot_time_epoch": integer, # naive timestamp
|
||||
"system_boot_time_epoch_utc": integer, # timezone-aware timestamp
|
||||
"system_manufacturer": string,
|
||||
"system_model": string,
|
||||
"system_type": string,
|
||||
"processors": [
|
||||
string
|
||||
],
|
||||
"bios_version": string,
|
||||
"windows_directory": string,
|
||||
"system_directory": string,
|
||||
"boot_device": string,
|
||||
"system_locale": string,
|
||||
"input_locale": string,
|
||||
"time_zone": string,
|
||||
"total_physical_memory_mb": string,
|
||||
"available_physical_memory_mb": integer,
|
||||
"virtual_memory_max_size_mb": integer,
|
||||
"virtual_memory_available_mb": integer,
|
||||
"virtual_memory_in_use_mb": integer,
|
||||
"page_file_locations": string,
|
||||
"domain": string,
|
||||
"logon_server": string,
|
||||
"hotfixs": [
|
||||
string
|
||||
],
|
||||
"network_cards": [
|
||||
{
|
||||
"name": string,
|
||||
"connection_name": string,
|
||||
"status": string,
|
||||
"dhcp_enabled": boolean,
|
||||
"dhcp_server": string,
|
||||
"ip_addresses": [
|
||||
string
|
||||
]
|
||||
}
|
||||
],
|
||||
"hyperv_requirements": {
|
||||
"vm_monitor_mode_extensions": boolean,
|
||||
"virtualization_enabled_in_firmware": boolean,
|
||||
"second_level_address_translation": boolean,
|
||||
"data_execution_prevention_available": boolean
|
||||
}
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ systeminfo | jc --systeminfo -p
|
||||
{
|
||||
"host_name": "DESKTOP-WIN01",
|
||||
"os_name": "Microsoft Windows 10 Enterprise",
|
||||
"os_version": "10.0.19042 N/A Build 19042",
|
||||
"os_manufacturer": "Microsoft Corporation",
|
||||
"os_configuration": "Member Workstation",
|
||||
"os_build_type": "Multiprocessor Free",
|
||||
"registered_owner": "User",
|
||||
"registered_organization": "",
|
||||
"product_id": "00111-12345-00001-AA111",
|
||||
"original_install_date": "2/16/2021, 11:20:27 AM",
|
||||
"system_boot_time": "3/19/2021, 9:25:03 AM",
|
||||
"system_manufacturer": "VMware, Inc.",
|
||||
"system_model": "VMware7,1",
|
||||
"system_type": "x64-based PC",
|
||||
"processors": "1 Processor(s) Installed.
|
||||
[01]: ...",
|
||||
"bios_version": "VMware, Inc. VMW71.00V.11111111.B64.2008100111, 8/10/2020",
|
||||
"windows_directory": "C:\Windows",
|
||||
"system_directory": "C:\Windows\system32",
|
||||
"boot_device": "\Device\HarddiskVolume1",
|
||||
"system_locale": "en-us;English (United States)",
|
||||
"input_locale": "en-us;English (United States)",
|
||||
"time_zone": "(UTC-08:00) Pacific Time (US & Canada)",
|
||||
"total_physical_memory": "2,047 MB",
|
||||
"available_physical_memory": "1,417 MB",
|
||||
"virtual_memory_max_size": "2,687 MB",
|
||||
"virtual_memory_available": "1,482 MB",
|
||||
"virtual_memory_in_use": "1,205 MB",
|
||||
"page_file_locations": "C:\pagefile.sys",
|
||||
"domain": "TEST.local",
|
||||
"logon_server": "\\WIN-AA1A1A11AAA",
|
||||
"hotfixs": "6 Hotfix(s) Installed.
|
||||
[01]: KB4578...",
|
||||
"network_cards": "1 NIC(s) Installed.
|
||||
[01]: Int...",
|
||||
"hyperv_requirements": "A hypervisor has been detected. Features required fo..."
|
||||
"host_name": "TESTLAPTOP",
|
||||
"os_name": "Microsoft Windows 10 Enterprise",
|
||||
"os_version": "10.0.17134 N/A Build 17134",
|
||||
"os_manufacturer": "Microsoft Corporation",
|
||||
"os_configuration": "Member Workstation",
|
||||
"os_build_type": "Multiprocessor Free",
|
||||
"registered_owner": "Test, Inc.",
|
||||
"registered_organization": "Test, Inc.",
|
||||
"product_id": "11111-11111-11111-AA111",
|
||||
"original_install_date": "3/26/2019, 3:51:30 PM",
|
||||
"system_boot_time": "3/30/2021, 6:13:59 AM",
|
||||
"system_manufacturer": "Dell Inc.",
|
||||
"system_model": "Precision 5530",
|
||||
"system_type": "x64-based PC",
|
||||
"processors": [
|
||||
"Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~2592 Mhz"
|
||||
],
|
||||
"bios_version": "Dell Inc. 1.16.2, 4/21/2020",
|
||||
"windows_directory": "C:\WINDOWS",
|
||||
"system_directory": "C:\WINDOWS\system32",
|
||||
"boot_device": "\Device\HarddiskVolume2",
|
||||
"system_locale": "en-us;English (United States)",
|
||||
"input_locale": "en-us;English (United States)",
|
||||
"time_zone": "(UTC+00:00) UTC",
|
||||
"total_physical_memory_mb": 32503,
|
||||
"available_physical_memory_mb": 19743,
|
||||
"virtual_memory_max_size_mb": 37367,
|
||||
"virtual_memory_available_mb": 22266,
|
||||
"virtual_memory_in_use_mb": 15101,
|
||||
"page_file_locations": "C:\pagefile.sys",
|
||||
"domain": "test.com",
|
||||
"logon_server": "\\TESTDC01",
|
||||
"hotfixs": [
|
||||
"KB2693643",
|
||||
"KB4601054"
|
||||
],
|
||||
"network_cards": [
|
||||
{
|
||||
"name": "Intel(R) Wireless-AC 9260 160MHz",
|
||||
"connection_name": "Wi-Fi",
|
||||
"status": null,
|
||||
"dhcp_enabled": true,
|
||||
"dhcp_server": "192.168.2.1",
|
||||
"ip_addresses": [
|
||||
"192.168.2.219"
|
||||
]
|
||||
}
|
||||
],
|
||||
"hyperv_requirements": {
|
||||
"vm_monitor_mode_extensions": true,
|
||||
"virtualization_enabled_in_firmware": true,
|
||||
"second_level_address_translation": false,
|
||||
"data_execution_prevention_available": true
|
||||
},
|
||||
"original_install_date_epoch": 1553640690,
|
||||
"original_install_date_epoch_utc": 1553615490,
|
||||
"system_boot_time_epoch": 1617110039,
|
||||
"system_boot_time_epoch_utc": 1617084839
|
||||
}
|
||||
|
||||
$ systeminfo | jc --systeminfo -p -r
|
||||
{
|
||||
"host_name": "TESTLAPTOP",
|
||||
"os_name": "Microsoft Windows 10 Enterprise",
|
||||
"os_version": "10.0.17134 N/A Build 17134",
|
||||
"os_manufacturer": "Microsoft Corporation",
|
||||
"os_configuration": "Member Workstation",
|
||||
"os_build_type": "Multiprocessor Free",
|
||||
"registered_owner": "Test, Inc.",
|
||||
"registered_organization": "Test, Inc.",
|
||||
"product_id": "11111-11111-11111-AA111",
|
||||
"original_install_date": "3/26/2019, 3:51:30 PM",
|
||||
"system_boot_time": "3/30/2021, 6:13:59 AM",
|
||||
"system_manufacturer": "Dell Inc.",
|
||||
"system_model": "Precision 5530",
|
||||
"system_type": "x64-based PC",
|
||||
"processors": [
|
||||
"Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~2592 Mhz"
|
||||
],
|
||||
"bios_version": "Dell Inc. 1.16.2, 4/21/2020",
|
||||
"windows_directory": "C:\WINDOWS",
|
||||
"system_directory": "C:\WINDOWS\system32",
|
||||
"boot_device": "\Device\HarddiskVolume2",
|
||||
"system_locale": "en-us;English (United States)",
|
||||
"input_locale": "en-us;English (United States)",
|
||||
"time_zone": "(UTC+00:00) UTC",
|
||||
"total_physical_memory_mb": "32,503 MB",
|
||||
"available_physical_memory_mb": "19,743 MB",
|
||||
"virtual_memory_max_size_mb": "37,367 MB",
|
||||
"virtual_memory_available_mb": "22,266 MB",
|
||||
"virtual_memory_in_use_mb": "15,101 MB",
|
||||
"page_file_locations": "C:\pagefile.sys",
|
||||
"domain": "test.com",
|
||||
"logon_server": "\\TESTDC01",
|
||||
"hotfixs": [
|
||||
"KB2693643",
|
||||
"KB4601054"
|
||||
],
|
||||
"network_cards": [
|
||||
{
|
||||
"name": "Intel(R) Wireless-AC 9260 160MHz",
|
||||
"connection_name": "Wi-Fi",
|
||||
"status": "",
|
||||
"dhcp_enabled": "Yes",
|
||||
"dhcp_server": "192.168.2.1",
|
||||
"ip_addresses": [
|
||||
"192.168.2.219"
|
||||
]
|
||||
}
|
||||
],
|
||||
"hyperv_requirements": {
|
||||
"vm_monitor_mode_extensions": "Yes",
|
||||
"virtualization_enabled_in_firmware": "Yes",
|
||||
"second_level_address_translation": "No",
|
||||
"data_execution_prevention_available": "Yes"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -67,61 +209,6 @@ info()
|
||||
```
|
||||
|
||||
|
||||
## process
|
||||
```python
|
||||
process(proc_data)
|
||||
```
|
||||
|
||||
Final processing to conform to the schema.
|
||||
|
||||
Parameters:
|
||||
|
||||
proc_data: (List of Dictionaries) raw structured data to process
|
||||
|
||||
Returns:
|
||||
|
||||
List of Dictionaries. Some keys are optional. Example: a non-virtualized server will not have
|
||||
the "hyperv_requirements" key. Structured data with the following schema:
|
||||
|
||||
[
|
||||
{
|
||||
"host_name": "string",
|
||||
"os_name": "string",
|
||||
"os_version": "string",
|
||||
"os_manufacturer": "string",
|
||||
"os_configuration": "string",
|
||||
"os_build_type": "string",
|
||||
"registered_owner": "string",
|
||||
"registered_organization": "string",
|
||||
"product_id": "string",
|
||||
"original_install_date": "string",
|
||||
"system_boot_time": "string",
|
||||
"system_manufacturer": "string",
|
||||
"system_model": "string",
|
||||
"system_type": "string",
|
||||
"processors": "string",
|
||||
"bios_version": "string",
|
||||
"windows_directory": "string",
|
||||
"system_directory": "string",
|
||||
"boot_device": "string",
|
||||
"system_locale": "string",
|
||||
"input_locale": "string",
|
||||
"time_zone": "string",
|
||||
"total_physical_memory": "string",
|
||||
"available_physical_memory": "string",
|
||||
"virtual_memory_max_size": "string",
|
||||
"virtual_memory_available": "string",
|
||||
"virtual_memory_in_use": "string",
|
||||
"page_file_locations": "string",
|
||||
"domain": "string",
|
||||
"logon_server": "string",
|
||||
"hotfixs": "string",
|
||||
"network_cards": "string",
|
||||
"hyperv_requirements": "string"
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
## parse
|
||||
```python
|
||||
parse(data, raw=False, quiet=False)
|
||||
@ -139,14 +226,7 @@ Returns:
|
||||
|
||||
List of Dictionaries. Raw or processed structured data.
|
||||
|
||||
## Parser Information
|
||||
Compatibility: win32
|
||||
|
||||
## get_value_pos
|
||||
```python
|
||||
get_value_pos(line, delim)
|
||||
```
|
||||
|
||||
Finds the first non-whitespace character after the delimiter
|
||||
Parameters:
|
||||
line: (string) Input string
|
||||
delim: (string) The data delimiter
|
||||
|
||||
Version 1.0 by Jon Smith (jon@rebelliondefense.com)
|
||||
|
BIN
jc/man/jc.1.gz
BIN
jc/man/jc.1.gz
Binary file not shown.
@ -1,5 +1,11 @@
|
||||
"""jc - JSON CLI output utility `systeminfo` command output parser
|
||||
|
||||
Blank or missing elements are set to `null`.
|
||||
|
||||
The `original_install_date_epoch` and `system_boot_time_epoch` calculated timestamp fields are naive (i.e. based on the local time of the system the parser is run on)
|
||||
|
||||
The `original_install_date_epoch_utc` and `system_boot_time_epoch_utc` calculated timestamp fields are timezone-aware and are only available if the timezone field is UTC.
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ systeminfo | jc --systeminfo
|
||||
@ -9,128 +15,188 @@ Usage (module):
|
||||
import jc.parsers.systeminfo
|
||||
result = jc.parsers.systeminfo.parse(systeminfo_command_output)
|
||||
|
||||
Examples:
|
||||
Schema:
|
||||
|
||||
$ systeminfo | jc --systeminfo -p -r
|
||||
{
|
||||
"host_name": "DESKTOP-WIN01",
|
||||
"os_name": "Microsoft Windows 10 Enterprise",
|
||||
"os_version": "10.0.19042 N/A Build 19042",
|
||||
"os_manufacturer": "Microsoft Corporation",
|
||||
"os_configuration": "Member Workstation",
|
||||
"os_build_type": "Multiprocessor Free",
|
||||
"registered_owner": "User",
|
||||
"registered_organization": "",
|
||||
"product_id": "00111-12345-00001-AA111",
|
||||
"original_install_date": "2/16/2021, 11:20:27 AM",
|
||||
"system_boot_time": "3/19/2021, 9:25:03 AM",
|
||||
"system_manufacturer": "VMware, Inc.",
|
||||
"system_model": "VMware7,1",
|
||||
"system_type": "x64-based PC",
|
||||
"processors": ["Intel64 Family 6 Model 158 Stepping 13 GenuineIntel ~2400 Mhz"],
|
||||
"bios_version": "VMware, Inc. VMW71.00V.11111111.B64.2008100111, 8/10/2020",
|
||||
"windows_directory": "C:\\Windows",
|
||||
"system_directory": "C:\\Windows\\system32",
|
||||
"boot_device": "\\Device\\HarddiskVolume1",
|
||||
"system_locale": "en-us;English (United States)",
|
||||
"input_locale": "en-us;English (United States)",
|
||||
"time_zone": "(UTC-08:00) Pacific Time (US & Canada)",
|
||||
"total_physical_memory_mb": "2,047 MB",
|
||||
"available_physical_memory_mb": "1,417 MB",
|
||||
"virtual_memory_max_size_mb": "2,687 MB",
|
||||
"virtual_memory_available_mb": "1,482 MB",
|
||||
"virtual_memory_in_use_mb": "1,205 MB",
|
||||
"page_file_locations": "C:\\pagefile.sys",
|
||||
"domain": "TEST.local",
|
||||
"logon_server": "\\\\WIN-AA1A1A11AAA",
|
||||
"hotfixs": [
|
||||
"KB4578968",
|
||||
"KB4562830",
|
||||
"KB4570334",
|
||||
"KB4580325",
|
||||
"KB4586864",
|
||||
"KB4594440"
|
||||
],
|
||||
"network_cards": [
|
||||
{
|
||||
"name": "Intel(R) 82574L Gigabit Network Connection",
|
||||
"connection_name": "Ethernet0",
|
||||
"status": "",
|
||||
"dhcp_enabled": "Yes",
|
||||
"dhcp_server": "192.168.133.250",
|
||||
"ip_addresses": [
|
||||
"192.168.133.3",
|
||||
"fe80::192:eb64:1fcf:86eb"
|
||||
]
|
||||
}
|
||||
],
|
||||
"hyperv_requirements": {
|
||||
"vm_monitor_mode_extensions": "Yes",
|
||||
"virtualization_enabled_in_firmware": "Yes",
|
||||
"second_level_address_translation": "No",
|
||||
"data_execution_prevention_available": "Yes"
|
||||
"host_name": string,
|
||||
"os_name": string,
|
||||
"os_version": string,
|
||||
"os_manufacturer": string,
|
||||
"os_configuration": string,
|
||||
"os_build_type": string,
|
||||
"registered_owner": string,
|
||||
"registered_organization": string,
|
||||
"product_id": string,
|
||||
"original_install_date": string,
|
||||
"original_install_date_epoch": integer, # naive timestamp
|
||||
"original_install_date_epoch_utc": integer, # timezone-aware timestamp
|
||||
"system_boot_time": string,
|
||||
"system_boot_time_epoch": integer, # naive timestamp
|
||||
"system_boot_time_epoch_utc": integer, # timezone-aware timestamp
|
||||
"system_manufacturer": string,
|
||||
"system_model": string,
|
||||
"system_type": string,
|
||||
"processors": [
|
||||
string
|
||||
],
|
||||
"bios_version": string,
|
||||
"windows_directory": string,
|
||||
"system_directory": string,
|
||||
"boot_device": string,
|
||||
"system_locale": string,
|
||||
"input_locale": string,
|
||||
"time_zone": string,
|
||||
"total_physical_memory_mb": string,
|
||||
"available_physical_memory_mb": integer,
|
||||
"virtual_memory_max_size_mb": integer,
|
||||
"virtual_memory_available_mb": integer,
|
||||
"virtual_memory_in_use_mb": integer,
|
||||
"page_file_locations": string,
|
||||
"domain": string,
|
||||
"logon_server": string,
|
||||
"hotfixs": [
|
||||
string
|
||||
],
|
||||
"network_cards": [
|
||||
{
|
||||
"name": string,
|
||||
"connection_name": string,
|
||||
"status": string,
|
||||
"dhcp_enabled": boolean,
|
||||
"dhcp_server": string,
|
||||
"ip_addresses": [
|
||||
string
|
||||
]
|
||||
}
|
||||
],
|
||||
"hyperv_requirements": {
|
||||
"vm_monitor_mode_extensions": boolean,
|
||||
"virtualization_enabled_in_firmware": boolean,
|
||||
"second_level_address_translation": boolean,
|
||||
"data_execution_prevention_available": boolean
|
||||
}
|
||||
}
|
||||
|
||||
Examples:
|
||||
|
||||
$ systeminfo | jc --systeminfo -p
|
||||
{
|
||||
"host_name": "DESKTOP-WIN01",
|
||||
"os_name": "Microsoft Windows 10 Enterprise",
|
||||
"os_version": "10.0.19042 N/A Build 19042",
|
||||
"os_manufacturer": "Microsoft Corporation",
|
||||
"os_configuration": "Member Workstation",
|
||||
"os_build_type": "Multiprocessor Free",
|
||||
"registered_owner": "User",
|
||||
"registered_organization": "",
|
||||
"product_id": "00111-12345-00001-AA111",
|
||||
"original_install_date": 1613496027,
|
||||
"system_boot_time": 1616163903,
|
||||
"system_manufacturer": "VMware, Inc.",
|
||||
"system_model": "VMware7,1",
|
||||
"system_type": "x64-based PC",
|
||||
"processors": ["Intel64 Family 6 Model 158 Stepping 13 GenuineIntel ~2400 Mhz"],
|
||||
"bios_version": "VMware, Inc. VMW71.00V.11111111.B64.2008100111, 8/10/2020",
|
||||
"windows_directory": "C:\\Windows",
|
||||
"system_directory": "C:\\Windows\\system32",
|
||||
"boot_device": "\\Device\\HarddiskVolume1",
|
||||
"system_locale": "en-us;English (United States)",
|
||||
"input_locale": "en-us;English (United States)",
|
||||
"time_zone": "(UTC-08:00) Pacific Time (US & Canada)",
|
||||
"total_physical_memory_mb": 2047,
|
||||
"available_physical_memory_mb": 1417,
|
||||
"virtual_memory_max_size_mb": 2687,
|
||||
"virtual_memory_available_mb": 1482,
|
||||
"virtual_memory_in_use_mb": 1205",
|
||||
"page_file_locations": "C:\\pagefile.sys",
|
||||
"domain": "TEST.local",
|
||||
"logon_server": "\\\\WIN-AA1A1A11AAA",
|
||||
"hotfixs": [
|
||||
"KB4578968",
|
||||
"KB4562830",
|
||||
"KB4570334",
|
||||
"KB4580325",
|
||||
"KB4586864",
|
||||
"KB4594440"
|
||||
],
|
||||
"network_cards": [
|
||||
{
|
||||
"name": "Intel(R) 82574L Gigabit Network Connection",
|
||||
"connection_name": "Ethernet0",
|
||||
"status": "",
|
||||
"dhcp_enabled": true,
|
||||
"dhcp_server": "192.168.133.250",
|
||||
"ip_addresses": [
|
||||
"192.168.133.3",
|
||||
"fe80::192:eb64:1fcf:86eb"
|
||||
]
|
||||
}
|
||||
],
|
||||
"hyperv_requirements": {
|
||||
"vm_monitor_mode_extensions": "Yes",
|
||||
"virtualization_enabled_in_firmware": "Yes",
|
||||
"second_level_address_translation": "No",
|
||||
"data_execution_prevention_available": "Yes"
|
||||
"host_name": "TESTLAPTOP",
|
||||
"os_name": "Microsoft Windows 10 Enterprise",
|
||||
"os_version": "10.0.17134 N/A Build 17134",
|
||||
"os_manufacturer": "Microsoft Corporation",
|
||||
"os_configuration": "Member Workstation",
|
||||
"os_build_type": "Multiprocessor Free",
|
||||
"registered_owner": "Test, Inc.",
|
||||
"registered_organization": "Test, Inc.",
|
||||
"product_id": "11111-11111-11111-AA111",
|
||||
"original_install_date": "3/26/2019, 3:51:30 PM",
|
||||
"system_boot_time": "3/30/2021, 6:13:59 AM",
|
||||
"system_manufacturer": "Dell Inc.",
|
||||
"system_model": "Precision 5530",
|
||||
"system_type": "x64-based PC",
|
||||
"processors": [
|
||||
"Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~2592 Mhz"
|
||||
],
|
||||
"bios_version": "Dell Inc. 1.16.2, 4/21/2020",
|
||||
"windows_directory": "C:\\WINDOWS",
|
||||
"system_directory": "C:\\WINDOWS\\system32",
|
||||
"boot_device": "\\Device\\HarddiskVolume2",
|
||||
"system_locale": "en-us;English (United States)",
|
||||
"input_locale": "en-us;English (United States)",
|
||||
"time_zone": "(UTC+00:00) UTC",
|
||||
"total_physical_memory_mb": 32503,
|
||||
"available_physical_memory_mb": 19743,
|
||||
"virtual_memory_max_size_mb": 37367,
|
||||
"virtual_memory_available_mb": 22266,
|
||||
"virtual_memory_in_use_mb": 15101,
|
||||
"page_file_locations": "C:\\pagefile.sys",
|
||||
"domain": "test.com",
|
||||
"logon_server": "\\\\TESTDC01",
|
||||
"hotfixs": [
|
||||
"KB2693643",
|
||||
"KB4601054"
|
||||
],
|
||||
"network_cards": [
|
||||
{
|
||||
"name": "Intel(R) Wireless-AC 9260 160MHz",
|
||||
"connection_name": "Wi-Fi",
|
||||
"status": null,
|
||||
"dhcp_enabled": true,
|
||||
"dhcp_server": "192.168.2.1",
|
||||
"ip_addresses": [
|
||||
"192.168.2.219"
|
||||
]
|
||||
}
|
||||
],
|
||||
"hyperv_requirements": {
|
||||
"vm_monitor_mode_extensions": true,
|
||||
"virtualization_enabled_in_firmware": true,
|
||||
"second_level_address_translation": false,
|
||||
"data_execution_prevention_available": true
|
||||
},
|
||||
"original_install_date_epoch": 1553640690,
|
||||
"original_install_date_epoch_utc": 1553615490,
|
||||
"system_boot_time_epoch": 1617110039,
|
||||
"system_boot_time_epoch_utc": 1617084839
|
||||
}
|
||||
|
||||
$ systeminfo | jc --systeminfo -p -r
|
||||
{
|
||||
"host_name": "TESTLAPTOP",
|
||||
"os_name": "Microsoft Windows 10 Enterprise",
|
||||
"os_version": "10.0.17134 N/A Build 17134",
|
||||
"os_manufacturer": "Microsoft Corporation",
|
||||
"os_configuration": "Member Workstation",
|
||||
"os_build_type": "Multiprocessor Free",
|
||||
"registered_owner": "Test, Inc.",
|
||||
"registered_organization": "Test, Inc.",
|
||||
"product_id": "11111-11111-11111-AA111",
|
||||
"original_install_date": "3/26/2019, 3:51:30 PM",
|
||||
"system_boot_time": "3/30/2021, 6:13:59 AM",
|
||||
"system_manufacturer": "Dell Inc.",
|
||||
"system_model": "Precision 5530",
|
||||
"system_type": "x64-based PC",
|
||||
"processors": [
|
||||
"Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~2592 Mhz"
|
||||
],
|
||||
"bios_version": "Dell Inc. 1.16.2, 4/21/2020",
|
||||
"windows_directory": "C:\\WINDOWS",
|
||||
"system_directory": "C:\\WINDOWS\\system32",
|
||||
"boot_device": "\\Device\\HarddiskVolume2",
|
||||
"system_locale": "en-us;English (United States)",
|
||||
"input_locale": "en-us;English (United States)",
|
||||
"time_zone": "(UTC+00:00) UTC",
|
||||
"total_physical_memory_mb": "32,503 MB",
|
||||
"available_physical_memory_mb": "19,743 MB",
|
||||
"virtual_memory_max_size_mb": "37,367 MB",
|
||||
"virtual_memory_available_mb": "22,266 MB",
|
||||
"virtual_memory_in_use_mb": "15,101 MB",
|
||||
"page_file_locations": "C:\\pagefile.sys",
|
||||
"domain": "test.com",
|
||||
"logon_server": "\\\\TESTDC01",
|
||||
"hotfixs": [
|
||||
"KB2693643",
|
||||
"KB4601054"
|
||||
],
|
||||
"network_cards": [
|
||||
{
|
||||
"name": "Intel(R) Wireless-AC 9260 160MHz",
|
||||
"connection_name": "Wi-Fi",
|
||||
"status": "",
|
||||
"dhcp_enabled": "Yes",
|
||||
"dhcp_server": "192.168.2.1",
|
||||
"ip_addresses": [
|
||||
"192.168.2.219"
|
||||
]
|
||||
}
|
||||
],
|
||||
"hyperv_requirements": {
|
||||
"vm_monitor_mode_extensions": "Yes",
|
||||
"virtualization_enabled_in_firmware": "Yes",
|
||||
"second_level_address_translation": "No",
|
||||
"data_execution_prevention_available": "Yes"
|
||||
}
|
||||
}
|
||||
"""
|
||||
import re
|
||||
@ -166,65 +232,23 @@ def _process(proc_data):
|
||||
will not have a 'hyperv_requirements' key, and a system already running hyper-v
|
||||
will have an empty "hyperv_requirements" object.
|
||||
|
||||
Structured data with the following schema:
|
||||
|
||||
{
|
||||
"host_name": "string",
|
||||
"os_name": "string",
|
||||
"os_version": "string",
|
||||
"os_manufacturer": "string",
|
||||
"os_configuration": "string",
|
||||
"os_build_type": "string",
|
||||
"registered_owner": "string",
|
||||
"registered_organization": "string",
|
||||
"product_id": "string",
|
||||
"original_install_date": integer, # naive timestamp
|
||||
"system_boot_time": integer, # naive timestamp
|
||||
"system_manufacturer": "string",
|
||||
"system_model": "string",
|
||||
"system_type": "string",
|
||||
"processors": ["string"],
|
||||
"bios_version": "string",
|
||||
"windows_directory": "string",
|
||||
"system_directory": "string",
|
||||
"boot_device": "string",
|
||||
"system_locale": "string",
|
||||
"input_locale": "string",
|
||||
"time_zone": "string",
|
||||
"total_physical_memory_mb": "string",
|
||||
"available_physical_memory_mb": integer,
|
||||
"virtual_memory_max_size_mb": integer,
|
||||
"virtual_memory_available_mb": integer,
|
||||
"virtual_memory_in_use_mb": integer,
|
||||
"page_file_locations": "string",
|
||||
"domain": "string",
|
||||
"logon_server": "string",
|
||||
"hotfixs": ["string"],
|
||||
"network_cards": [
|
||||
{
|
||||
"name": "string",
|
||||
"connection_name": "string",
|
||||
"status": "string",
|
||||
"dhcp_enabled": boolean,
|
||||
"dhcp_server": "string",
|
||||
"ip_addresses": ["string"]
|
||||
}
|
||||
],
|
||||
"hyperv_requirements": {
|
||||
"vm_monitor_mode_extensions": boolean,
|
||||
"virtualization_enabled_in_firmware": boolean,
|
||||
"second_level_address_translation": boolean,
|
||||
"data_execution_prevention_available": boolean
|
||||
}
|
||||
}
|
||||
Structured data to conform to the schema.
|
||||
"""
|
||||
# convert empty strings to None/null
|
||||
for item in proc_data:
|
||||
if isinstance(proc_data[item], str) and not proc_data[item]:
|
||||
proc_data[item] = None
|
||||
|
||||
# rebuild output for added semantic information
|
||||
for i, nic in enumerate(proc_data["network_cards"]):
|
||||
proc_data["network_cards"][i]["dhcp_enabled"] = _convert_to_boolean(
|
||||
nic["dhcp_enabled"]
|
||||
)
|
||||
|
||||
# convert empty strings to None/null
|
||||
for item in nic:
|
||||
if isinstance(nic[item], str) and not nic[item]:
|
||||
proc_data["network_cards"][i][item] = None
|
||||
|
||||
int_list = [
|
||||
"total_physical_memory_mb",
|
||||
"available_physical_memory_mb",
|
||||
@ -242,9 +266,10 @@ def _process(proc_data):
|
||||
# convert
|
||||
# from: (UTC-08:00) Pacific Time (US & Canada)
|
||||
# to: (UTC-0800)
|
||||
tz_fields = tz.split(" ")
|
||||
tz_fields = tz.split()
|
||||
tz = " " + tz_fields[0].replace(":", "")
|
||||
proc_data[key] = jc.utils.timestamp(f"{proc_data.get(key)}{tz}").naive
|
||||
proc_data[key + '_epoch'] = jc.utils.timestamp(f"{proc_data.get(key)}{tz}").naive
|
||||
proc_data[key + '_epoch_utc'] = jc.utils.timestamp(f"{proc_data.get(key)}{tz}").utc
|
||||
|
||||
hyperv_key = "hyperv_requirements"
|
||||
hyperv_subkey_list = [
|
||||
|
@ -65,7 +65,7 @@ def compatibility(mod_name, compatible):
|
||||
mod = mod_name.split('.')[-1]
|
||||
compat_list = ', '.join(compatible)
|
||||
warning_message(f'{mod} parser not compatible with your OS ({sys.platform}).\n'
|
||||
f' Compatible platforms: {compat_list}')
|
||||
f' Compatible platforms: {compat_list}')
|
||||
|
||||
|
||||
def has_data(data):
|
||||
@ -163,6 +163,8 @@ class timestamp:
|
||||
{'id': 1000, 'format': '%a %b %d %H:%M:%S %Y', 'locale': None}, # manual C locale format conversion: Tue Mar 23 16:12:11 2021 or Tue Mar 23 16:12:11 IST 2021
|
||||
{'id': 1500, 'format': '%Y-%m-%d %H:%M', 'locale': None}, # en_US.UTF-8 local format (found in who cli output): 2021-03-23 00:14
|
||||
{'id': 1600, 'format': '%m/%d/%Y %I:%M %p', 'locale': None}, # Windows english format (found in dir cli output): 12/07/2019 02:09 AM
|
||||
{'id': 1700, 'format': '%m/%d/%Y, %I:%M:%S %p', 'locale': None}, # Windows english format wint non-UTC tz (found in systeminfo cli output): 3/22/2021, 1:15:51 PM (UTC-0600)
|
||||
{'id': 1710, 'format': '%m/%d/%Y, %I:%M:%S %p UTC%z', 'locale': None}, # Windows english format with UTC tz (found in systeminfo cli output): 3/22/2021, 1:15:51 PM (UTC+0000)
|
||||
{'id': 2000, 'format': '%a %d %b %Y %I:%M:%S %p %Z', 'locale': None}, # en_US.UTF-8 local format (found in upower cli output): Tue 23 Mar 2021 04:12:11 PM UTC
|
||||
{'id': 3000, 'format': '%a %d %b %Y %I:%M:%S %p', 'locale': None}, # en_US.UTF-8 local format with non-UTC tz (found in upower cli output): Tue 23 Mar 2021 04:12:11 PM IST
|
||||
{'id': 4000, 'format': '%A %d %B %Y %I:%M:%S %p %Z', 'locale': None}, # European-style local format (found in upower cli output): Tuesday 01 October 2019 12:50:41 PM UTC
|
||||
@ -177,7 +179,6 @@ class timestamp:
|
||||
{'id': 8100, 'format': '%a %d %b %Y %H:%M:%S', 'locale': ''}, # current locale format with non-UTC tz (found in upower cli output): # mar. 23 mars 2021 19:12:11 EDT
|
||||
{'id': 8200, 'format': '%A %d %B %Y, %H:%M:%S UTC%z', 'locale': ''}, # fr_FR.utf8 locale format (found in date cli output): vendredi 26 mars 2021, 13:26:46 (UTC+0000)
|
||||
{'id': 8300, 'format': '%A %d %B %Y, %H:%M:%S', 'locale': ''}, # fr_FR.utf8 locale format with non-UTC tz (found in date cli output): vendredi 26 mars 2021, 13:26:46 (UTC-0400)
|
||||
{'id': 8400, 'format': '%m/%d/%Y, %I:%M:%S %p', 'locale': ''}, # Windows english format (found in systeminfo cli output): 3/22/2021, 1:15:51 PM (UTC-0600)
|
||||
{'id': 9000, 'format': '%c', 'locale': ''} # locally configured locale format conversion: Could be anything :) this is a last-gasp attempt
|
||||
]
|
||||
|
||||
|
BIN
man/jc.1.gz
BIN
man/jc.1.gz
Binary file not shown.
1
tests/fixtures/windows/windows-10/systeminfo-hyperv-utc.json
vendored
Normal file
1
tests/fixtures/windows/windows-10/systeminfo-hyperv-utc.json
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"host_name":"TESTLAPTOP","os_name":"Microsoft Windows 10 Enterprise","os_version":"10.0.17134 N/A Build 17134","os_manufacturer":"Microsoft Corporation","os_configuration":"Member Workstation","os_build_type":"Multiprocessor Free","registered_owner":"Test, Inc.","registered_organization":"Test, Inc.","product_id":"11111-11111-11111-AA111","original_install_date":"3/26/2019, 3:51:30 PM","system_boot_time":"3/30/2021, 6:13:59 AM","system_manufacturer":"Dell Inc.","system_model":"Precision 5530","system_type":"x64-based PC","processors":["Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~2592 Mhz"],"bios_version":"Dell Inc. 1.16.2, 4/21/2020","windows_directory":"C:\\WINDOWS","system_directory":"C:\\WINDOWS\\system32","boot_device":"\\Device\\HarddiskVolume2","system_locale":"en-us;English (United States)","input_locale":"en-us;English (United States)","time_zone":"(UTC+00:00) UTC","total_physical_memory_mb":32503,"available_physical_memory_mb":19743,"virtual_memory_max_size_mb":37367,"virtual_memory_available_mb":22266,"virtual_memory_in_use_mb":15101,"page_file_locations":"C:\\pagefile.sys","domain":"test.com","logon_server":"\\\\TESTDC01","hotfixs":["KB2693643","KB4601054","KB4230204","KB4346084","KB4485449","KB4486153","KB4509094","KB4535680","KB4580325","KB4580398","KB4534293"],"network_cards":[{"name":"Intel(R) Wireless-AC 9260 160MHz","connection_name":"Wi-Fi","status":null,"dhcp_enabled":true,"dhcp_server":"192.168.2.1","ip_addresses":["192.168.2.219"]},{"name":"Bluetooth Device (Personal Area Network)","connection_name":"Bluetooth Network Connection","status":"Media disconnected","dhcp_enabled":false,"dhcp_server":null,"ip_addresses":[]},{"name":"Microsoft KM-TEST Loopback Adapter","connection_name":"Npcap Loopback Adapter","status":null,"dhcp_enabled":true,"dhcp_server":"255.255.255.255","ip_addresses":["169.254.161.245"]},{"name":"Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64","connection_name":"Ethernet 5","status":"Hardware not present","dhcp_enabled":false,"dhcp_server":null,"ip_addresses":[]},{"name":"Hyper-V Virtual Ethernet Adapter","connection_name":"vEthernet (InternalVM)","status":null,"dhcp_enabled":false,"dhcp_server":null,"ip_addresses":["172.16.32.1"]},{"name":"Hyper-V Virtual Ethernet Adapter","connection_name":"vEthernet (Default Switch) 2","status":null,"dhcp_enabled":true,"dhcp_server":"255.255.255.255","ip_addresses":["172.26.251.65"]}],"hyperv_requirements":{"vm_monitor_mode_extensions":true,"virtualization_enabled_in_firmware":true,"second_level_address_translation":false,"data_execution_prevention_available":true},"original_install_date_epoch":1553640690,"original_install_date_epoch_utc":1553615490,"system_boot_time_epoch":1617110039,"system_boot_time_epoch_utc":1617084839}
|
79
tests/fixtures/windows/windows-10/systeminfo-hyperv-utc.out
vendored
Normal file
79
tests/fixtures/windows/windows-10/systeminfo-hyperv-utc.out
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
|
||||
Host Name: TESTLAPTOP
|
||||
OS Name: Microsoft Windows 10 Enterprise
|
||||
OS Version: 10.0.17134 N/A Build 17134
|
||||
OS Manufacturer: Microsoft Corporation
|
||||
OS Configuration: Member Workstation
|
||||
OS Build Type: Multiprocessor Free
|
||||
Registered Owner: Test, Inc.
|
||||
Registered Organization: Test, Inc.
|
||||
Product ID: 11111-11111-11111-AA111
|
||||
Original Install Date: 3/26/2019, 3:51:30 PM
|
||||
System Boot Time: 3/30/2021, 6:13:59 AM
|
||||
System Manufacturer: Dell Inc.
|
||||
System Model: Precision 5530
|
||||
System Type: x64-based PC
|
||||
Processor(s): 1 Processor(s) Installed.
|
||||
[01]: Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~2592 Mhz
|
||||
BIOS Version: Dell Inc. 1.16.2, 4/21/2020
|
||||
Windows Directory: C:\WINDOWS
|
||||
System Directory: C:\WINDOWS\system32
|
||||
Boot Device: \Device\HarddiskVolume2
|
||||
System Locale: en-us;English (United States)
|
||||
Input Locale: en-us;English (United States)
|
||||
Time Zone: (UTC+00:00) UTC
|
||||
Total Physical Memory: 32,503 MB
|
||||
Available Physical Memory: 19,743 MB
|
||||
Virtual Memory: Max Size: 37,367 MB
|
||||
Virtual Memory: Available: 22,266 MB
|
||||
Virtual Memory: In Use: 15,101 MB
|
||||
Page File Location(s): C:\pagefile.sys
|
||||
Domain: test.com
|
||||
Logon Server: \\TESTDC01
|
||||
Hotfix(s): 11 Hotfix(s) Installed.
|
||||
[01]: KB2693643
|
||||
[02]: KB4601054
|
||||
[03]: KB4230204
|
||||
[04]: KB4346084
|
||||
[05]: KB4485449
|
||||
[06]: KB4486153
|
||||
[07]: KB4509094
|
||||
[08]: KB4535680
|
||||
[09]: KB4580325
|
||||
[10]: KB4580398
|
||||
[11]: KB4534293
|
||||
Network Card(s): 6 NIC(s) Installed.
|
||||
[01]: Intel(R) Wireless-AC 9260 160MHz
|
||||
Connection Name: Wi-Fi
|
||||
DHCP Enabled: Yes
|
||||
DHCP Server: 192.168.2.1
|
||||
IP address(es)
|
||||
[01]: 192.168.2.219
|
||||
[02]: Bluetooth Device (Personal Area Network)
|
||||
Connection Name: Bluetooth Network Connection
|
||||
Status: Media disconnected
|
||||
[03]: Microsoft KM-TEST Loopback Adapter
|
||||
Connection Name: Npcap Loopback Adapter
|
||||
DHCP Enabled: Yes
|
||||
DHCP Server: 255.255.255.255
|
||||
IP address(es)
|
||||
[01]: 169.254.161.245
|
||||
[04]: Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64
|
||||
Connection Name: Ethernet 5
|
||||
Status: Hardware not present
|
||||
[05]: Hyper-V Virtual Ethernet Adapter
|
||||
Connection Name: vEthernet (InternalVM)
|
||||
DHCP Enabled: No
|
||||
IP address(es)
|
||||
[01]: 172.16.32.1
|
||||
[06]: Hyper-V Virtual Ethernet Adapter
|
||||
Connection Name: vEthernet (Default Switch) 2
|
||||
DHCP Enabled: Yes
|
||||
DHCP Server: 255.255.255.255
|
||||
IP address(es)
|
||||
[01]: 172.26.251.65
|
||||
Hyper-V Requirements: VM Monitor Mode Extensions: Yes
|
||||
Virtualization Enabled In Firmware: Yes
|
||||
Second Level Address Translation: No
|
||||
Data Execution Prevention Available: Yes
|
||||
|
@ -1,111 +1 @@
|
||||
{
|
||||
"host_name": "TESTLAPTOP",
|
||||
"os_name": "Microsoft Windows 10 Enterprise",
|
||||
"os_version": "10.0.17134 N/A Build 17134",
|
||||
"os_manufacturer": "Microsoft Corporation",
|
||||
"os_configuration": "Member Workstation",
|
||||
"os_build_type": "Multiprocessor Free",
|
||||
"registered_owner": "Test, Inc.",
|
||||
"registered_organization": "Test, Inc.",
|
||||
"product_id": "11111-11111-11111-AA111",
|
||||
"original_install_date": 1553640690,
|
||||
"system_boot_time": 1617110039,
|
||||
"system_manufacturer": "Dell Inc.",
|
||||
"system_model": "Precision 5530",
|
||||
"system_type": "x64-based PC",
|
||||
"processors": [
|
||||
"Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~2592 Mhz"
|
||||
],
|
||||
"bios_version": "Dell Inc. 1.16.2, 4/21/2020",
|
||||
"windows_directory": "C:\\WINDOWS",
|
||||
"system_directory": "C:\\WINDOWS\\system32",
|
||||
"boot_device": "\\Device\\HarddiskVolume2",
|
||||
"system_locale": "en-us;English (United States)",
|
||||
"input_locale": "en-us;English (United States)",
|
||||
"time_zone": "(UTC-06:00) Central Time (US & Canada)",
|
||||
"total_physical_memory_mb": 32503,
|
||||
"available_physical_memory_mb": 19743,
|
||||
"virtual_memory_max_size_mb": 37367,
|
||||
"virtual_memory_available_mb": 22266,
|
||||
"virtual_memory_in_use_mb": 15101,
|
||||
"page_file_locations": "C:\\pagefile.sys",
|
||||
"domain": "test.com",
|
||||
"logon_server": "\\\\TESTDC01",
|
||||
"hotfixs": [
|
||||
"KB2693643",
|
||||
"KB4601054",
|
||||
"KB4230204",
|
||||
"KB4346084",
|
||||
"KB4485449",
|
||||
"KB4486153",
|
||||
"KB4509094",
|
||||
"KB4535680",
|
||||
"KB4580325",
|
||||
"KB4580398",
|
||||
"KB4534293"
|
||||
],
|
||||
"network_cards": [
|
||||
{
|
||||
"name": "Intel(R) Wireless-AC 9260 160MHz",
|
||||
"connection_name": "Wi-Fi",
|
||||
"status": "",
|
||||
"dhcp_enabled": true,
|
||||
"dhcp_server": "192.168.2.1",
|
||||
"ip_addresses": [
|
||||
"192.168.2.219"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Bluetooth Device (Personal Area Network)",
|
||||
"connection_name": "Bluetooth Network Connection",
|
||||
"status": "Media disconnected",
|
||||
"dhcp_enabled": false,
|
||||
"dhcp_server": "",
|
||||
"ip_addresses": []
|
||||
},
|
||||
{
|
||||
"name": "Microsoft KM-TEST Loopback Adapter",
|
||||
"connection_name": "Npcap Loopback Adapter",
|
||||
"status": "",
|
||||
"dhcp_enabled": true,
|
||||
"dhcp_server": "255.255.255.255",
|
||||
"ip_addresses": [
|
||||
"169.254.161.245"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64",
|
||||
"connection_name": "Ethernet 5",
|
||||
"status": "Hardware not present",
|
||||
"dhcp_enabled": false,
|
||||
"dhcp_server": "",
|
||||
"ip_addresses": []
|
||||
},
|
||||
{
|
||||
"name": "Hyper-V Virtual Ethernet Adapter",
|
||||
"connection_name": "vEthernet (InternalVM)",
|
||||
"status": "",
|
||||
"dhcp_enabled": false,
|
||||
"dhcp_server": "",
|
||||
"ip_addresses": [
|
||||
"172.16.32.1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Hyper-V Virtual Ethernet Adapter",
|
||||
"connection_name": "vEthernet (Default Switch) 2",
|
||||
"status": "",
|
||||
"dhcp_enabled": true,
|
||||
"dhcp_server": "255.255.255.255",
|
||||
"ip_addresses": [
|
||||
"172.26.251.65"
|
||||
]
|
||||
}
|
||||
],
|
||||
"hyperv_requirements": {
|
||||
"vm_monitor_mode_extensions": true,
|
||||
"virtualization_enabled_in_firmware": true,
|
||||
"second_level_address_translation": false,
|
||||
"data_execution_prevention_available": true
|
||||
}
|
||||
}
|
||||
{"host_name":"TESTLAPTOP","os_name":"Microsoft Windows 10 Enterprise","os_version":"10.0.17134 N/A Build 17134","os_manufacturer":"Microsoft Corporation","os_configuration":"Member Workstation","os_build_type":"Multiprocessor Free","registered_owner":"Test, Inc.","registered_organization":"Test, Inc.","product_id":"11111-11111-11111-AA111","original_install_date":"3/26/2019, 3:51:30 PM","system_boot_time":"3/30/2021, 6:13:59 AM","system_manufacturer":"Dell Inc.","system_model":"Precision 5530","system_type":"x64-based PC","processors":["Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~2592 Mhz"],"bios_version":"Dell Inc. 1.16.2, 4/21/2020","windows_directory":"C:\\WINDOWS","system_directory":"C:\\WINDOWS\\system32","boot_device":"\\Device\\HarddiskVolume2","system_locale":"en-us;English (United States)","input_locale":"en-us;English (United States)","time_zone":"(UTC-06:00) Central Time (US & Canada)","total_physical_memory_mb":32503,"available_physical_memory_mb":19743,"virtual_memory_max_size_mb":37367,"virtual_memory_available_mb":22266,"virtual_memory_in_use_mb":15101,"page_file_locations":"C:\\pagefile.sys","domain":"test.com","logon_server":"\\\\TESTDC01","hotfixs":["KB2693643","KB4601054","KB4230204","KB4346084","KB4485449","KB4486153","KB4509094","KB4535680","KB4580325","KB4580398","KB4534293"],"network_cards":[{"name":"Intel(R) Wireless-AC 9260 160MHz","connection_name":"Wi-Fi","status":null,"dhcp_enabled":true,"dhcp_server":"192.168.2.1","ip_addresses":["192.168.2.219"]},{"name":"Bluetooth Device (Personal Area Network)","connection_name":"Bluetooth Network Connection","status":"Media disconnected","dhcp_enabled":false,"dhcp_server":null,"ip_addresses":[]},{"name":"Microsoft KM-TEST Loopback Adapter","connection_name":"Npcap Loopback Adapter","status":null,"dhcp_enabled":true,"dhcp_server":"255.255.255.255","ip_addresses":["169.254.161.245"]},{"name":"Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64","connection_name":"Ethernet 5","status":"Hardware not present","dhcp_enabled":false,"dhcp_server":null,"ip_addresses":[]},{"name":"Hyper-V Virtual Ethernet Adapter","connection_name":"vEthernet (InternalVM)","status":null,"dhcp_enabled":false,"dhcp_server":null,"ip_addresses":["172.16.32.1"]},{"name":"Hyper-V Virtual Ethernet Adapter","connection_name":"vEthernet (Default Switch) 2","status":null,"dhcp_enabled":true,"dhcp_server":"255.255.255.255","ip_addresses":["172.26.251.65"]}],"hyperv_requirements":{"vm_monitor_mode_extensions":true,"virtualization_enabled_in_firmware":true,"second_level_address_translation":false,"data_execution_prevention_available":true},"original_install_date_epoch":1553640690,"original_install_date_epoch_utc":null,"system_boot_time_epoch":1617110039,"system_boot_time_epoch_utc":null}
|
||||
|
@ -1,56 +1 @@
|
||||
{
|
||||
"host_name": "DESKTOP-WIN01",
|
||||
"os_name": "Microsoft Windows 10 Enterprise",
|
||||
"os_version": "10.0.19042 N/A Build 19042",
|
||||
"os_manufacturer": "Microsoft Corporation",
|
||||
"os_configuration": "Member Workstation",
|
||||
"os_build_type": "Multiprocessor Free",
|
||||
"registered_owner": "User",
|
||||
"registered_organization": "",
|
||||
"product_id": "00111-12345-00001-AA111",
|
||||
"original_install_date": 1613503227,
|
||||
"system_boot_time": 1616171103,
|
||||
"system_manufacturer": "VMware, Inc.",
|
||||
"system_model": "VMware7,1",
|
||||
"system_type": "x64-based PC",
|
||||
"processors": [
|
||||
"Intel64 Family 6 Model 158 Stepping 13 GenuineIntel ~2400 Mhz"
|
||||
],
|
||||
"bios_version": "VMware, Inc. VMW71.00V.11111111.B64.2008100111, 8/10/2020",
|
||||
"windows_directory": "C:\\Windows",
|
||||
"system_directory": "C:\\Windows\\system32",
|
||||
"boot_device": "\\Device\\HarddiskVolume1",
|
||||
"system_locale": "en-us;English (United States)",
|
||||
"input_locale": "en-us;English (United States)",
|
||||
"time_zone": "(UTC-08:00) Pacific Time (US & Canada)",
|
||||
"total_physical_memory_mb": 2047,
|
||||
"available_physical_memory_mb": 1417,
|
||||
"virtual_memory_max_size_mb": 2687,
|
||||
"virtual_memory_available_mb": 1482,
|
||||
"virtual_memory_in_use_mb": 1205,
|
||||
"page_file_locations": "C:\\pagefile.sys",
|
||||
"domain": "TEST.local",
|
||||
"logon_server": "\\\\WIN-AA1A1A11AAA",
|
||||
"hotfixs": [
|
||||
"KB4578968",
|
||||
"KB4562830",
|
||||
"KB4570334",
|
||||
"KB4580325",
|
||||
"KB4586864",
|
||||
"KB4594440"
|
||||
],
|
||||
"network_cards": [
|
||||
{
|
||||
"name": "Intel(R) 82574L Gigabit Network Connection",
|
||||
"connection_name": "Ethernet0",
|
||||
"status": "",
|
||||
"dhcp_enabled": true,
|
||||
"dhcp_server": "192.168.133.250",
|
||||
"ip_addresses": [
|
||||
"192.168.133.3",
|
||||
"fe80::192:eb64:1fcf:86eb"
|
||||
]
|
||||
}
|
||||
],
|
||||
"hyperv_requirements": {}
|
||||
}
|
||||
{"host_name":"DESKTOP-WIN01","os_name":"Microsoft Windows 10 Enterprise","os_version":"10.0.19042 N/A Build 19042","os_manufacturer":"Microsoft Corporation","os_configuration":"Member Workstation","os_build_type":"Multiprocessor Free","registered_owner":"User","registered_organization":null,"product_id":"00111-12345-00001-AA111","original_install_date":"2/16/2021, 11:20:27 AM","system_boot_time":"3/19/2021, 9:25:03 AM","system_manufacturer":"VMware, Inc.","system_model":"VMware7,1","system_type":"x64-based PC","processors":["Intel64 Family 6 Model 158 Stepping 13 GenuineIntel ~2400 Mhz"],"bios_version":"VMware, Inc. VMW71.00V.11111111.B64.2008100111, 8/10/2020","windows_directory":"C:\\Windows","system_directory":"C:\\Windows\\system32","boot_device":"\\Device\\HarddiskVolume1","system_locale":"en-us;English (United States)","input_locale":"en-us;English (United States)","time_zone":"(UTC-08:00) Pacific Time (US & Canada)","total_physical_memory_mb":2047,"available_physical_memory_mb":1417,"virtual_memory_max_size_mb":2687,"virtual_memory_available_mb":1482,"virtual_memory_in_use_mb":1205,"page_file_locations":"C:\\pagefile.sys","domain":"TEST.local","logon_server":"\\\\WIN-AA1A1A11AAA","hotfixs":["KB4578968","KB4562830","KB4570334","KB4580325","KB4586864","KB4594440"],"network_cards":[{"name":"Intel(R) 82574L Gigabit Network Connection","connection_name":"Ethernet0","status":null,"dhcp_enabled":true,"dhcp_server":"192.168.133.250","ip_addresses":["192.168.133.3","fe80::192:eb64:1fcf:86eb"]}],"hyperv_requirements":{},"original_install_date_epoch":1613503227,"original_install_date_epoch_utc":null,"system_boot_time_epoch":1616171103,"system_boot_time_epoch_utc":null}
|
||||
|
@ -45,3 +45,4 @@ Network Card(s): 1 NIC(s) Installed.
|
||||
[01]: 192.168.133.3
|
||||
[02]: fe80::192:eb64:1fcf:86eb
|
||||
Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed.
|
||||
|
||||
|
@ -1,54 +1 @@
|
||||
{
|
||||
"host_name": "WIN-1A1A1AA11AA",
|
||||
"os_name": "Microsoft Windows Server 2012 R2 Standard",
|
||||
"os_version": "6.3.9600 N/A Build 9600",
|
||||
"os_manufacturer": "Microsoft Corporation",
|
||||
"os_configuration": "Standalone Server",
|
||||
"os_build_type": "Multiprocessor Free",
|
||||
"registered_owner": "Windows User",
|
||||
"registered_organization": "",
|
||||
"product_id": "11111-11111-11111-AA111",
|
||||
"original_install_date": 1544692548,
|
||||
"system_boot_time": 1616967284,
|
||||
"system_manufacturer": "Microsoft Corporation",
|
||||
"system_model": "Virtual Machine",
|
||||
"system_type": "x64-based PC",
|
||||
"processors": [
|
||||
"Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~2592 Mhz"
|
||||
],
|
||||
"bios_version": "Microsoft Corporation Hyper-V UEFI Release v3.0, 3/2/2018",
|
||||
"windows_directory": "C:\\Windows",
|
||||
"system_directory": "C:\\Windows\\system32",
|
||||
"boot_device": "\\Device\\HarddiskVolume2",
|
||||
"system_locale": "en-us;English (United States)",
|
||||
"input_locale": "en-us;English (United States)",
|
||||
"time_zone": "(UTC+03:00) Kuwait, Riyadh",
|
||||
"total_physical_memory_mb": 3555,
|
||||
"available_physical_memory_mb": 771,
|
||||
"virtual_memory_max_size_mb": 5731,
|
||||
"virtual_memory_available_mb": 2751,
|
||||
"virtual_memory_in_use_mb": 2980,
|
||||
"page_file_locations": "C:\\pagefile.sys",
|
||||
"domain": "WORKGROUP",
|
||||
"logon_server": "\\\\WIN-1A1A1AA11AA",
|
||||
"hotfixs": [
|
||||
"KB2919355",
|
||||
"KB2975061",
|
||||
"KB2999226",
|
||||
"KB3151864",
|
||||
"KB4054566"
|
||||
],
|
||||
"network_cards": [
|
||||
{
|
||||
"name": "Microsoft Hyper-V Network Adapter",
|
||||
"connection_name": "Ethernet 2",
|
||||
"status": "",
|
||||
"dhcp_enabled": false,
|
||||
"dhcp_server": "",
|
||||
"ip_addresses": [
|
||||
"172.16.32.10"
|
||||
]
|
||||
}
|
||||
],
|
||||
"hyperv_requirements": {}
|
||||
}
|
||||
{"host_name":"WIN-1A1A1AA11AA","os_name":"Microsoft Windows Server 2012 R2 Standard","os_version":"6.3.9600 N/A Build 9600","os_manufacturer":"Microsoft Corporation","os_configuration":"Standalone Server","os_build_type":"Multiprocessor Free","registered_owner":"Windows User","registered_organization":null,"product_id":"11111-11111-11111-AA111","original_install_date":"12/13/2018, 1:15:48 AM","system_boot_time":"3/28/2021, 2:34:44 PM","system_manufacturer":"Microsoft Corporation","system_model":"Virtual Machine","system_type":"x64-based PC","processors":["Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~2592 Mhz"],"bios_version":"Microsoft Corporation Hyper-V UEFI Release v3.0, 3/2/2018","windows_directory":"C:\\Windows","system_directory":"C:\\Windows\\system32","boot_device":"\\Device\\HarddiskVolume2","system_locale":"en-us;English (United States)","input_locale":"en-us;English (United States)","time_zone":"(UTC+03:00) Kuwait, Riyadh","total_physical_memory_mb":3555,"available_physical_memory_mb":771,"virtual_memory_max_size_mb":5731,"virtual_memory_available_mb":2751,"virtual_memory_in_use_mb":2980,"page_file_locations":"C:\\pagefile.sys","domain":"WORKGROUP","logon_server":"\\\\WIN-1A1A1AA11AA","hotfixs":["KB2919355","KB2975061","KB2999226","KB3151864","KB4054566"],"network_cards":[{"name":"Microsoft Hyper-V Network Adapter","connection_name":"Ethernet 2","status":null,"dhcp_enabled":false,"dhcp_server":null,"ip_addresses":["172.16.32.10"]}],"hyperv_requirements":{},"original_install_date_epoch":1544692548,"original_install_date_epoch_utc":null,"system_boot_time_epoch":1616967284,"system_boot_time_epoch_utc":null}
|
||||
|
326
tests/fixtures/windows/windows-7/systeminfo.json
vendored
326
tests/fixtures/windows/windows-7/systeminfo.json
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user