├── README.md ├── SecHex-SerialChecker.sln └── SecHex-SerialChecker ├── SecHex-SerialChecker.vcxproj ├── SecHex-SerialChecker.vcxproj.filters ├── SecHex-SerialChecker.vcxproj.user └── sechex.cpp /README.md: -------------------------------------------------------------------------------- 1 | # SecHex-SerialChecker 2 | 3 | **Advanced** Serial Checker ✅ 4 | 5 | # Functions ⚡ 6 | 7 | + **Display Section** 8 | • displays a section title and checks if the output is empty. Based on the result, it highlights the title in either red or green color to indicate the status of the output 9 | 10 | + **Serial Output** 11 | • **DISK** Serial Numbers 12 | • **BIOS** Serial Number 13 | • **CPU** Serial Number 14 | • **Baseboard** Serial Number 15 | • **Memory Chip** Serial Numbers 16 | • **Desktop Monitor** Information 17 | • **Network Adapter MAC** Addresses 18 | • **Printer** Information 19 | • **Sound Device** Information 20 | • **USB Controller** Information 21 | • **Graphics Card** Description 22 | • **CPU** Name 23 | • **Logical Disk** Serial Numbers 24 | • **Network Adapter** IP Addresses 25 | • **Network Interface Controller (NIC)** Information 26 | • **Printer** Device IDs 27 | • **IDE Controller Device** IDs 28 | • **Physical Media** Serial Numbers 29 | • **Processor** ID 30 | • **Installed Products** 31 | • **Operating System** Serial Number 32 | • **Computer** Name 33 | • **EFI** Number 34 | • **SMBIOS** Number 35 | 36 | ![Screenshot 2023-07-15 154923 (1)](https://github.com/SecHex/SecHex-SerialChecker/assets/96635023/4936561c-9376-4c5a-9c72-e4b7590eca46) 37 | 38 | -------------------------------------------------------------------------------- /SecHex-SerialChecker.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.5.33627.172 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SecHex-SerialChecker", "SecHex-SerialChecker\SecHex-SerialChecker.vcxproj", "{8EE677DA-241E-4E6D-9B82-40057C415570}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {8EE677DA-241E-4E6D-9B82-40057C415570}.Debug|x64.ActiveCfg = Debug|x64 17 | {8EE677DA-241E-4E6D-9B82-40057C415570}.Debug|x64.Build.0 = Debug|x64 18 | {8EE677DA-241E-4E6D-9B82-40057C415570}.Debug|x86.ActiveCfg = Debug|Win32 19 | {8EE677DA-241E-4E6D-9B82-40057C415570}.Debug|x86.Build.0 = Debug|Win32 20 | {8EE677DA-241E-4E6D-9B82-40057C415570}.Release|x64.ActiveCfg = Release|x64 21 | {8EE677DA-241E-4E6D-9B82-40057C415570}.Release|x64.Build.0 = Release|x64 22 | {8EE677DA-241E-4E6D-9B82-40057C415570}.Release|x86.ActiveCfg = Release|Win32 23 | {8EE677DA-241E-4E6D-9B82-40057C415570}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {69483D8E-DCC8-4789-B468-F02BA77259C0} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /SecHex-SerialChecker/SecHex-SerialChecker.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 16.0 23 | Win32Proj 24 | {8ee677da-241e-4e6d-9b82-40057c415570} 25 | SecHexSerialChecker 26 | 10.0 27 | 28 | 29 | 30 | Application 31 | true 32 | v143 33 | Unicode 34 | 35 | 36 | Application 37 | false 38 | v143 39 | true 40 | Unicode 41 | 42 | 43 | Application 44 | true 45 | v143 46 | Unicode 47 | 48 | 49 | Application 50 | false 51 | v143 52 | true 53 | Unicode 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | Level3 76 | true 77 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 78 | true 79 | 80 | 81 | Console 82 | true 83 | 84 | 85 | 86 | 87 | Level3 88 | true 89 | true 90 | true 91 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 92 | true 93 | 94 | 95 | Console 96 | true 97 | true 98 | true 99 | 100 | 101 | 102 | 103 | Level3 104 | true 105 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 106 | true 107 | 108 | 109 | Console 110 | true 111 | 112 | 113 | 114 | 115 | Level3 116 | true 117 | true 118 | true 119 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 120 | true 121 | 122 | 123 | Console 124 | true 125 | true 126 | true 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /SecHex-SerialChecker/SecHex-SerialChecker.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Quelldateien 20 | 21 | 22 | -------------------------------------------------------------------------------- /SecHex-SerialChecker/SecHex-SerialChecker.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /SecHex-SerialChecker/sechex.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | void setConsoleTitle(const std::string& title) 6 | { 7 | SetConsoleTitleA(title.c_str()); 8 | } 9 | 10 | 11 | void executeCommand(const std::string& command, std::stringstream& output) 12 | { 13 | FILE* pipe = _popen(command.c_str(), "r"); 14 | if (pipe) 15 | { 16 | char buffer[128]; 17 | while (fgets(buffer, sizeof(buffer), pipe) != nullptr) 18 | { 19 | output << buffer; 20 | } 21 | _pclose(pipe); 22 | } 23 | } 24 | 25 | void displaySectionTitle(const std::string& title, bool found) 26 | { 27 | const int width = 50; 28 | const char lineChar = '-'; 29 | std::string sectionLine(width, lineChar); 30 | std::string centeredTitle = " " + title + " "; 31 | const int titlePadding = (width - centeredTitle.length()) / 2; 32 | 33 | std::cout << sectionLine << "\n"; 34 | if (found) 35 | std::cout << "| \x1b[32m" << std::string(titlePadding, ' ') << centeredTitle << std::string(titlePadding, ' ') << "\x1b[0m|\n"; 36 | else 37 | std::cout << "| \x1b[31m" << std::string(titlePadding, ' ') << centeredTitle << std::string(titlePadding, ' ') << "\x1b[0m|\n"; 38 | std::cout << sectionLine << "\n"; 39 | } 40 | 41 | void serials() 42 | { 43 | std::stringstream output; 44 | 45 | executeCommand("wmic diskdrive get serialnumber", output); 46 | displaySectionTitle("DISK Serial Numbers", !output.str().empty()); 47 | std::cout << output.str() << "\n"; 48 | 49 | output.str(""); 50 | executeCommand("wmic bios get serialnumber", output); 51 | displaySectionTitle("BIOS Serial Number", !output.str().empty()); 52 | std::cout << output.str() << "\n"; 53 | 54 | output.str(""); 55 | executeCommand("wmic cpu get serialnumber", output); 56 | displaySectionTitle("CPU Serial Number", !output.str().empty()); 57 | std::cout << output.str() << "\n"; 58 | 59 | output.str(""); 60 | executeCommand("wmic baseboard get serialnumber", output); 61 | displaySectionTitle("Baseboard Serial Number", !output.str().empty()); 62 | std::cout << output.str() << "\n"; 63 | 64 | output.str(""); 65 | executeCommand("wmic memorychip get serialnumber", output); 66 | displaySectionTitle("Memory Chip Serial Numbers", !output.str().empty()); 67 | std::cout << output.str() << "\n"; 68 | 69 | output.str(""); 70 | executeCommand("wmic desktopmonitor get Caption, MonitorType, MonitorManufacturer, Name", output); 71 | displaySectionTitle("Desktop Monitor Information", !output.str().empty()); 72 | std::cout << output.str() << "\n"; 73 | 74 | output.str(""); 75 | executeCommand("wmic networkadapter get MACAddress", output); 76 | displaySectionTitle("Network Adapter MAC Addresses", !output.str().empty()); 77 | std::cout << output.str() << "\n"; 78 | 79 | output.str(""); 80 | executeCommand("wmic printers get Name, PortName, DriverName", output); 81 | displaySectionTitle("Printer Information", !output.str().empty()); 82 | std::cout << output.str() << "\n"; 83 | 84 | output.str(""); 85 | executeCommand("wmic sounddev get Name, Manufacturer", output); 86 | displaySectionTitle("Sound Device Information", !output.str().empty()); 87 | std::cout << output.str() << "\n"; 88 | 89 | output.str(""); 90 | executeCommand("wmic usbcontroller get Name, Manufacturer", output); 91 | displaySectionTitle("USB Controller Information", !output.str().empty()); 92 | std::cout << output.str() << "\n"; 93 | 94 | output.str(""); 95 | executeCommand("wmic path win32_videocontroller get Description", output); 96 | displaySectionTitle("Graphics Card Description", !output.str().empty()); 97 | std::cout << output.str() << "\n"; 98 | 99 | output.str(""); 100 | executeCommand("wmic cpu get Name", output); 101 | displaySectionTitle("CPU Name", !output.str().empty()); 102 | std::cout << output.str() << "\n"; 103 | 104 | output.str(""); 105 | executeCommand("wmic logicaldisk get volumename, serialnumber", output); 106 | displaySectionTitle("Logical Disk Serial Numbers", !output.str().empty()); 107 | std::cout << output.str() << "\n"; 108 | 109 | output.str(""); 110 | executeCommand("wmic networkadapterconfiguration get IPAddress, MACAddress", output); 111 | displaySectionTitle("Network Adapter IP Addresses", !output.str().empty()); 112 | std::cout << output.str() << "\n"; 113 | 114 | output.str(""); 115 | executeCommand("wmic nic get Name, DeviceID", output); 116 | displaySectionTitle("Network Interface Controller (NIC) Information", !output.str().empty()); 117 | std::cout << output.str() << "\n"; 118 | 119 | output.str(""); 120 | executeCommand("wmic printer get Name, DeviceID", output); 121 | displaySectionTitle("Printer Device IDs", !output.str().empty()); 122 | std::cout << output.str() << "\n"; 123 | 124 | output.str(""); 125 | executeCommand("wmic idecontroller get Name, DeviceID", output); 126 | displaySectionTitle("IDE Controller Device IDs", !output.str().empty()); 127 | std::cout << output.str() << "\n"; 128 | 129 | output.str(""); 130 | executeCommand("wmic path win32_physicalmedia get SerialNumber", output); 131 | displaySectionTitle("Physical Media Serial Numbers", !output.str().empty()); 132 | std::cout << output.str() << "\n"; 133 | 134 | output.str(""); 135 | executeCommand("wmic path win32_processor get ProcessorId", output); 136 | displaySectionTitle("Processor ID", !output.str().empty()); 137 | std::cout << output.str() << "\n"; 138 | 139 | output.str(""); 140 | executeCommand("wmic product get Name, Version, InstallDate", output); 141 | displaySectionTitle("Installed Products", !output.str().empty()); 142 | std::cout << output.str() << "\n"; 143 | 144 | output.str(""); 145 | executeCommand("wmic path win32_operatingsystem get SerialNumber", output); 146 | displaySectionTitle("Operating System Serial Number", !output.str().empty()); 147 | std::cout << output.str() << "\n"; 148 | 149 | output.str(""); 150 | executeCommand("wmic path win32_computersystem get Name", output); 151 | displaySectionTitle("Computer Name", !output.str().empty()); 152 | std::cout << output.str() << "\n"; 153 | 154 | output.str(""); 155 | executeCommand("wmic path win32_computersystemproduct get IdentifyingNumber", output); 156 | displaySectionTitle("EFI Number", !output.str().empty()); 157 | std::cout << output.str() << "\n"; 158 | 159 | output.str(""); 160 | executeCommand("wmic path win32_bios get SerialNumber", output); 161 | displaySectionTitle("SMBIOS Number", !output.str().empty()); 162 | std::cout << output.str() << "\n"; 163 | 164 | std::cout << "Control Finished.\n"; 165 | std::cin.get(); 166 | } 167 | 168 | int main() 169 | { 170 | setConsoleTitle("SecHex-Serials"); 171 | serials(); 172 | return 0; 173 | } --------------------------------------------------------------------------------