☆Obaby's H4cking W0rld☆

Hack-Crack==Backdoors - RATs - Trojans // Binders-Packers - Rootkits

破解-黑客-零日漏洞-灰鸽子/上兴/PCShare-木马免杀-网站入侵-信息安全

2009年3月2日星期一

Lock your software with a Hardware ID

program Project1;


uses
  Windows;

var
  HardID : String = 'Enter Hardware ID here';

function GetHardwareID():string;
var
  hOpen: HKEY;
  sBuff: array[0..256] of char;
  BuffSize: integer;
begin
  if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, PChar('SOFTWARE\Microsoft\Windows NT\CurrentVersion'), 0, KEY_QUERY_VALUE, hOpen)) = ERROR_SUCCESS then
  begin
  BuffSize := SizeOf(sBuff);
  RegQueryValueEx(hOpen, PChar('ProductId'), nil, nil, @sBuff, @BuffSize);
  Result := sBuff;
  RegCloseKey(hOpen);
  end;
end;

begin
if GetHardwareID = HardID then
MessageBox(0,pchar('Valid Hardware ID'),pchar('Yay!'),0)
else
MessageBox(0,pchar('Invalid Valid Hardware ID'),pchar('Fail!'),0)
end.

//Code by WhiteHat

link:http://unkn0wn.ws/board/viewtopic.php?f=83&t=17384

0 评论:

发表评论