Recent

Author Topic: how get real serialnumber hdd  (Read 9054 times)

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: how get real serialnumber hdd
« Reply #15 on: October 19, 2020, 12:41:38 pm »
The terms also mentioned distribution of the source code is allowed as long as no alternations are made to the contents. I think I am allowed to modify the THDDInfo as necessary to use in my closed-source project as long as I provide the copyright notice and do not distribute the modified version of THDDInfo, am I correct?

I reckon so (IAAL).

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: how get real serialnumber hdd
« Reply #16 on: October 19, 2020, 01:25:24 pm »
hello,
to protect a software with a computer serial number, you also can try to get the BIOS and the Motherboard serial numbers (if availables).
Here is a small project (in attachment) which uses my utility  utilwmi (MIT licence) to get the serial numbers  of the BIOS and motherboard using WMI on windows :
Code: Pascal  [Select][+][-]
  1. program serialInfo;
  2. // J.P october 2020
  3. // free to use
  4. {$MODE OBJFPC}{$H+}
  5. uses
  6.   classes,utilwmi,contnrs;
  7.  
  8. procedure SerialInfos;
  9. var
  10.   WMIResult         : TFPObjectList;
  11.   f,j               : integer;
  12.   retVal            : String;
  13. begin
  14.   WMIResult := GetWMIInfo('Win32_BIOS', ['Manufacturer','SerialNumber']);
  15.   writeln('=========== BIOS infos  ============');
  16.   for f := 0 to Pred(WMIResult.Count) do
  17.   begin
  18.     j := 0;
  19.     retVal := TStringList(WMIResult[f]).ValueFromIndex[j];
  20.     WriteLn('BIOS Manufacturer : ' + retVal);
  21.     j := 1;
  22.     retVal := TStringList(WMIResult[f]).ValueFromIndex[j];
  23.     WriteLn('BIOS Serial Number : ' + retVal);
  24.   end;
  25.   WMIResult := GetWMIInfo('Win32_BaseBoard', ['Product','SerialNumber']);
  26.     writeln('========= MotherBoard infos =========');
  27.   for f := 0 to Pred(WMIResult.Count) do
  28.   begin
  29.     j := 0;
  30.     retVal := TStringList(WMIResult[f]).ValueFromIndex[j];
  31.     WriteLn('MotherBoard Product : ' + retVal);
  32.     j := 1;
  33.     retVal := TStringList(WMIResult[f]).ValueFromIndex[j];
  34.     WriteLn('MotherBoard Serial Number : ' + retVal);
  35.   end;
  36.   WMIResult.Free;
  37.   readln;
  38. end;
  39.  
  40. begin
  41.   SerialInfos;
  42. end.

Result for my computer :
Quote
=========== BIOS infos  ============
BIOS Manufacturer : American Megatrends Inc.
BIOS Serial Number : CZK2460DXR
========= MotherBoard infos =========
MotherBoard Product : Eureka3
MotherBoard Serial Number : 1019494320000783

The serial numbers aren't  my real  serial numbers !    :P

Friendly, J.P

[Edit: removed duped attachment in .7z format]
« Last Edit: October 20, 2020, 01:16:17 am by trev »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

jamie

  • Hero Member
  • *****
  • Posts: 6090
Re: how get real serialnumber hdd
« Reply #17 on: October 19, 2020, 03:16:52 pm »
hello,
to protect a software with a computer serial number, you also can try to get the BIOS and the Motherboard serial numbers (if availables).
Here is a small project (in attachment) which uses my utility  utilwmi (MIT licence) to get the serial numbers  of the BIOS and motherboard using WMI on windows :
Code: Pascal  [Select][+][-]
  1. program serialInfo;
  2. // J.P october 2020
  3. // free to use
  4. {$MODE OBJFPC}{$H+}
  5. uses
  6.   classes,utilwmi,contnrs;
  7.  
  8. procedure SerialInfos;
  9. var
  10.   WMIResult         : TFPObjectList;
  11.   f,j               : integer;
  12.   retVal            : String;
  13. begin
  14.   WMIResult := GetWMIInfo('Win32_BIOS', ['Manufacturer','SerialNumber']);
  15.   writeln('=========== BIOS infos  ============');
  16.   for f := 0 to Pred(WMIResult.Count) do
  17.   begin
  18.     j := 0;
  19.     retVal := TStringList(WMIResult[f]).ValueFromIndex[j];
  20.     WriteLn('BIOS Manufacturer : ' + retVal);
  21.     j := 1;
  22.     retVal := TStringList(WMIResult[f]).ValueFromIndex[j];
  23.     WriteLn('BIOS Serial Number : ' + retVal);
  24.   end;
  25.   WMIResult := GetWMIInfo('Win32_BaseBoard', ['Product','SerialNumber']);
  26.     writeln('========= MotherBoard infos =========');
  27.   for f := 0 to Pred(WMIResult.Count) do
  28.   begin
  29.     j := 0;
  30.     retVal := TStringList(WMIResult[f]).ValueFromIndex[j];
  31.     WriteLn('MotherBoard Product : ' + retVal);
  32.     j := 1;
  33.     retVal := TStringList(WMIResult[f]).ValueFromIndex[j];
  34.     WriteLn('MotherBoard Serial Number : ' + retVal);
  35.   end;
  36.   WMIResult.Free;
  37.   readln;
  38. end;
  39.  
  40. begin
  41.   SerialInfos;
  42. end.

Result for my computer :
Quote
=========== BIOS infos  ============
BIOS Manufacturer : American Megatrends Inc.
BIOS Serial Number : CZK2460DXR
========= MotherBoard infos =========
MotherBoard Product : Eureka3
MotherBoard Serial Number : 1019494320000783

The serial numbers aren't  my real  serial numbers !    :P

Friendly, J.P

thanks and that looks like a nice tool to have on board but, can you please attached it using a standard *.ZIP file, I don't have anything onboard that does  7z formats
The only true wisdom is knowing you know nothing

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: how get real serialnumber hdd
« Reply #18 on: October 19, 2020, 03:19:54 pm »
Thank you Jurassic Pork for the suggestion. I had considered it but I have reason why hard drive serial number is better. I might be wrong but I keep believing it.

I am a computer technician, I fix computers including the computers that use authentic Windows, Office and other software's licenses. One of the most troublesome problem is motherboard failure. Luckily so far what I found is, if I can find a compatible motherboard for the replacement, my clients can use their computer immediately after replacing the motherboard without need to reinstall any software.

But why I think software license should work based on the hard drive serial number? Because changing a hard drive means we need to reinstall all the software, that also means we need follow the software activation procedure or at least contact the software's author. Other possible reason why a hard drive serial number changed (not the same as recorded by the software) is, the hard drive is cloned. Cloning a hard drive should be in the grey area or prohibited because it can be easily abused for making licensed software to work on multiple computers.

I read into utilwmi source code, that's really is a good tool. Thank you Jurrasic Pork and Molly. I remember I read someone said it does not really read the hard drive serial number, it only reads the Windows generated ID for hard drive. Is it true?

I am glad I now have to codes for Windows and Linux, I can continue to write the program. Although I do not use utilwmi but I believe someone will find it useful.

@jamie

You can use this online tool to convert 7z to zip:
https://cloudconvert.com/7z-to-zip
« Last Edit: October 19, 2020, 03:29:25 pm by Handoko »

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 1228
Re: how get real serialnumber hdd
« Reply #19 on: October 19, 2020, 03:24:31 pm »
hello jamie,
thanks and that looks like a nice tool to have on board but, can you please attached it using a standard *.ZIP file, I don't have anything onboard that does  7z formats
the project is now also in zip format in my first message.  ;D
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
Re: how get real serialnumber hdd
« Reply #20 on: March 12, 2021, 02:18:22 am »
Here is a small project (in attachment) which uses my utility  utilwmi (MIT licence) to get the serial numbers  of the BIOS and motherboard using WMI on windows :

This looks awesome. I had not seen this before for whatever reason...
-ASB: https://www.BrainWaveCC.com/

Lazarus v2.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

angelbabie

  • Newbie
  • Posts: 1
Re: how get real serialnumber hdd
« Reply #21 on: March 12, 2021, 05:23:21 am »
i really want to know how to change MAC address, SSD Id. ... can fake ip but couldn't

Tango600

  • New Member
  • *
  • Posts: 12
Re: how get real serialnumber hdd
« Reply #22 on: January 19, 2024, 01:26:49 pm »
I have a program that reads the serial number of the disks but only for Linux.

Bad practice, /dev/disk/ on M.2 device not exists "ata_" prefix.

On my PC:

nvme-eui.0025385591b41ffd
nvme-eui.0025385591b41ffd-part1
nvme-eui.0025385591b41ffd-part2
nvme-Samsung_SSD_970_PRO_512GB_S463NF9M537639V
nvme-Samsung_SSD_970_PRO_512GB_S463NF9M537639V_1
nvme-Samsung_SSD_970_PRO_512GB_S463NF9M537639V_1-part1
nvme-Samsung_SSD_970_PRO_512GB_S463NF9M537639V_1-part2
nvme-Samsung_SSD_970_PRO_512GB_S463NF9M537639V-part1
nvme-Samsung_SSD_970_PRO_512GB_S463NF9M537639V-part2

 

TinyPortal © 2005-2018