GithubHelp home page GithubHelp logo

a1ive / nwinfo Goto Github PK

View Code? Open in Web Editor NEW
73.0 4.0 13.0 4.66 MB

Hardware information utility for Windows

Home Page: https://a1ive.github.io/nwinfo/

License: The Unlicense

C 95.99% Assembly 0.25% C++ 3.48% HTML 0.09% PowerShell 0.19%
windows acpi cpu hardware pci smbios usb

nwinfo's Introduction


NWinfo


NWinfo is a Win32 program that allows you to obtain system and hardware information.

Features

  • Obtain detailed information about SMBIOS, CPUID, S.M.A.R.T., PCI, EDID, and more.
  • Support exporting in JSON, YAML, and LUA table formats.
  • Compatible with Windows XP.

Note

For Windows 11, the "Memory Integrity" and "Microsoft Vulnerable Driver Blocklist" options should be disabled.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity]
"Enabled"=dword:0000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard]
"EnableVirtualizationBasedSecurity"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\SystemGuard]
"Enabled"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CI\Config]
"VulnerableDriverBlocklistEnable"=dword:00000000

GUI Preview

CLI Usage

.\nwinfo.exe OPTIONS
OPTIONS:
  --format=FORMAT  Specify output format.
                   FORMAT can be 'YAML' (default), 'JSON' and 'LUA'.
  --output=FILE    Write to FILE instead of printing to screen.
  --cp=CODEPAGE    Set the code page of output text.
                   CODEPAGE can be 'ANSI' and 'UTF8'.
  --human          Display numbers in human readable format.
  --debug          Print debug info to stdout.
  --hide-sensitive Hide sensitive data (MAC & S/N).
  --sys            Print system info.
  --cpu            Print CPUID info.
  --net[=FLAG,...] Print network info.
    GUID           Specify the GUID of the network interface,
                   e.g. '{B16B00B5-CAFE-BEEF-DEAD-001453AD0529}'
    FLAGS:
      ACTIVE       Filter out active network interfaces.
      PHYS         Filter out physical network interfaces.
      ETH          Filter out Ethernet network interfaces.
      WLAN         Filter out IEEE 802.11 wireless addresses.
      IPV4         Filter out IPv4 addresses.
      IPV6         Filter out IPv6 addresses.
  --acpi[=SGN]     Print ACPI info.
                   SGN specifies the signature of the ACPI table,
                   e.g. 'FACP' (Fixed ACPI Description Table).
  --smbios[=TYPE]  Print SMBIOS info.
                   TYPE specifies the type of the SMBIOS table,
                   e.g. '2' (Base Board Information).
  --disk[=FLAG,..] Print disk info.
    PATH           Specify the path of the disk,
                   e.g. '\\.\PhysicalDrive0', '\\.\CdRom0'.
    FLAGS:
      NO-SMART     Don't print disk S.M.A.R.T. info.
      PHYS         Exclude virtual drives.
      CD           Filter out CD-ROM devices.
      HD           Filter out hard drives.
      NVME         Filter out NVMe devices.
      SATA         Filter out SATA devices.
      SCSI         Filter out SCSI devices.
      SAS          Filter out SAS devices.
      USB          Filter out USB devices.
  --smart=FLAG,... Specify S.M.A.R.T. features.
                   Features enabled by default: 'WMI', 'ATA',
                   'NVIDIA', 'MARVELL', 'SAT', 'SUNPLUS',
                   'IODATA', 'LOGITEC', 'PROLIFIC', 'USBJMICRON',
                   'CYPRESS', 'MEMORY', 'JMICRON', 'ASMEDIA',
                   'REALTEK', 'MEGARAID', 'VROC' and 'ASM1352R'.
                   Use 'DEFAULT' to specify the above features.
                   Other features are 'ADVANCED', 'HD204UI',
                   'ADATA', 'NOWAKEUP' and 'JMICRON3'.
  --display        Print EDID info.
  --pci[=CLASS]    Print PCI info.
                   CLASS specifies the class code of pci devices,
                   e.g. '0C05' (SMBus).
  --usb            Print USB info.
  --spd            Print SPD info.
  --battery        Print battery info.
  --uefi[=FLAG,..] Print UEFI info.
    FLAGS:\n"
      MENU         Print UEFI boot menus.
      VARS         List all UEFI variables.
  --shares         Print network mapped drives.
  --audio          Print audio devices.
  --public-ip      Print public IP address.
  --product-policy Print ProductPolicy.
  --gpu            Print GPU usage.
  --font           Print installed fonts.

Credits

nwinfo's People

Contributors

a1ive avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nwinfo's Issues

Get / Set monitor's brightness value

Help

I know this is not an appropriate way, but I couldn't find any info to contact you.

I want to compile your Qemuboottester in English version.

Could you help me and show the way to do it please. I'm not sure how can I change the language.

Request to take a disk number as parameter in --disk command in CLI

Hi A1ive...

First thanks for development of nwinfo tool that also works great in winpe environment.

Can you please add an option to take a disk number as a parameter in --disk command ? So we can display output of only desired Disk number if required in CLI usage.

nwinfo_x64.exe --human --disk=1 --no-smart

This command will only display information of Disk 1 as output. So we can get variables as per requirement easily.

Thanks & Regards....

help

I'm so sorry master A1ive; Please I need help at 2 points in the ventoy_browser.c code of ventoyun, can you help me please?

1st one
https://github.com/ventoy/Ventoy/blob/d0e10f8e48d4550cd484a2d114ef97f8a3dacaea/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_browser.c#L203C5-L208C6

I edited this part as follows

{
    browser_ssprintf(mbuf, "menuentry \"%s\" --class=vtoydisk {\n"
        "  set browser_dir=0x%lx \n"
        "  vt_browser_dir %s,%d $browser_dir /\n"
        "}\n",
        title, disk->name, partition->number + 1, (ulong)fs);
}

2nd one
https://github.com/ventoy/Ventoy/blob/d0e10f8e48d4550cd484a2d114ef97f8a3dacaea/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_browser.c#L370C9-L384C10

    {
        grub_snprintf(node->menuentry, sizeof(node->menuentry),
            "menuentry \"%-10s [%s]\" --class=vtoydir {\n"
            "  set browser_dir=0x%lx \n"
            "  vt_browser_dir %s $browser_dir \"%s/%s\"\n"
            "}\n",
            "DIR", filename, g_menu_device, (ulong)g_menu_fs, g_menu_path_buf, filename);
    }
    else
    {
        grub_snprintf(node->menuentry, sizeof(node->menuentry),
            "menuentry \"[%s]\" --class=vtoydir {\n"
            "  set browser_dir=0x%lx \n"
            "  vt_browser_dir %s $browser_dir \"%s/%s\"\n"
            "}\n",
            filename, g_menu_device, (ulong)g_menu_fs, g_menu_path_buf, filename);
    }

Is this change suitable for the code structure? If not, can you write the correct one? Please, I'm sorry I couldn't find any other way to contact you.

IP_ADAPTER_ADDRESSES 在不同版本 Windows 下定义不同

typedef struct _IP_ADAPTER_ADDRESSES_XP {
    union {
        ULONGLONG Alignment;
        struct {
            ULONG Length;
            DWORD IfIndex;
        };
    };
    struct _IP_ADAPTER_ADDRESSES_XP *Next;
    PCHAR AdapterName;
    PIP_ADAPTER_UNICAST_ADDRESS_XP FirstUnicastAddress;
    PIP_ADAPTER_ANYCAST_ADDRESS_XP FirstAnycastAddress;
    PIP_ADAPTER_MULTICAST_ADDRESS_XP FirstMulticastAddress;
    PIP_ADAPTER_DNS_SERVER_ADDRESS_XP FirstDnsServerAddress;
    PWCHAR DnsSuffix;
    PWCHAR Description;
    PWCHAR FriendlyName;
    BYTE PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH];
    DWORD PhysicalAddressLength;
    DWORD Flags;
    DWORD Mtu;
    DWORD IfType;
    IF_OPER_STATUS OperStatus;
    DWORD Ipv6IfIndex;
    DWORD ZoneIndices[16];
    PIP_ADAPTER_PREFIX_XP FirstPrefix;
} IP_ADAPTER_ADDRESSES_XP,
 *PIP_ADAPTER_ADDRESSES_XP;

JSON Output support?

Can standard IO be implemented?
For example, JSON or XML maybe?

Huge thanks for your job

List shared folders

#include <lm.h>

#pragma comment(lib, "netapi32.lib")
#pragma comment(lib, "advapi32.lib")

void
EnumSharedFolders(void)
{
	PSHARE_INFO_502 BufPtr, p;
	NET_API_STATUS res;
	LPTSTR   lpszServer = NULL;
	DWORD er = 0, tr = 0, resume = 0, i;

	//
	// Print a report header.
	//
	printf("Share:              Local Path:                   Uses:   Descriptor:\n");
	printf("---------------------------------------------------------------------\n");
	//
	// Call the NetShareEnum function; specify level 502.
	//
	do // begin do
	{
		res = NetShareEnum(lpszServer, 502, (LPBYTE*)&BufPtr, MAX_PREFERRED_LENGTH, &er, &tr, &resume);
		//
		// If the call succeeds,
		//
		if (res == ERROR_SUCCESS || res == ERROR_MORE_DATA)
		{
			p = BufPtr;
			//
			// Loop through the entries;
			//  print retrieved data.
			//
			for (i = 1; i <= er; i++)
			{
				printf("%-20S%-30S%-8u", p->shi502_netname, p->shi502_path, p->shi502_current_uses);
				//
				// Validate the value of the 
				//  shi502_security_descriptor member.
				//
				if (IsValidSecurityDescriptor(p->shi502_security_descriptor))
					printf("Yes\n");
				else
					printf("No\n");
				p++;
			}
			//
			// Free the allocated buffer.
			//
			NetApiBufferFree(BufPtr);
		}
		else
			printf("Error: %ld\n", res);
	}
	// Continue to call NetShareEnum while 
	//  there are more entries. 
	// 
	while (res == ERROR_MORE_DATA); // end do
	return;
}

显示更多磁盘/分区信息

  • GPT 磁盘 GUID
  • GPT 分区 GUID
  • GPT 分区类型
  • MBR 磁盘签名
  • MBR 分区起始扇区/长度
  • MBR 分区属性 (激活,主分区 | 扩展分区,ID)

检测 Windows 版本

https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions
https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/ns-wdm-_osversioninfoexw
https://www.gaijin.at/en/infos/windows-version-numbers

Windows XP
NT5.1
Windows XP Professional x64 Edition
NT5.2, wProductType == VER_NT_WORKSTATION
Windows Server 2003
NT5.2 wProductType != VER_NT_WORKSTATION
Windows Server 2003 R2
NT5.2 ???

Windows Server, version 1809
NT10.0.17763, End of support: 2020-11-10
Windows Server 2019
NT10.0.17763, End of support: 2029-01-09

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.