Recent

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

Sieben

  • Full Member
  • ***
  • Posts: 142
Re: how get real serialnumber hdd
« Reply #15 on: October 19, 2020, 11:08:34 am »
The copyright and license info of THHDInfo is included with the download, as well as the author's name and an url that doesn't seem to exist anymore, however.
Lazarus 2.0.10, FPC 3.2.0, .deb install on Ubuntu Xenial 32

Handoko

  • Hero Member
  • *****
  • Posts: 3909
  • My goal: build my own game engine using Lazarus
Re: how get real serialnumber hdd
« Reply #16 on: October 19, 2020, 12:33:43 pm »
I found the author and its website. THDDInfo is allowed for commercial usage but requires copyright notice: THDDInfo Delphi component Copyright (c) by Artem Parlyuk and link to author's site and email, but unfortunately the domain has already expired since December 2013.

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?

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1057
  • Former Delphi 1-7, 10.2 User
Re: how get real serialnumber hdd
« Reply #17 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).
o Lazarus v2.1.0 r63871, FPC v3.3.1 r47164, macOS 10.14.6, Xcode 11.3.1
o Lazarus v2.1.0 r64160, FPC v3.3.1 Nov 27 21:16:31, macOS 11.0.1 (aarch64), Xcode 12.2
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware VM)
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 20.04 (PD VM)

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 858
Re: how get real serialnumber hdd
« Reply #18 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: 3791
Re: how get real serialnumber hdd
« Reply #19 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: 3909
  • My goal: build my own game engine using Lazarus
Re: how get real serialnumber hdd
« Reply #20 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: 858
Re: how get real serialnumber hdd
« Reply #21 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

jamie

  • Hero Member
  • *****
  • Posts: 3791
Re: how get real serialnumber hdd
« Reply #22 on: October 19, 2020, 03:37:22 pm »
Thanks to both of you...

 :)
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018