Page 1 of 1

HWID decoding in C++

Posted: Wed Jul 20, 2016 10:00 am
by seriousblank
Hi,

I'm trying to decode the HWID in C++ but with no luck. Is there an example for that in C++? Should it be decoded as UTF-8 or ISO-8859-1? Are there any modifications after decoding?

I have read all the topics and replies I could find on this forum. I also tried this website https://helloacm.com/decode-hardware-id/


My HWIDs :
aDBUvGX+SZeXe0ZRtjUGQTpD2jk=;
aDBUvGX+SZeXe0ZRkrOD2g==;

Thanks

Re: HWID decoding in C++

Posted: Thu Jul 21, 2016 5:40 am
by Admin

Code: Select all

		std::string hwid_str = "aDBUvGX+SZeXe0ZRtjUGQTpD2jk=";
		size_t len = hwid_str.size();
		uint8_t *hwid = new uint8_t[len];
		Base64Decodehwid_str.c_str(), hwid_str.size(), hwid, len);
		for (size_t i = 0; i < len; i += 4) {
			uint32_t value = *reinterpret_cast<uint32_t *>(&hwid[i]);
			uint32_t id = value & ~3;
			switch (value & 3) {
			case 0:
				printf("CPU: %X\n", id);
				break;
			case 1:
				printf("Host: %X\n", id);
				break;
			case 2:
				printf("Ethernet: %X\n", id);
				break;
			case 3:
				printf("HDD: %X\n", id);
				break;
			}
		}
		delete [] hwid;

Re: HWID decoding in C++

Posted: Sat Aug 06, 2016 4:43 pm
by drlai
Thanks for this.
Website API Fixed.
seriousblank wrote:Hi,

I'm trying to decode the HWID in C++ but with no luck. Is there an example for that in C++? Should it be decoded as UTF-8 or ISO-8859-1? Are there any modifications after decoding?

I have read all the topics and replies I could find on this forum. I also tried this website https://helloacm.com/decode-hardware-id/


My HWIDs :
aDBUvGX+SZeXe0ZRtjUGQTpD2jk=;
aDBUvGX+SZeXe0ZRkrOD2g==;

Thanks

Re: HWID decoding in C++

Posted: Tue Aug 23, 2016 9:25 am
by google000
could you post hwid decoding in Delphi (im using delphi 7) .. thanks..