登录社区:用户名: 密码: 忘记密码 网页功能:加入收藏 设为首页 网站搜索  

文档

下载

图书

论坛

安全

源码

硬件

游戏
首页 信息 空间 VB VC Delphi Java Flash 补丁 控件 安全 黑客 电子书 笔记本 手机 MP3 杀毒 QQ群 产品库 分类信息 编程网站
  立华软件园 - 安全技术中心 - 技术文档 - Delphi 技术文章 | 相关下载 | 电子图书 | 攻防录像 | 安全网站 | 在线论坛 | QQ群组 | 搜索   
 安全技术技术文档
  · 安全配制
  · 工具介绍
  · 黑客教学
  · 防火墙
  · 漏洞分析
  · 破解专题
  · 黑客编程
  · 入侵检测
 安全技术工具下载
  · 扫描工具
  · 攻击程序
  · 后门木马
  · 拒绝服务
  · 口令破解
  · 代理程序
  · 防火墙
  · 加密解密
  · 入侵检测
  · 攻防演示
 安全技术论坛
  · 安全配制
  · 工具介绍
  · 防火墙
  · 黑客入侵
  · 漏洞检测
  · 破解方法
 其他安全技术资源
  · 攻防演示动画
  · 电子图书
  · QQ群组讨论区
  · 其他网站资源
最新招聘信息

Windows优化大师注册机源码
发表日期:2003-03-16作者:[] 出处:  

Windows优化大师注册机源码

unit Unit1;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, Registry, StdCtrls, Buttons;

type

TForm1 = class(TForm)

Label1: TLabel;

Label2: TLabel;

Edit1: TEdit;

Edit2: TEdit;

Label3: TLabel;

Edit3: TEdit;

GetKeySpeedButton: TSpeedButton;

CheckBox1: TCheckBox;

Label4: TLabel;

procedure GetKeySpeedButtonClick(Sender: TObject);

procedure CheckBox1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form1: TForm1;

Family, Model, Stepping: Byte;

implementation

{$R *.dfm}

//获得CPU信息的过程,用汇编代码写的

procedure GetCpuID;

asm

PUSH EAX

MOV EAX, 1

DW $A20F //汇编指令CPUID的机器代码

MOV Stepping, AL

AND Stepping, 0FH //取得CPU STEPPING数送入到变量Stepping中

AND AL, 0F0H

SHR AL, 4

MOV Model, AL //取得CPU MODEL数送入到变量Model中

SHR AX, 8

AND AL, 0FH

MOV Family, AL //取得CPU FAMILYG数送入到变量Family中

POP EAX

end;

//RSA的加密和解密函数,等价于(m^e) mod n(即m的e次幂对n求余)

function Encrypt_Decrypt(m: Int64; e: Int64=$2C86F9; n: Int64=$69AAA0E3): Int64;

var

a, b, c: Int64;

begin

a:=m;

b:=e;

c:=1;

while b<>0 do

if (b mod 2)=0

then begin

b:=b div 2;

a:=(a * a) mod n;

end

else begin

b:=b - 1;

c:=(a * c) mod n;

end;

Result:=c;

end;

procedure TForm1.GetKeySpeedButtonClick(Sender: TObject);

var

ID, UserName, CpuVer: String;

s: Array [1..4] of Cardinal;

temp, Num1, Num2: Cardinal;

Code1, Code2: Int64;

i, ascii: Byte;

Reg: TRegistry;

begin

if (Edit1.Text='') and (CheckBox1.Checked=False)

then Application.MessageBox('请输入注册申请码!', '警告', MB_OK);

if (Edit1.Text='') and (CheckBox1.Checked=True)

then Application.MessageBox('请输入注册者姓名!', '警告', MB_OK);

if (CheckBox1.Checked=true) and (Edit1.Text<>'')

then begin

UserName:=Edit1.Text; //从Edit1.Text中取得用户名

GetCpuID; //调用过程GetCpuID

CpuVer:='Level '+IntToStr(Family)+' Rev. '+IntToStr(Model)+'.'+IntToStr(Stepping);

temp:=1;

i:=1;

while UserName[i]<>#0 do begin

ascii:=ord(UserName[i]); //函数ord()的作用为取得字符的ASCII码

temp:=(temp*ascii+$D0878) mod $F4240;

inc(i);

end;

i:=1;

while CpuVer[i]<>#0 do begin

ascii:=ord(CpuVer[i]);

temp:=(temp*ascii+$2597D) mod $F4240;

inc(i);

end;

ID:=IntToStr(temp);

end;

if (CheckBox1.Checked=false) and (Edit1.Text<>'')

then ID:=Edit1.Text;

ID:=ID+'1234567';

SetLength(ID, 8); //把字符串ID长度变为8个,并把后面的字符截掉

//下面四行语句是把字符串'You are big pig.'的内存数据送到变量s中

s[1]:=$20756f59;

s[2]:=$20657261;

s[3]:=$20676962;

s[4]:=$2e676970;

Num1:=0;

for i:=4 downto 2 do

Num1:=(Num1+ord(ID[i])) shl 8;

Num1:=Num1+ord(ID[1]);

Num2:=0;

for i:=8 downto 6 do

Num2:=(Num2+ord(ID[i])) shl 8;

Num2:=Num2+ord(ID[5]);

temp:=0;

for i:=1 to 32 do begin

temp:=temp+$9E3779B9;

Num1:=Num1+(Num2 shl 4)+(s[1] xor Num2)+((Num2 shr 5) xor temp)+s[2];

Num2:=Num2+(Num1 shl 4)+(s[3] xor Num1)+((Num1 shr 5) xor temp)+s[4];

end;

Code1:=(Num1 mod $40000000) + 2;

Code2:=($93E0014 shl 2)+ Num1 div $40000000 + 2;

Code1:=Encrypt_Decrypt(Code1);

code2:=Encrypt_Decrypt(Code2);

if (CheckBox1.Checked=False) and (Edit1.Text<>'')

then begin

Edit2.Text:=IntToHex(Code1, 8);

Edit3.Text:=IntToHex(Code2, 8);

end;

if (CheckBox1.Checked=True) and (Edit1.Text<>'')

then begin

Reg:=TRegistry.Create;

Reg.RootKey:=HKEY_LOCAL_MACHINE;

if Reg.OpenKey('Software\Wom', True)

then begin

Reg.DeleteValue('Masters');

Reg.WriteString('Register', UserName);

Reg.WriteString('Register_1', IntToHex(Code1, 8));

Reg.WriteString('Register_2', IntToHex(Code2, 8));

end;

Reg.Free;

Application.MessageBox('自动注册完成!', '信息', MB_OK);

end;

end;

procedure TForm1.CheckBox1Click(Sender: TObject);

begin

if CheckBox1.Checked=true

then begin

GetKeySpeedButton.Caption:='自动注册';

Label1.Caption:='注册者姓名';

Edit1.MaxLength:=0;

Label2.Visible:=false;

Label3.Visible:=false;

Edit2.Visible:=false;

Edit3.Visible:=false;

end

else begin

GetKeySpeedButton.Caption:='取得注册码';

Label1.Caption:='注册申请码';

Edit1.MaxLength:=8;

Label2.Visible:=true;

Label3.Visible:=true;

Edit2.Visible:=true;

Edit3.Visible:=true;

end;

end;

end.

我来说两句】 【发送给朋友】 【加入收藏】 【返加顶部】 【打印本页】 【关闭窗口
中搜索 Windows优化大师注册机源码

 ■ [欢迎对本文发表评论]
用  户:  匿名发出:
您要为您所发的言论的后果负责,故请各位遵纪守法并注意语言文明。

最新招聘信息

关于我们 / 合作推广 / 给我留言 / 版权举报 / 意见建议 / 广告投放 / 友情链接  
Copyright ©2001-2006 Lihuasoft.net webmaster(at)lihuasoft.net
网站编程QQ群   京ICP备05001064号 页面生成时间:0.00199