针对天网防火墙 2.76 1026版本
程序下载地址:
http://forum.wrsky.com/viewthread.php?tid=2929&fpage=1
源代码:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ShellAPI, Buttons, ComCtrls;
type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Edit1: TEdit;
SpeedButton1: TSpeedButton;
CheckBox1: TCheckBox;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
ProgressBar1: TProgressBar;
Label7: TLabel;
Edit2: TEdit;
SpeedButton2: TSpeedButton;
OpenDialog1: TOpenDialog;
OpenDialog2: TOpenDialog;
LblMsg: TLabel;
procedure Label4Click(Sender: TObject);
procedure Label5Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);
procedure SpeedButton2Click(Sender: TObject);
private
{ Private declarations }
procedure Crack(fname1,fname2:string);
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
function GetFileSize(FName:string):longint;
var
f:file of byte;
size:longint;
begin
assignfile(f,FName);
reset(f);
size:=filesize(f);
closefile(f);
Result :=size;
end;
procedure TForm1.Crack(fname1,fname2:string);
const
MainPFW:array[0..4] of byte=($90,$90,$90,$90,$90);
PFWLiveUpdate:array[0..10] of byte=($E9,$91,$00,$00,$00,$90,$A0,$14,$60,$41,$00);
var
hFile:THandle;
FHandle:integer;
{ a、主程序PFW.exe破解方法:(用UltraEdit-32查找替换的方法也行)
000028BB<-地址
E838430000<-原代码(UltraEdit-32查找的目标代码)
9090909090<-修改成(UltraEdit-32替换的目标代码)
b、升级程序PFWLiveUpdate.exe破解方法:
00005502<-地址
0F8590000000A014604100<-原代码(UltraEdit-32查找的目标代码)
E99100000090A014604100<-修改成(UltraEdit-32替换的目标代码) }
begin
hFile :=CreateFile(PChar(fname1),GENERIC_READ or GENERIC_WRITE,
0,nil,OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
if hFile=INVALID_HANDLE_VALUE then
begin
Messagebox(Handle, '要修补的主程序文件不存在或访问被拒绝!', '错误', MB_OK + MB_ICONSTOP);
CloseHandle(hFile);
exit;
end;
CloseHandle(hFile);
hFile :=CreateFile(PChar(fname2),GENERIC_READ or GENERIC_WRITE,
0,nil,OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);