📄 login.pas
字号:
{##########################################
旁注入侵专用程序 3.0升级版
-----------------------------------------
模块:程序登陆
作者:2005.3.10日下午 明小子
##########################################}
unit Login;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Wininet,
Dialogs,
ShellApi, GetHtmlCode, StdCtrls, ExtCtrls;
type
TFrmLogin = class(TForm)
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
Label1: TLabel;
EdtUser: TEdit;
Label2: TLabel;
EdtPass: TEdit;
GroupBox1: TGroupBox;
Label3: TLabel;
Label4: TLabel;
Bevel1: TBevel;
Label7: TLabel;
Label8: TLabel;
Label6: TLabel;
Label9: TLabel;
Label5: TLabel;
BtnLogin: TButton;
BtnClose: TButton;
procedure Label7Click(Sender: TObject);
procedure Label8Click(Sender: TObject);
procedure Label9Click(Sender: TObject);
procedure Label7MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure GroupBox1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure RadioButton1Click(Sender: TObject);
procedure RadioButton2Click(Sender: TObject);
procedure EdtPassKeyPress(Sender: TObject; var Key: Char);
procedure FormShow(Sender: TObject);
procedure BtnLoginClick(Sender: TObject);
procedure BtnCloseClick(Sender: TObject);
private
procedure WMNCHitTest(var M: TWMNCHitTest);
message WM_NCHitTest;
public
{ Public declarations }
end;
const
LGUS = '黑客动画吧';
LGPS = 'hack58.com';
var
FrmLogin: TFrmLogin;
implementation
uses MainUnit;
{$R *.dfm}
procedure TFrmLogin.WMNCHitTest(var M: TWMNCHitTest); // 移动窗体
begin
inherited;
if M.Result = htClient then
M.Result := htCaption;
end;
procedure TFrmLogin.Label7Click(Sender: TObject);
begin
ShellExecute(handle, 'open', 'EXPLORER.EXE', PChar('http://www.hack58.com'), nil, SW_SHOW);
end;
procedure TFrmLogin.Label8Click(Sender: TObject);
begin
ShellExecute(handle, 'open', 'EXPLORER.EXE', PChar('http://www.socut.com'), nil, SW_SHOW);
end;
procedure TFrmLogin.Label9Click(Sender: TObject);
begin
ShellExecute(handle, 'open', 'EXPLORER.EXE', PChar('http://www.hackdiy.com'), nil, SW_SHOW);
end;
procedure TFrmLogin.Label7MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
TLabel(sender).Font.Color := clBlue;
end;
procedure TFrmLogin.GroupBox1MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
begin
Label7.Font.Color := clBlack;
Label8.Font.Color := clBlack;
Label9.Font.Color := clBlack;
end;
procedure TFrmLogin.RadioButton1Click(Sender: TObject);
begin
MainForm.SkinData1.Active := True;
end;
procedure TFrmLogin.RadioButton2Click(Sender: TObject);
begin
MainForm.SkinData1.Active := False;
end;
procedure TFrmLogin.EdtPassKeyPress(Sender: TObject; var Key: Char);
begin
if key = #13 then
begin
if (Trim(EdtUser.Text) = LgUs) and (Trim(LowerCase(EdtPass.Text)) = LgPs) then
begin
MainForm.Login_Bool := True;
Close;
end
else
showmessage('帐号或密码错误!');
end;
end;
procedure TFrmLogin.FormShow(Sender: TObject);
begin
try
MainForm.ADOSkin.Close;
MainForm.ADOSkin.SQL.Text := 'select * from Setup';
MainForm.ADOSkin.Open;
MainForm.SkinEdit.Text := MainForm.ADOSkin.FieldByName('SkinPath').AsString;
except
end;
end;
procedure TFrmLogin.BtnLoginClick(Sender: TObject);
var
Str: string;
eStopStr, SayStr: string;
Handle: HWND;
MDI: DWORD;
P: integer;
begin
if (Trim(EdtUser.Text) = LgUs) and (Trim(LowerCase(EdtPass.Text)) = LgPs) then
begin
MainForm.Login_Bool := True;
{ * * * * * * * * 将WSockExpert抓包工具关闭掉 * * * * * * * * }
MDI := 0;
Handle := 0;
repeat
Handle := FindWindow('TSpyMain', nil); { 得到主窗体句柄 }
if Handle <> 0 then
begin
MDI := FindWindowEx(Handle, 0, 'MDIClient', nil); { 搜索子窗口的句柄 }
if MDI > 0 then
SendMessage(Handle, WM_CLOSE, 0, 0); { 关闭掉程序 }
end;
until
Handle = 0; {知道找不到主窗体时退出循环}
if InternetCheckConnection('http://www.baidu.com', 1, 0) then
begin
try
eStopStr := UrlGetStr('http://hackdiy3.go.3322.org');
except
ShowMessage('出错提示!请关闭程序后再重新登陆一次既可!');
Exit;
end;
if Pos('JavaScript', eStopStr) > 1 then
begin
MainForm.TimerLogin.Enabled := True;
close;
Exit;
end;
end
else
begin
application.MessageBox('请检测网络连接是否正常,或重新登陆一次!', '无法连接', 48);
exit;
end;
if RadioButton1.Checked then
MainForm.SkinData1.Active := True
else
MainForm.SkinData1.Active := False;
if Pos('[stop]', eStopStr) > 1 then {禁止掉程序}
begin
showmessage('程序已经被禁止使用了!');
MainForm.BorderStyle := BsNone;
MainForm.Width := 0;
MainForm.Height := 0;
ShellExecute(handle, 'open', 'EXPLORER.EXE', PChar('http://www.hackdiy.com'), nil, SW_SHOW);
application.Terminate;
exit;
end
else
if Pos('[use]', eStopStr) > 1 then {不提示,直接运行使用程序}
begin
if RadioButton1.Checked then
if FileExists(MainForm.SkinEdit.Text) then
MainForm.SkinData1.SkinFile := MainForm.SkinEdit.Text;
Close;
Exit;
end
else
if Pos('[say]', eStopStr) > 1 then {提示信息并关闭程序}
begin
p := pos('[say]', eStopStr) + Length('[say]');
SayStr := copy(eStopStr, P, Length(eStopStr));
p := pos('" NAME=', SayStr);
SayStr := copy(SayStr, 1, P - 1);
showmessage(SayStr);
MainForm.BorderStyle := BsNone;
MainForm.Width := 0;
MainForm.Height := 0;
application.Terminate;
exit;
end
else
if Pos('[msg]', eStopStr) > 1 then {提示信息并继续运行程序}
begin
p := pos('[msg]', eStopStr) + Length('[msg]');
SayStr := copy(eStopStr, P, Length(eStopStr));
p := pos('" NAME=', SayStr);
SayStr := copy(SayStr, 1, P - 1);
showmessage(SayStr);
if RadioButton1.Checked then
if FileExists(MainForm.SkinEdit.Text) then
MainForm.SkinData1.SkinFile := MainForm.SkinEdit.Text;
close;
Exit;
end;
end
else
showmessage('帐号或密码错误!');
end;
procedure TFrmLogin.BtnCloseClick(Sender: TObject);
begin
MainForm.BorderStyle := BsNone;
MainForm.Width := 0;
MainForm.Height := 0;
MainForm.Hide;
application.Terminate;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -