Giter VIP home page Giter VIP logo

yuchdev / smbiosutil Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 8.0 107 KB

The application parses SMBIOS firmware table and reports information about your system's hardware according to the SMBIOS/DMI standard. Typically includes information about BIOS, motherboard, CPU, RAM etc. Application written in C++ and portable, should work under Windows/Linux/OS X. Not finished. Pull requests are welcome!

CMake 4.55% C++ 93.40% C 2.05%

smbiosutil's People

Contributors

yuchdev 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

Watchers

 avatar  avatar  avatar

smbiosutil's Issues

not working on my x64 kali system

[24130139.325780] smbios_util: Corrupted page table at address 7fd164bd1000
[24130139.326767] PGD 4232a2067 PUD 4084c7067 PMD 423006067 PTE 80280035a2ee7335
[24130139.327700] Bad pagetable: 000d [#1] SMP
[24130139.328639] Modules linked in: qcaux(E) usbserial(E) cdc_acm(E) uas(E) usb_storage(E) xt_physdev(E) br_netfilter(E) xen_netback(E) xt_CHECKSUM(E) iptable_mangle(E) ipt_MASQUERADE(E) nf_nat_masquerade_ipv4(E) iptable_nat(E) nf_nat_ipv4(E) nf_nat(E) nf_conntrack_ipv4(E) nf_defrag_ipv4(E) xt_conntrack(E) nf_conntrack(E) ipt_REJECT(E) nf_reject_ipv4(E) xt_tcpudp(E) tun(E) bridge(E) stp(E) llc(E) ebtable_filter(E) ebtables(E) ip6table_filter(E) ip6_tables(E) iptable_filter(E) ip_tables(E) x_tables(E) fuse(E) rfcomm(E) bnep(E) nfnetlink_queue(E) nfnetlink_log(E) nfnetlink(E) xen_gntdev(E) xen_evtchn(E) xenfs(E) xen_privcmd(E) nfsd(E) auth_rpcgss(E) nfs_acl(E) nfs(E) lockd(E) grace(E) fscache(E) sunrpc(E) binfmt_misc(E) nls_utf8(E) nls_cp437(E) vfat(E) fat(E) snd_hda_codec_hdmi(E) joydev(E) hid_generic(E)
[24130139.333915] btusb(E) btrtl(E) arc4(E) btbcm(E) btintel(E) bluetooth(E) iTCO_wdt(E) iTCO_vendor_support(E) evdev(E) iwlmvm(E) intel_rapl(E) x86_pkg_temp_thermal(E) mac80211(E) intel_powerclamp(E) psmouse(E) coretemp(E) serio_raw(E) pcspkr(E) sg(E) ir_lirc_codec(E) lirc_dev(E) iwlwifi(E) i915(E) snd_hda_codec_realtek(E) usbhid(E) snd_hda_codec_generic(E) cfg80211(E) i2c_i801(E) rfkill(E) drm_kms_helper(E) snd_soc_ssm4567(E) snd_soc_rt5640(E) lpc_ich(E) snd_soc_rl6231(E) mfd_core(E) mei_me(E) snd_hda_intel(E) rc_rc6_mce(E) snd_hda_codec(E) drm(E) snd_soc_core(E) mei(E) snd_hda_core(E) snd_compress(E) snd_hwdep(E) shpchp(E) nuvoton_cir(E) i2c_algo_bit(E) battery(E) rc_core(E) video(E) snd_pcm(E) elan_i2c(E) snd_timer(E) snd(E) snd_soc_sst_acpi(E) snd_soc_sst_match(E) dw_dmac(E) soundcore(E) dw_dmac_core(E)
[24130139.339808] i2c_designware_platform(E) i2c_designware_core(E) button(E) tpm_tis(E) tpm(E) acpi_als(E) kfifo_buf(E) industrialio(E) processor(E) autofs4(E) ext4(E) ecb(E) crc16(E) jbd2(E) crc32c_generic(E) mbcache(E) sd_mod(E) crct10dif_pclmul(E) crc32_pclmul(E) crc32c_intel(E) ghash_clmulni_intel(E) jitterentropy_rng(E) hmac(E) drbg(E) ansi_cprng(E) aesni_intel(E) aes_x86_64(E) lrw(E) gf128mul(E) glue_helper(E) ablk_helper(E) cryptd(E) ahci(E) libahci(E) libata(E) xhci_pci(E) ehci_pci(E) ehci_hcd(E) xhci_hcd(E) scsi_mod(E) usbcore(E) e1000e(E) usb_common(E) ptp(E) pps_core(E) fan(E) thermal(E) sdhci_acpi(E) sdhci(E) mmc_core(E) fjes(E) i2c_hid(E) hid(E) [last unloaded: chipsec]
[24130139.346248] CPU: 1 PID: 27493 Comm: smbios_util Tainted: G W OE 4.6.0-kali1-amd64 #1 Debian 4.6.2-2kali2
[24130139.347601] Hardware name: /NUC5i5RYB, BIOS RYBDWi35.86A.0350.2015.0812.1722 08/12/2015
[24130139.348942] task: ffff880101a800c0 ti: ffff880101b8c000 task.ti: ffff880101b8c000
[24130139.350290] RIP: e033:[<00007fd163c94436>] [<00007fd163c94436>] 0x7fd163c94436
[24130139.351666] RSP: e02b:00007ffe5a1142b8 EFLAGS: 00010287
[24130139.353022] RAX: 000000000228dcf0 RBX: 00007fd164bd1b6f RCX: 0000000000000b6f
[24130139.354381] RDX: 0000000000000b6f RSI: 00007fd164bd1000 RDI: 000000000228dcf0
[24130139.355758] RBP: 00007ffe5a1142f0 R08: 0000000000000003 R09: 0000000000000b81
[24130139.357111] R10: 0000000000000001 R11: 0000000000000246 R12: 000000000228dcf0
[24130139.358462] R13: 00007ffe5a114a70 R14: 0000000000000000 R15: 0000000000000000
[24130139.359832] FS: 00007fd164bbf740(0000) GS:ffff880441080000(0000) knlGS:0000000000000000
[24130139.361185] CS: e033 DS: 0000 ES: 0000 CR0: 0000000080050033
[24130139.362536] CR2: 00007fd164bd1000 CR3: 000000043668f000 CR4: 0000000000042660

[24130139.365268] RIP [<00007fd163c94436>] 0x7fd163c94436
[24130139.366634] RSP <00007ffe5a1142b8>
[24130139.373117] ---[ end trace cce5372d409fd34e ]---
[24130139.374831] x86/PAT: smbios_util:27493 freeing invalid memtype [mem 0x35a2ee7000-0x35a2ee7fff]
[24130141.108029] smbios_util: Corrupted page table at address 7f8020dc8000
[24130141.109413] PGD a1caf067 PUD 19b7067 PMD a1d1b067 PTE 80280035a2ee7335
[24130141.110830] Bad pagetable: 000d [#2] SMP
[24130141.112208] Modules linked in: qcaux(E) usbserial(E) cdc_acm(E) uas(E) usb_storage(E) xt_physdev(E) br_netfilter(E) xen_netback(E) xt_CHECKSUM(E) iptable_mangle(E) ipt_MASQUERADE(E) nf_nat_masquerade_ipv4(E) iptable_nat(E) nf_nat_ipv4(E) nf_nat(E) nf_conntrack_ipv4(E) nf_defrag_ipv4(E) xt_conntrack(E) nf_conntrack(E) ipt_REJECT(E) nf_reject_ipv4(E) xt_tcpudp(E) tun(E) bridge(E) stp(E) llc(E) ebtable_filter(E) ebtables(E) ip6table_filter(E) ip6_tables(E) iptable_filter(E) ip_tables(E) x_tables(E) fuse(E) rfcomm(E) bnep(E) nfnetlink_queue(E) nfnetlink_log(E) nfnetlink(E) xen_gntdev(E) xen_evtchn(E) xenfs(E) xen_privcmd(E) nfsd(E) auth_rpcgss(E) nfs_acl(E) nfs(E) lockd(E) grace(E) fscache(E) sunrpc(E) binfmt_misc(E) nls_utf8(E) nls_cp437(E) vfat(E) fat(E) snd_hda_codec_hdmi(E) joydev(E) hid_generic(E)
[24130141.119728] btusb(E) btrtl(E) arc4(E) btbcm(E) btintel(E) bluetooth(E) iTCO_wdt(E) iTCO_vendor_support(E) evdev(E) iwlmvm(E) intel_rapl(E) x86_pkg_temp_thermal(E) mac80211(E) intel_powerclamp(E) psmouse(E) coretemp(E) serio_raw(E) pcspkr(E) sg(E) ir_lirc_codec(E) lirc_dev(E) iwlwifi(E) i915(E) snd_hda_codec_realtek(E) usbhid(E) snd_hda_codec_generic(E) cfg80211(E) i2c_i801(E) rfkill(E) drm_kms_helper(E) snd_soc_ssm4567(E) snd_soc_rt5640(E) lpc_ich(E) snd_soc_rl6231(E) mfd_core(E) mei_me(E) snd_hda_intel(E) rc_rc6_mce(E) snd_hda_codec(E) drm(E) snd_soc_core(E) mei(E) snd_hda_core(E) snd_compress(E) snd_hwdep(E) shpchp(E) nuvoton_cir(E) i2c_algo_bit(E) battery(E) rc_core(E) video(E) snd_pcm(E) elan_i2c(E) snd_timer(E) snd(E) snd_soc_sst_acpi(E) snd_soc_sst_match(E) dw_dmac(E) soundcore(E) dw_dmac_core(E)
[24130141.127832] i2c_designware_platform(E) i2c_designware_core(E) button(E) tpm_tis(E) tpm(E) acpi_als(E) kfifo_buf(E) industrialio(E) processor(E) autofs4(E) ext4(E) ecb(E) crc16(E) jbd2(E) crc32c_generic(E) mbcache(E) sd_mod(E) crct10dif_pclmul(E) crc32_pclmul(E) crc32c_intel(E) ghash_clmulni_intel(E) jitterentropy_rng(E) hmac(E) drbg(E) ansi_cprng(E) aesni_intel(E) aes_x86_64(E) lrw(E) gf128mul(E) glue_helper(E) ablk_helper(E) cryptd(E) ahci(E) libahci(E) libata(E) xhci_pci(E) ehci_pci(E) ehci_hcd(E) xhci_hcd(E) scsi_mod(E) usbcore(E) e1000e(E) usb_common(E) ptp(E) pps_core(E) fan(E) thermal(E) sdhci_acpi(E) sdhci(E) mmc_core(E) fjes(E) i2c_hid(E) hid(E) [last unloaded: chipsec]
[24130141.136502] CPU: 1 PID: 27495 Comm: smbios_util Tainted: G D W OE 4.6.0-kali1-amd64 #1 Debian 4.6.2-2kali2
[24130141.138269] Hardware name: /NUC5i5RYB, BIOS RYBDWi35.86A.0350.2015.0812.1722 08/12/2015
[24130141.140076] task: ffff8800a145d140 ti: ffff8800a0e5c000 task.ti: ffff8800a0e5c000
[24130141.141859] RIP: e033:[<00007f801fe8b436>] [<00007f801fe8b436>] 0x7f801fe8b436
[24130141.143674] RSP: e02b:00007ffffbb85d08 EFLAGS: 00010287
[24130141.145461] RAX: 0000000002377cf0 RBX: 00007f8020dc8b6f RCX: 0000000000000b6f
[24130141.147282] RDX: 0000000000000b6f RSI: 00007f8020dc8000 RDI: 0000000002377cf0
[24130141.149073] RBP: 00007ffffbb85d40 R08: 0000000000000003 R09: 0000000000000b81
[24130141.150888] R10: 0000000000000001 R11: 0000000000000246 R12: 0000000002377cf0
[24130141.152676] R13: 00007ffffbb864c0 R14: 0000000000000000 R15: 0000000000000000
[24130141.154458] FS: 00007f8020db6740(0000) GS:ffff880441080000(0000) knlGS:0000000000000000
[24130141.156267] CS: e033 DS: 0000 ES: 0000 CR0: 0000000080050033
[24130141.158044] CR2: 00007f8020dc8000 CR3: 00000000a0d78000 CR4: 0000000000042660

[24130141.161573] RIP [<00007f801fe8b436>] 0x7f801fe8b436
[24130141.163311] RSP <00007ffffbb85d08>
[24130141.164992] ---[ end trace cce5372d409fd34f ]---
[24130141.167047] x86/PAT: smbios_util:27495 freeing invalid memtype [mem 0x35a2ee7000-0x35a2ee7fff]

How to use in Windows?

Code not worked ...

#include <iostream>

#include "smbios/abstract_smbios_entry.h"
#include "smbios/smbios.h"
#include "smbios/smbios_entry_factory.h"

int main()
{
	smbios::SMBios bios;
	smbios::SMBiosVersion ver = bios.get_smbios_version();
	std::cout << "DMI version: " << ver.major_version << '.' << ver.minor_version << '\n';
	std::cout << "Table size: " << bios.get_table_size() << '\n';
	std::cout << bios.render_to_description();


	smbios::SMBiosEntryFactory smbios_factory;
	for (const smbios::DMIHeader& header : bios)
	{
		std::cout << "Header ID = " << header.get_type() << '\n';
		std::unique_ptr<smbios::AbstractSMBiosEntry> entry = smbios_factory.create(header, ver);
		if (entry)
		{
			std::cout << entry->render_to_description() << '\n';
		}
	}
}

Fix compiller issues

gcc version 11.2.0 (Rev2, Built by MSYS2 project)

[1/6] Building CXX object smbios/src/CMakeFiles/smbios.dir/win_system_information.cpp.obj
FAILED: smbios/src/CMakeFiles/smbios.dir/win_system_information.cpp.obj
C:\msys64\mingw64\bin\c++.exe  -ID:/source/repos/SmbiosUtil/smbios/src/../include -std=c++11 -std=gnu++1y -pthread -fPIC -MD -MT smbios/src/CMakeFiles/smbios.dir/win_system_information.cpp.obj -MF smbios\src\CMakeFiles\smbios.dir\win_system_information.cpp.obj.d -o smbios/src/CMakeFiles/smbios.dir/win_system_information.cpp.obj -c D:/source/repos/SmbiosUtil/smbios/src/win_system_information.cpp
In file included from D:/source/repos/SmbiosUtil/smbios/src/win_system_information.cpp:2:
D:/source/repos/SmbiosUtil/smbios/include/smbios/win_system_information.h:108:17: error: field 'cpu_architecture_' has incomplete type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
  108 |     std::string cpu_architecture_;
      |                 ^~~~~~~~~~~~~~~~~
In file included from C:/msys64/mingw64/include/c++/11.2.0/iosfwd:39,
                 from C:/msys64/mingw64/include/c++/11.2.0/bits/shared_ptr.h:52,
                 from C:/msys64/mingw64/include/c++/11.2.0/memory:77,
                 from D:/source/repos/SmbiosUtil/smbios/include/smbios/win_system_information.h:2,
                 from D:/source/repos/SmbiosUtil/smbios/src/win_system_information.cpp:2:
C:/msys64/mingw64/include/c++/11.2.0/bits/stringfwd.h:74:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string<char>'}
   74 |     class basic_string;
      |           ^~~~~~~~~~~~

add #include <string> to


can solve the problem.

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.