如何做到共享软件注册码一机一码(500分)先来300(300分)

  • 主题发起人 主题发起人 山泉
  • 开始时间 开始时间
to 大家:
  gz 是what意思?
 
xusong168:你的软件是用光盘发给用户的
如果换了机器你的加密DLL能跟着机器走吗?
 
to zhoufujin:不能
可是能保护共享软件
 
SQL中的TEXT字段可以存很多文本
 
我有Win2000、NT下读取硬盘序列号的DLL,
谁要给我发Email
Zhoufujin@sohu.com
白给不要分,但是要告诉我该DLL好不好用.
 
忘了
这么用:先声明
function HDSerialNumRead(): PChar; stdcall external 'HSNR.dll';
然后
Label1.caption:=HDSerialNumRead();
 
又忘了
这是读取硬盘出厂序列号!!!!!
 
scsi硬盘的序列号是不能读出来的,所以要用CPU+硬盘序列号+加密算法。
 
to chemstar:
gz就是关注的意思;
 
在win2000/xp 下读取硬盘号的很多 我就不多说了可在程序启动时读取系统类型
如是2000/xp用
function GetIdeSerialNumber : pchar;
const IDENTIFY_BUFFER_SIZE = 512;
type
TIDERegs = packed record
bFeaturesReg : BYTE; // Used for specifying SMART "commands".
bSectorCountReg : BYTE; // IDE sector count register
bSectorNumberReg : BYTE; // IDE sector number register
bCylLowReg : BYTE; // IDE low order cylinder value
bCylHighReg : BYTE; // IDE high order cylinder value
bDriveHeadReg : BYTE; // IDE drive/head register
bCommandReg : BYTE; // Actual IDE command.
bReserved : BYTE; // reserved for future use. Must be zero.
end;
TSendCmdInParams = packed record
// Buffer size in bytes
cBufferSize : DWORD;
// Structure with drive register values.
irDriveRegs : TIDERegs;
// Physical drive number to send command to (0,1,2,3).
bDriveNumber : BYTE;
bReserved : Array[0..2] of Byte;
dwReserved : Array[0..3] of DWORD;
bBuffer : Array[0..0] of Byte; // Input buffer.
end;
TIdSector = packed record
wGenConfig : Word;
wNumCyls : Word;
wReserved : Word;
wNumHeads : Word;
wBytesPerTrack : Word;
wBytesPerSector : Word;
wSectorsPerTrack : Word;
wVendorUnique : Array[0..2] of Word;
sSerialNumber : Array[0..19] of CHAR;
wBufferType : Word;
wBufferSize : Word;
wECCSize : Word;
sFirmwareRev : Array[0..7] of Char;
sModelNumber : Array[0..39] of Char;
wMoreVendorUnique : Word;
wDoubleWordIO : Word;
wCapabilities : Word;
wReserved1 : Word;
wPIOTiming : Word;
wDMATiming : Word;
wBS : Word;
wNumCurrentCyls : Word;
wNumCurrentHeads : Word;
wNumCurrentSectorsPerTrack : Word;
ulCurrentSectorCapacity : DWORD;
wMultSectorStuff : Word;
ulTotalAddressableSectors : DWORD;
wSingleWordDMA : Word;
wMultiWordDMA : Word;
bReserved : Array[0..127] of BYTE;
end;
PIdSector = ^TIdSector;
TDriverStatus = packed record
// 驱动器返回的错误代码,无错则返回0
bDriverError : Byte;
// IDE出错寄存器的内容,只有当bDriverError 为 SMART_IDE_ERROR 时有效
bIDEStatus : Byte;
bReserved : Array[0..1] of Byte;
dwReserved : Array[0..1] of DWORD;
end;
TSendCmdOutParams = packed record
// bBuffer的大小
cBufferSize : DWORD;
// 驱动器状态
DriverStatus : TDriverStatus;
// 用于保存从驱动器读出的数据的缓冲区,实际长度由cBufferSize决定
bBuffer : Array[0..0] of BYTE;
end;
var hDevice : THandle;
cbBytesReturned : DWORD;
ptr : PChar;
SCIP : TSendCmdInParams;
aIdOutCmd : Array [0..(SizeOf(TSendCmdOutParams)+IDENTIFY_BUFFER_SIZE-1)-1] of Byte;
IdOutCmd : TSendCmdOutParams absolute aIdOutCmd;
procedure ChangeByteOrder( var Data; Size : Integer );
var ptr : PChar;
i : Integer;
c : Char;
begin
ptr := @Data;
for i := 0 to (Size shr 1)-1 do begin
c := ptr^;
ptr^ := (ptr+1)^;
(ptr+1)^ := c;
Inc(ptr,2);
end;
end;
begin
Result := ''; // 如果出错则返回空串
if SysUtils.Win32Platform=VER_PLATFORM_WIN32_NT then begin// Windows NT, Windows 2000
// 提示! 改变名称可适用于其它驱动器,如第二个驱动器: '//./PhysicalDrive1/'
hDevice := CreateFile( '//./PhysicalDrive0', GENERIC_READ or GENERIC_WRITE,
FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, 0, 0 );
end else // Version Windows 95 OSR2, Windows 98
hDevice := CreateFile( '//./SMARTVSD', 0, 0, nil, CREATE_NEW, 0, 0 );
if hDevice=INVALID_HANDLE_VALUE then Exit;
try
FillChar(SCIP,SizeOf(TSendCmdInParams)-1,#0);
FillChar(aIdOutCmd,SizeOf(aIdOutCmd),#0);
cbBytesReturned := 0;
// Set up data structures for IDENTIFY command.
with SCIP do begin
cBufferSize := IDENTIFY_BUFFER_SIZE;
// bDriveNumber := 0;
with irDriveRegs do begin
bSectorCountReg := 1;
bSectorNumberReg := 1;
// if Win32Platform=VER_PLATFORM_WIN32_NT then bDriveHeadReg := $A0
// else bDriveHeadReg := $A0 or ((bDriveNum and 1) shl 4);
bDriveHeadReg := $B0;
bCommandReg := $EC;
end;
end;
//
if not DeviceIoControl( hDevice, $0007c088, @SCIP, SizeOf(TSendCmdInParams)-1,
@aIdOutCmd, SizeOf(aIdOutCmd), cbBytesReturned, nil )
then
Exit;
finally
CloseHandle(hDevice);
end;
with PIdSector(@IdOutCmd.bBuffer)^ do begin
ChangeByteOrder( sSerialNumber, SizeOf(sSerialNumber) );
(PChar(@sSerialNumber)+SizeOf(sSerialNumber))^ := #0;
Result := PChar(@sSerialNumber);
end;
end;
WIN98下用本办法

 
zcp@chinahw.net 兄弟,发我一份
 
取硬盘序列号,这段程序短些!
function GetHDSerialNumber(Drv : String): String;
var
VolumeSerialNumber : DWORD;
MaximumComponentLength : DWORD;
FileSystemFlags : DWORD;
begin

if Drv[Length(Drv)] =':' then Drv := Drv + '/';

GetVolumeInformation(pChar(Drv),nil,0,@VolumeSerialNumber,MaximumComponentLength,FileSystemFlags,nil,0);

Result := IntToHex(HiWord(VolumeSerialNumber),4) +'-' +
IntToHex(LoWord(VolumeSerialNumber),4);

end;
 
我认为没办法!
所有的硬件——除了网卡——都可能没有所谓的唯一的“序列号”,换句话说两个硬件
的“序列号”可能一样!所以如果想做到“一机一码”只能根据网卡。
但是还用无网卡、多个网、换网卡等问题……。所以想要做到
“一机一码”从理论上来说不可能保证百分百。要不然早就没有盗版用了!(你用的
Windows和Delphi是自己出钱买的吗?)
但是伪“一机一码”是可以做到的。至少有这两个方法:
1、取CPU、硬盘等“序列号”然后很隐蔽地保存起来。
2、在Source里写一个“软件序列号”(唯一性你自己来保证),而其对应的“密码”也
由你自己控制。但是这还是不能保证,用户不把软件装到多台机器上。[:(]

 
谁有在98与2000,nt下都能读硬盘序列号的方法?
 
要做共享软件这是必经的路啊
用SoftSentry加壳确实不错
但用AsPack压缩后的程序再加壳就不行了
这也是我遇到的问题???谁解决了
我现在也是用硬盘序列号的方法
谁能说出这会带来
 
li_cj:
你的程序2000下用不了
 
后退
顶部