Проект "Фатум"



unit nickscan;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, ICQDb, ICQClient, Buttons;

type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Edit1: TEdit;
Edit2: TEdit;
Button3: TButton;
Button4: TButton;
Label1: TLabel;
Label2: TLabel;
Button5: TButton;
Edit3: TEdit;
Timer1: TTimer;
Timer2: TTimer;
ICQClient1: TICQClient;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Edit4: TEdit;
Timer3: TTimer;
Timer4: TTimer;
Label6: TLabel;
Label7: TLabel;
Timer5: TTimer;
Timer6: TTimer;
Label8: TLabel;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
SpeedButton1: TSpeedButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure ICQClient1Login(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Button3Click(Sender: TObject);

procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
procedure Timer3Timer(Sender: TObject);
procedure Timer4Timer(Sender: TObject);
procedure ICQClient1MessageRecv(Sender: TObject; Msg, UIN: String);
procedure ICQClient1UserFound(Sender: TObject; UIN, Nick, FirstName,
LastName, Email: String; Status: Word; Gender, Age: Byte;
SearchComplete, Authorize: Boolean);
procedure Timer5Timer(Sender: TObject);
procedure Timer6Timer(Sender: TObject);
procedure SpeedButton1Click(Sender: TObject);

private

public

end;

var
Form1: TForm1;


implementation

var
rec:boolean;
output, mesres, unansw :textfile;
outnicks, mesres1, unanswered, answered, answered2:string;
outnicks1, olduins:string;
but1count, logtime: integer;
loog:string;
loog3:string;
icq: cardinal;
stop:boolean;
k, k1, k2, k3,ans1, sc:integer;
klmes: string;
ar: array[1..100] of integer;
svl, dvl, snp, dnp, coord1: string;
ser:Boolean;
arfound: array [1..100, 1..4] of string;
aransw: array [1..50, 1..2] of string;
words: array [1..20000] of string; wordcount: integer;
engwords: array [1..20000] of string; engwordcount: integer;
usars: array [1..1000000, 1..3] of string;
usarcount: integer; usarlog: string;
arpos, arpos1, arcon, firstpress, chbl: integer;
searchname: string;
tritown:integer; eng: Boolean;
country, uncord: string;
Moscow, Piter, Saratov, Samara, Stavropol, Archangelsk, Severodvinsk :string;
Kiev, Minsk, spb: string;


{$R *.dfm}

{function worddecode(S: string) : String;
var
let1, resbuf: string;
i: integer;
begin
resbuf:='';
let1:='QWERTYUIOPASDFGHJKL:"ZXCVBNM<>?!@#$%^&*()_+~`1234567890-=qwertyuiop[]asdfghjkl;''zxcvbnm,./\*ЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮЁёйцукенгшщзхъфывапролджэячсмитьбю"№';
for i:=1 to length(S) do begin
if (Pos(S[i], let1)<>0) then resbuf:=resbuf + let1[Pos(S[i], let1)] else
resbuf:= resbuf + S[i];
end;
result:= resbuf;
end;}

function digword(S: string): String;
var
dw: array[0..10,1..2]of string;
i,j:integer;
dwbuf:string;
begin

dw[0,1]:=' ноль ';
dw[1,1]:=' один ';
dw[2,1]:=' два ';
dw[3,1]:=' три ';
dw[4,1]:=' четыре ';
dw[5,1]:=' пять ';
dw[6,1]:=' шесть ';
dw[7,1]:=' семь ';
dw[8,1]:=' восемь ';
dw[9,1]:=' девять ';
dw[10,1]:='*';
dw[0,2]:='0';
dw[1,2]:='1';
dw[2,2]:='2';
dw[3,2]:='3';
dw[4,2]:='4';
dw[5,2]:='5';
dw[6,2]:='6';
dw[7,2]:='7';
dw[8,2]:='8';
dw[9,2]:='9';
dw[10,2]:='*';
dwbuf:='';
dwbuf:=dwbuf + '(';
for i:=1 to length(S) do begin
for j:=0 to 10 do begin
if (S[i]=dw[j,2]) then dwbuf:=dwbuf + dw[j,1];
end;
if ((S[i]='°') or (S[i]='''') or (S[i]='.') or (S[i]='"') or (S[i]='N') or (S[i]='E') or (S[i]='W') or (S[i]=' ')) then
dwbuf:=dwbuf + S[i];
end;
dwbuf:=dwbuf + ')';
result:=dwbuf;
end;

function digworden(S: string): String;
var
dw: array[0..10,1..2]of string;
i,j:integer;
dwbuf:string;
begin

dw[0,1]:=' zero ';
dw[1,1]:=' one ';
dw[2,1]:=' two ';
dw[3,1]:=' three ';
dw[4,1]:=' four ';
dw[5,1]:=' five ';
dw[6,1]:=' six ';
dw[7,1]:=' seven ';
dw[8,1]:=' eight ';
dw[9,1]:=' nine ';
dw[10,1]:='*';
dw[0,2]:='0';
dw[1,2]:='1';
dw[2,2]:='2';
dw[3,2]:='3';
dw[4,2]:='4';
dw[5,2]:='5';
dw[6,2]:='6';
dw[7,2]:='7';
dw[8,2]:='8';
dw[9,2]:='9';
dw[10,2]:='*';
dwbuf:='';
dwbuf:=dwbuf + '(';
for i:=1 to length(S) do begin
for j:=0 to 10 do begin
if (S[i]=dw[j,2]) then dwbuf:=dwbuf + dw[j,1];
end;
if ((S[i]='°') or (S[i]='''') or (S[i]='.') or (S[i]='"') or (S[i]='N') or (S[i]='E') or (S[i]='W') or (S[i]=' ')) then
dwbuf:=dwbuf + S[i];
end;
dwbuf:=dwbuf + ')';
result:=dwbuf;
end;

function GetCoord(S: string): Integer;
var
i : Integer;
begin
i := StrToInt(Copy(s,1,Pos('°',s)-1))*100*3600;
Delete(s,1,Pos('°',s));
i := i + StrToInt(Copy(s,1,Pos('''',s)-1))*100*60;
Delete(s,1,Pos('''',s));
i := i + StrToInt(Copy(s,1,Pos('.',s)-1))*100;
Delete(s,1,Pos('.',s));
i := i + StrToInt(Copy(s,1,Pos('"',s)-1));
Result := i;
end;


function SetCoord(i: Integer): string;
var
s : string;
begin
s := IntToStr(i div (100*3600))+'°';
i := i mod (100*3600);
s := s + IntToStr(i div (100*60)) + '''';
i := i mod (100*60);
s := s + IntToStr(i div (100))+ '.';
i := i mod (100);
if i < 10 then
s := s + '0' + IntToStr(i)+ '"'
else
s := s + IntToStr(i)+ '"';
Result := s;
end;



function GetTextFromFile(AFile: string; var Returnstring: string): Boolean;
var
FileStream: TFileStream;
begin
Result := False;
if not FileExists(AFile) then Exit;
FileStream := TFileStream.Create(AFile, fmOpenRead);
try
if FileStream.Size <> 0 then
begin
SetLength(Returnstring, FileStream.Size);
FileStream.Read(Returnstring[1], FileStream.Size);
Result := True;
end;
finally
FileStream.Free;
end;
end;

procedure townup();
begin
GetTextFromFile('Moscow.txt', Moscow);
GetTextFromFile('Piter.txt', Piter);
GetTextFromFile('Minsk.txt', Minsk);
GetTextFromFile('Kiev.txt', Kiev);
GetTextFromFile('Samara.txt', Samara);
GetTextFromFile('Stavropol.txt', Stavropol);
GetTextFromFile('Archangelsk.txt', Archangelsk);
GetTextFromFile('Severodvinsk.txt', Severodvinsk);
GetTextFromFile('Saratov.txt', Saratov);
GetTextFromFile('spb.txt', Spb);
end;

procedure checkblock();
begin
chbl:=chbl+1;

if chbl=10 then begin
chbl:=0;

Answered:=''; answered2:=''; ans1:=0;
k:=0; stop:=true; sleep(5000);
rec := False;
Form1.Timer1.Enabled := False;
sleep(3000); k1:=k1+1; if k1=38 then k1:=1;
Form1.Edit1.Text:=Inttostr(ar[k1]);
Form1.Edit2.Text:='******';
Form1.Edit4.Text:=Inttostr(k1);
k2:=6;
Application.ProcessMessages;
end;
end;

procedure Saving();
var
nam: string;
begin
nam:=Form1.Edit3.Text;
assignFile(output, nam);
rewrite(output);
write(output, outnicks);
closefile(output);
assignFile(output, 'U'+ nam);
rewrite(output);
write(output, outnicks1);
closefile(output);
assignFile(mesres, 'Mes'+ nam);
rewrite(mesres);
write(mesres, mesres1);
closefile(mesres);
assignFile(unansw, 'unans'+ nam);
rewrite(unansw);
write(unansw, unanswered);
closefile(unansw);
end;


procedure Analysis(UIN, Msg: string);
var
ty:integer;
tybuf, tyy1:string;
begin
tyy1:='0';
tybuf:='';
If Pos('красная планета', Msg) <>0 then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='Марс'; end else
If Pos('спутник земли', Msg) <>0 then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='Луна'; end else
If Pos('Столица России', Msg) <>0 then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='Москва'; end else
If Pos('планет', Msg) <>0 then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='Земля'; end else
If Pos('"nospam" without quotes and spaces and append the least even natural number', Msg) <>0 then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='nospam0'; end else
If Pos('nospam', Msg) <>0 then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='nospam'; end else
If Pos('planet', Msg) <>0 then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='Earth'; end else
If ((Pos('2+2*2', Msg) <>0) or (Pos('2*2+2', Msg) <>0) or (Pos('2x2+2', Msg) <>0) or (Pos('2+2x2', Msg) <>0) or (Pos('2 + 2 * 2', Msg) <>0) or (Pos('2 * 2 + 2', Msg) <>0)) or (Pos('(2*2)+2', Msg) <>0) or (Pos('2+(2*2)', Msg) <>0) then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='6'; end else
If ((Pos('3+3*3', Msg) <>0) or (Pos('3*3+3', Msg) <>0) or (Pos('3x3+3', Msg) <>0) or (Pos('3+3x3', Msg) <>0) or (Pos('3 + 3 * 3', Msg) <>0) or (Pos('3 * 3 + 3', Msg) <>0)) then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='12'; end else
If ((Pos('4+4*4', Msg) <>0) or (Pos('4*4+4', Msg) <>0) or (Pos('4x4+4', Msg) <>0) or (Pos('4+4x4', Msg) <>0) or (Pos('4 + 4 * 4', Msg) <>0) or (Pos('4 * 4 + 4', Msg) <>0)) then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='20'; end else
If ((Pos('5+5*5', Msg) <>0) or (Pos('5*5+5', Msg) <>0) or (Pos('5x5+5', Msg) <>0) or (Pos('5+5x5', Msg) <>0) or (Pos('5 + 5 * 5', Msg) <>0) or (Pos('5 * 5 + 5', Msg) <>0)) then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='30'; end else
If ((Pos('6+6*6', Msg) <>0) or (Pos('6*6+6', Msg) <>0) or (Pos('6x6+6', Msg) <>0) or (Pos('6+6x6', Msg) <>0) or (Pos('6 + 6 * 6', Msg) <>0) or (Pos('6 * 6 + 6', Msg) <>0)) then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='42'; end else
If ((Pos('1+2*3', Msg) <>0) or (Pos('2*3+1', Msg) <>0) or (Pos('2x3+1', Msg) <>0) or (Pos('1+2x3', Msg) <>0) or (Pos('1 + 2 * 3', Msg) <>0) or (Pos('2 * 3 + 1', Msg) <>0)) then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='7'; end else
If ((Pos('1+2*5', Msg) <>0) or (Pos('2*5+1', Msg) <>0) or (Pos('2x5+1', Msg) <>0) or (Pos('1+2x5', Msg) <>0) or (Pos('1 + 2 * 5', Msg) <>0) or (Pos('2 * 5 + 1', Msg) <>0)) then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='11'; end else
If ((Pos('2+2', Msg) <>0) or (Pos('2*2', Msg) <>0) or (Pos('2 + 2', Msg) <>0) or (Pos('2 * 2', Msg) <>0) or (Pos('2x2', Msg) <>0) or (Pos('2 x 2', Msg) <>0)) then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='4'; end else
If ((Pos('2+3', Msg) <>0) or (Pos('2 + 3', Msg) <>0) or (Pos('3 + 2', Msg) <>0)or (Pos('3 + 2', Msg) <>0)) then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='5'; end else
If ((Pos('2*3', Msg) <>0) or (Pos('2 * 3', Msg) <>0) or (Pos('3*2', Msg) <>0) or (Pos('3 * 2', Msg) <>0) or (Pos('2x3', Msg) <>0) or (Pos('2 x 3', Msg) <>0) or (Pos('3x2', Msg) <>0) or (Pos('3 x 2', Msg) <>0)) then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='6'; end else
If ((Pos('1+1', Msg) <>0) or (Pos('1 + 1', Msg) <>0)) then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='2'; end else
If ((Pos('55977+33221', Msg) <>0) or (Pos('55977 + 33221', Msg) <>0) or (Pos('33221+55977', Msg) <>0) or (Pos('33221 + 55977', Msg) <>0)) then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='89198'; end else
If ((Pos('45+54', Msg) <>0) or (Pos('45 + 54', Msg) <>0) or (Pos('54+45', Msg) <>0) or (Pos('54 + 45', Msg) <>0)) then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='99'; end else
If ((Pos('12+17', Msg) <>0) or (Pos('12 + 17', Msg) <>0) or (Pos('17+12', Msg) <>0) or (Pos('17 + 12', Msg) <>0)) then begin ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:='29'; end else
If Pos('кавычек', Msg) <>0 then begin
For ty:=1 to length(Msg) do begin

If (tyy1='1') and(Msg[ty]<>'"') and (Msg[ty]<>'''') then tybuf:=tybuf+Msg[ty];
If (((Msg[ty]='"') or (Msg[ty]='''')) and (tyy1='0')) then begin tyy1:='1'; tybuf:=''; end else
If (((Msg[ty]='"') or (Msg[ty]='''')) and (tyy1='1')) then tyy1:='0';
End;
Ans1:=ans1+1; aransw[ans1,1]:=UIN; aransw[ans1,2]:=tybuf;
end else
begin
unanswered:=unanswered+UIN+'#';
Form1.Label7.Caption:=InttoStr(Strtoint(Form1.Label7.Caption)+1);
Application.ProcessMessages;
end;

end;



procedure Spaming(UIN, Nick, FirstName, LastName : string; Antispam:Boolean);
var
x1,y1,x2,y2,dy,dx,x,y,lll, ranlink, rnlnk, ranusr, i22, ru1: Integer;
filt:string;
begin
filt:='';
Form1.Label2.Caption:=Nick;
Form1.Label3.Caption:=FirstName;
Form1.Label4.Caption:=LastName;
begin // intercity link end
x1 := GetCoord(svl);
y1 := GetCoord(dvl);
x2 := GetCoord(snp);
y2 := GetCoord(dnp); end;
dx := x1 - x2;
dy := y2 - y1;
x := Random(dx);
y := Random(dy);
if uncord='west' then coord1:=SetCoord(x2+x)+'N '+ SetCoord(y1+y) + 'W' else
coord1:=SetCoord(x2+x)+'N '+ SetCoord(y1+y) + 'E';




If pos(UIN, outnicks)=0 then begin
if Pos('#', Nick)<>0 then begin for lll:=1 to length(Nick) do begin if Nick[lll]='#' then filt:=filt+'.' else filt:=filt+Nick[lll]; end; Nick:=filt; filt:=''; end;
if Pos('#', FirstName)<>0 then begin for lll:=1 to length(FirstName) do begin if FirstName[lll]='#' then filt:=filt+'.' else filt:=filt+FirstName[lll]; end; FirstName:=filt; filt:=''; end;
if Pos('&', Nick)<>0 then begin for lll:=1 to length(Nick) do begin if Nick[lll]='&' then filt:=filt+'.' else filt:=filt+Nick[lll]; end; Nick:=filt; filt:=''; end;
if Pos('&', FirstName)<>0 then begin for lll:=1 to length(FirstName) do begin if FirstName[lll]='&' then filt:=filt+'.' else filt:=filt+FirstName[lll]; end; FirstName:=filt; filt:=''; end;
outnicks:=outnicks + Nick + '#' + UIN + '#' + FirstName + '&';
outnicks1:=outnicks1 + Nick + ' ' + UIN + ' ' + FirstName +#13+#10;
usarcount:=usarcount+1; usars[usarcount, 1]:=UIN; usars[usarcount, 2]:=Nick;

if (eng=False) then begin
usarlog:='';
ranusr:= round(random(6)) +1;
for i22:=1 to ranusr do begin
ru1:= round(random(usarcount));
if ru1=0 then ru1:=1;

usarlog:= usarlog + usars[ru1, 1] + ' ICQ#' + usars[ru1, 2] +' '+ digword(usars[ru1, 2]) + #13#10;

end;
klmes:='Обнаружена точка разрыва причинно-следственной ткани.' + #13#10 + 'Чтобы изменить свою судьбу, проследуйте в точку с географическими координатами: ' + coord1 +' '+ digword(coord1) +
#13#10 + #13#10 + 'Дополнительное увеличение дивергенции эффекта бабочки возможно при взаимодействии со следующими пользователями:' + #13#10 + usarlog + #13#10 + 'Ключевое слово: ' + words[round(Random(wordcount))];

end else if (eng=True) then begin
usarlog:='';
ranusr:= round(random(6)) +1;

for i22:=1 to ranusr do begin

ru1:= round(random(usarcount));
if ru1=0 then ru1:=1;

usarlog:= usarlog + usars[ru1, 1] + ' ICQ#' + usars[ru1, 2] +' '+ digworden(usars[ru1, 2]) + #13#10;

end;


klmes:='Time-Space continuum bifurcation point detected! ' + #13#10 + 'To change current line, reach the coordinates: ' + coord1 +' '+ digworden(coord1) +
#13#10 + #13#10 + 'Also, to increase the divergence of butterfly effect, you can cooperate with following users:' + #13#10 + usarlog + #13#10 + 'Keyword: ' + engwords[round(Random(engwordcount))] ;
end;

Form1.ICQClient1.SendMessage(Strtoint(UIN) , klmes);
Form1.Label1.Caption:=InttoStr(Strtoint(Form1.Label1.Caption)+1); //red counter
Application.ProcessMessages;
end;

If Antispam=True then begin
Antispam:=False;
if (eng=False) then begin
usarlog:='';
ranusr:= round(random(6)) +1;
for i22:=1 to ranusr do begin
ru1:= round(random(usarcount));
if ru1=0 then ru1:=1;
usarlog:= usarlog + usars[ru1, 1] + ' ICQ#' + usars[ru1, 2] +' '+ digword(usars[ru1, 2]) + #13#10;
end;

klmes:='Обнаружена точка разрыва причинно-следственной ткани.' + #13#10 + 'Чтобы изменить свою судьбу, проследуйте в точку с географическими координатами: ' + coord1 +' '+ digword(coord1) +
#13#10 + #13#10 + 'Дополнительное увеличение дивергенции эффекта бабочки возможно при взаимодействии со следующими пользователями:' + #13#10 + usarlog + #13#10 + 'Ключевое слово: ' + words[round(Random(wordcount))];


end else if (eng=True) then begin
usarlog:='';
ranusr:= round(random(6)) +1;
for i22:=1 to ranusr do begin
ru1:= round(random(usarcount));
if ru1=0 then ru1:=1;
usarlog:= usarlog + usars[ru1, 1] + ' ICQ#' + usars[ru1, 2] +' '+ digworden(usars[ru1, 2]) + #13#10;
end;
klmes:='Time-Space continuum bifurcation point detected! ' + #13#10 + 'To change current line, reach the coordinates: ' + coord1 +' '+ digworden(coord1) +
#13#10 + #13#10 + 'Also, to increase the divergence of butterfly effect, you can cooperate with following users:' + #13#10 + usarlog + #13#10 + 'Keyword: ' + engwords[round(Random(engwordcount))];
end;

Form1.ICQClient1.SendMessage(Strtoint(UIN) , klmes);
Answered2:=answered2+ UIN + '#';
end;
end;


procedure but1(); //connect
begin
//Проверка на заполненность полей с ICQ аккаунтом
if (Form1.Edit1.Text = '') or (Form1.Edit2.Text = '') or //пустые поля
(Length(Form1.Edit1.Text) < 5) or (Length(Form1.Edit2.Text) < 3) //Если UIN меньше 5 символов и пароль меньше 3
then
begin
MessageDlg('Не правельно заполнены поля!',mtInformation,[mbOk],0); //Выводим сообщение об ошибке
Exit;
end;
rec := True; //Удачное соединение
Form1.ICQClient1.UIN := StrToInt(Form1.Edit1.Text); //забираем UIN
Form1.ICQClient1.Password := Form1.Edit2.Text; //забираем пароль
Form1.ICQClient1.Login(); //Соединяемся с сервером
form1.Timer3.Enabled:=true; but1count:=but1count+1;
end;

procedure TForm1.Button1Click(Sender: TObject); //connect
begin
but1;
end;

procedure but3(); //start
var
anss:Boolean;
rann,rancity, ag:integer;
rcity: array[0..20] of string;

begin
anss:=false;
stop:=false; Form1.Timer2.Enabled:=false;
k1:=strtoint(form1.Edit4.Text);
begin
if not Form1.ICQClient1.LoggedIn then begin if k3=0 then begin Form1.Timer2.Enabled:=False; k2:=6; checkblock; but1; end;
end;
if Form1.ICQClient1.LoggedIn then begin
Form1.Timer2.Enabled:=False;
If ans1>0 then begin
Form1.ICQClient1.SendMessage(Strtoint(aransw[ans1, 1]) , aransw[ans1,2]);
answered:=answered+ aransw[ans1,1] + '#';
aransw[ans1, 1]:=''; aransw[ans1,2]:='';
ans1:=ans1-1;
if ans1=0 then anss:=True;
end else



if ser=false then begin

tritown:=round(random(29));

if (tritown=0) or (tritown=3) or (tritown=8) then begin
rcity[0]:= Minsk;
rcity[1]:='Минск';
rcity[2]:='Мінск';
rcity[3]:= Minsk;
rcity[4]:='Minsk';
rcity[5]:='Minsk';
rcity[6]:= Minsk;

svl:='53°58''13.11"С';
dvl:='27°25''39.11"В';
snp:='53°49''31.11"С';
dnp:='27°41''56.11"В';

country:='';
eng:=False;
uncord:='';
end;

if (tritown=2) or (tritown=5) or (tritown=7) then begin

rcity[0]:='Ленинград';
rcity[1]:='St. Petersburg';
rcity[2]:= spb;
rcity[3]:='St.Petersburg';
rcity[4]:='Питер';
rcity[5]:='Санкт-Петербург';
rcity[7]:= Piter;
rcity[8]:='Piter';
rcity[9]:= spb;
rcity[10]:= Piter;
rcity[11]:= Piter;

svl:='60°6''6.55"С';
dvl:='30°12''21.55"В';
snp:='59°48''39.55"С';
dnp:='30°31''20.55"В';

country:='Russia';
eng:=False;
uncord:='';
end;

if (tritown=1) or (tritown=4) or (tritown=6) then begin

rcity[0]:='Moscow';
rcity[1]:= Moscow;
rcity[2]:='Moscow';
rcity[3]:='Москва';
rcity[4]:= Moscow;
rcity[5]:= Moscow;

svl:='55°53''58.55"С';
dvl:='37°23''53.71"В';
snp:='55°34''36.63"С';
dnp:='37°50''8.38"В';

country:='Russia';
eng:=False;
uncord:='';
end;

if (tritown=9) or (tritown=11) or (tritown=13) then begin

rcity[0]:='Kyyv';
rcity[1]:='Kiev';
rcity[2]:='Киев';
rcity[3]:='Київ';
rcity[4]:= Kiev;
rcity[5]:='Kiev';
rcity[6]:= Kiev;
rcity[7]:= Kiev;

svl:='50°30''22.55"С';
dvl:='30°19''10.71"В';
snp:='50°19''39.63"С';
dnp:='30°42''45.38"В';

country:='';
eng:=False;
uncord:='';
end;

if (tritown=10) or (tritown=12) or (tritown=14) then begin

rcity[0]:='Самара';
rcity[1]:='Samara';
rcity[2]:='Samara';
rcity[3]:= Samara;
rcity[4]:= Samara;
rcity[5]:= Samara;
rcity[6]:='Самара';

svl:='53°19''53.55"С';
dvl:='50°5''5.71"В';
snp:='53°5''26.63"С';
dnp:='50°18''55.38"В';

country:='Russia';
eng:=False;
uncord:='';
end;

if (tritown=15) or (tritown=17) or (tritown=19) then begin

rcity[0]:='Саратов';
rcity[1]:='Saratov';
rcity[2]:= Saratov;
rcity[3]:= Saratov;
rcity[4]:= Saratov;
rcity[5]:='Saratov';
rcity[6]:='Саратов';

svl:='51°37''35.55"С';
dvl:='45°54''3.71"В';
snp:='51°24''36.63"С';
dnp:='46°9''42.38"В';

country:='Russia';
eng:=False;
uncord:='';
end;

if (tritown=16) or (tritown=18) or (tritown=20) then begin

rcity[0]:='Архангельск';
rcity[1]:= Severodvinsk;
rcity[2]:='Archangelsk';
rcity[3]:= Archangelsk;
rcity[4]:='Arhangelsk';
rcity[5]:='Северодвинск';
rcity[6]:='Severodvinsk';
rcity[9]:= Archangelsk;
rcity[8]:='Archangelsk';
rcity[9]:= Archangelsk;
rcity[10]:='Архангельск';

svl:='64°41''43.55"С';
dvl:='40°27''23.71"В';
snp:='64°26''42.63"С';
dnp:='40°44''30.38"В';

country:='Russia';
eng:=False;
uncord:='';
end;

if (tritown=21) or (tritown=23) or (tritown=25) then begin

rcity[0]:='Ставрополь';
rcity[1]:='Stavropol';
rcity[2]:= Stavropol;
rcity[3]:= Stavropol;
rcity[4]:='Stavropol';
rcity[5]:='Ставрополь';

svl:='45°6''28.55"С';
dvl:='41°52''50.71"В';
snp:='44°57''14.63"С';
dnp:='42°4''11.38"В';

country:='Russia';
eng:=False;
uncord:='';
end;

if (tritown=22) or (tritown=24) or (tritown=26) then begin

rcity[0]:='London';
rcity[1]:='London';
rcity[2]:='Londinium';
rcity[3]:='London';



svl:='51°39''36.55"С';
dvl:='0°5''26.38"В';
snp:='51°22''29.63"С';
dnp:='0°23''56.71"В';

country:='';
eng:=True; if Round(Random(3))=2 then
uncord:='west' else uncord:='';
end;

if (tritown=27) or (tritown=28) or (tritown=29) then begin

rcity[0]:='Stockton';
rcity[1]:='New York';
rcity[2]:='NY';
rcity[3]:='Seattle';
rcity[4]:='Stockton';
rcity[5]:='San Francisco';
rcity[6]:='Texas';
rcity[7]:='Los Angeles';
rcity[8]:='Washington';
rcity[9]:='Springfield';
rcity[10]:='Denver';
rcity[11]:='Stockton';

svl:='48°44''22.55"С';
dvl:='81°39''37.38"В';
snp:='30°19''30.63"С';
dnp:='122°33''48.71"В';

country:='';
eng:=True;
uncord:='west';
end;

rann:=round(random(5));
if (tritown=2) or (tritown=5) or (tritown=7) then
rancity:=round(random(11));
if (tritown=1) or (tritown=4) or (tritown=6) then
rancity:=round(random(5));
if (tritown=0) or (tritown=3) or (tritown=8) then
rancity:=round(random(6));
if (tritown=9) or (tritown=11) or (tritown=13) then
rancity:=round(random(7));
if (tritown=10) or (tritown=12) or (tritown=14) then
rancity:=round(random(6));
if (tritown=15) or (tritown=17) or (tritown=19) then
rancity:=round(random(6));
if (tritown=16) or (tritown=18) or (tritown=20) then
rancity:=round(random(10));
if (tritown=21) or (tritown=23) or (tritown=25) then
rancity:=round(random(5));
if (tritown=22) or (tritown=24) or (tritown=26) then
rancity:=round(random(3));
if (tritown=27) or (tritown=28) or (tritown=29) then
rancity:=round(random(11));
ag:= Round(Random(30))+10;
sc:=sc+1;
Form1.Label11.Caption:=rcity[rancity];
Form1.Label12.Caption:=searchname;
if rann=0 then
Form1.ICQClient1.SearchWhitePages(searchname,'','','',ag,ag+2,0,'',rcity[rancity], country,'','','','','','','','','',false) //false
else if rann=1 then
Form1.ICQClient1.SearchWhitePages(searchname,'','','',ag,ag+2,1,'',rcity[rancity], country,'','','','','','','','','',false) //false
else if rann=2 then
Form1.ICQClient1.SearchWhitePages('','','','',ag,ag+2,0,'',rcity[rancity], country,'','','','','','','','','',true)
else if rann=3 then
Form1.ICQClient1.SearchWhitePages('','','','',ag,ag+2,1,'',rcity[rancity], country,'','','','','','','','','',true)
else if rann=4 then
Form1.ICQClient1.SearchWhitePages(searchname,'','','',0,999,0,'',rcity[rancity], country,'','','','','','','','','',true)
else if rann=5 then
Form1.ICQClient1.SearchWhitePages(searchname,'','','',0,999,1,'',rcity[rancity], country,'','','','','','','','','',true);

end else
if ser=true then begin
if arcon<(arpos-1) then arcon:=arpos-1;
if arpos1=arcon then begin arcon:=0; arpos:=1; Spaming(arfound[arpos1,1], arfound[arpos1,2], arfound[arpos1,3], arfound[arpos1,4], False);
arpos1:=1; ser:=false; end else
begin Spaming(arfound[arpos1,1], arfound[arpos1,2], arfound[arpos1,3], arfound[arpos1,4], False); arpos1:=arpos1+1; end;

end;
Form1.Label5.Caption:=InttoStr(Strtoint(Form1.Label5.Caption)+1); //requests counter
If ((ans1=0) and (anss=false)) then k:=k+1 else if ((ans1=0) and (anss=true)) then anss:=false;
If (k=10) or (sc=10) then begin //one uin cycle
Answered:=''; answered2:=''; ans1:=0;
Saving; chbl:=0;
k:=0; sc:=0; stop:=true; sleep(5000);
rec := False;
Form1.ICQCLient1.Disconnect;
Form1.Timer1.Enabled := False;
sleep(3000); k1:=k1+1; if k1=38 then k1:=1; //total uins cycle
Form1.Edit1.Text:=Inttostr(ar[k1]);
Form1.Edit2.Text:='******';
Form1.Edit4.Text:=Inttostr(k1);
k2:=6; //cycled connection flag
if k3=0 then
but1;

end;
Application.ProcessMessages;
Form1.Timer2.Enabled:=True;
end; end; end;

procedure TForm1.ICQClient1Login(Sender: TObject);
begin
if ICQClient1.LoggedIn then //если соединение установлено
begin
if not (k2=6) then Label2.Caption:='Соединено!';
Timer1.Enabled := True; //Включаю таймер
if k2=6 then begin k2:=0; sleep(3000); but3; end;
end;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
ICQClient1.SendKeepAlive;
end;

procedure TForm1.FormCreate(Sender: TObject);
var
i,j:integer;
begin

townup;
svl:='60°6''6.55"С';
dvl:='30°12''21.55"В';
snp:='59°48''39.55"С';
dnp:='30°31''20.55"В';
uncord:='';
firstpress:=1;
arpos:=1;
arpos1:=1;
arcon:=0;
ser:=false;
ans1:=0;
answered:='';
answered2:='';
outnicks:='';
mesres1:='';
answered:='';
chbl:=0;
sc:=0;
eng:=False;
wordcount:=0;
engwordcount:=0;
usarcount:=1;
but1count:=0; logtime:=0;
Timer1.Enabled:=False;
Timer1.Interval:=110000;
ICQClient1.ConvertToPlaintext:=True;
Edit1.Text:='#########';
Edit2.Text:='******';
k:=0; k1:=0; k2:=0; k3:=0;
ar[1]:=#########;

ar[2]:=#########;
ar[3]:=#########;
ar[4]:=#########;
ar[5]:=#########;
ar[6]:=#########;
ar[7]:=#########;
ar[8]:=#########;
ar[9]:=#########;
ar[10]:=#########;
ar[11]:=#########;
ar[12]:=#########;
ar[13]:=#########;
ar[14]:=#########;
ar[15]:=#########;
ar[16]:=#########;
ar[17]:=#########;
ar[18]:=#########;
ar[19]:=#########;
ar[20]:=#########;
ar[21]:=#########;
ar[22]:=#########;
ar[23]:=#########;
ar[24]:=#########;
ar[25]:=#########;
ar[26]:=#########;
ar[27]:=#########;
ar[28]:=#########;
ar[29]:=#########;
ar[30]:=#########;
ar[31]:=#########;
ar[32]:=#########;
ar[33]:=#########;
ar[34]:=#########;
ar[35]:=#########;
ar[36]:=#########;
ar[37]:=#########;




end;


procedure TForm1.Button2Click(Sender: TObject); //disconnect
begin
if not ICQCLient1.LoggedIn then
MessageDlg('Соединение с сервером не установлено!',mtInformation,[mbOk],0)
else
begin
rec := False;
ICQCLient1.Disconnect;

Application.MessageBox('разорвано!', 'sss', 0);
Timer1.Enabled := False;
Timer3.Enabled := False;
end;
end;





procedure TForm1.Button3Click(Sender: TObject); //start
var
x1,y1,x2,y2,dy,dx,x,y,ru1,ranusr,i22,m,n : Integer;
wordinput, engwordinput, usarinput, wrd, let: string;
nam: string;
begin
if firstpress=1 then begin
firstpress:=0;
nam:=Edit3.Text;
If Fileexists(nam) then begin
GetTextFromFile(nam, outnicks);
GetTextFromFile('fatumold.txt', olduins);
GetTextFromFile('U'+ nam, outnicks1);
GetTextFromFile('unans'+ nam, unanswered);
GetTextFromFile('Mes'+ nam, mesres1);
GetTextFromFile('words.txt', wordinput);
GetTextFromFile('engwords.txt', engwordinput);
GetTextFromFile('fatum1.txt', usarinput); //files input
end; end;

// обработка файлов

wordcount:=1;
let:='АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя';
For i22:=1 to length(wordinput) do begin
If wordinput[i22]='#' then begin
wordcount:=wordcount+1 end else
if Pos(wordinput[i22], let)<>0 then
//words[wordcount]:= words[wordcount]+ let[Pos(wordinput[i22], let)];
words[wordcount]:= words[wordcount]+ wordinput[i22];
end;
let:='ABCDEFGHIJKLOMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
engwordcount:=1;
For i22:=1 to length(engwordinput) do begin
If engwordinput[i22]='#' then begin
engwordcount:=engwordcount+1 end else
if Pos(engwordinput[i22], let)<>0 then

engwords[engwordcount]:= engwords[engwordcount]+engwordinput[i22];
end;
// распихивание юзеров по массиву
m:=1; n:=1; wrd:='';
for i22:=1 to length(usarinput) do begin
if usarinput[i22]='#' then begin usars[n, m]:=wrd; m:=m+1; if m>3 then m:=1; wrd:=''; end else
if usarinput[i22]='&' then begin usars[n, m]:=wrd; n:=n+1; m:=1; wrd:=''; usarcount:=usarcount+1; end else
wrd:=wrd + usarinput[i22];
end;
Form1.Label8.Caption:=Inttostr(wordcount);
Form1.Label9.Caption:=Inttostr(engwordcount);
Form1.Label10.Caption:=Inttostr(usarcount);
Application.ProcessMessages;

Randomize;
x1 := GetCoord(svl);
y1 := GetCoord(dvl);
x2 := GetCoord(snp);
y2 := GetCoord(dnp);
dx := x1 - x2;
dy := y2 - y1;
x := Random(dx);
y := Random(dy);
if uncord='west' then coord1:=SetCoord(x2+x)+'N '+ SetCoord(y1+y) + 'W' else
coord1:=SetCoord(x2+x)+'N '+ SetCoord(y1+y) + 'E';
begin
usarlog:='';
ranusr:= round(random(6)) +1;
for i22:=1 to ranusr do begin
ru1:= round(random(usarcount));
if ru1=0 then ru1:=1;
usarlog:= usarlog + usars[ru1, 1] + ' ICQ#' + usars[ru1, 2] +' '+ digword(usars[ru1, 2]) + #13#10;
end;

klmes:='Обнаружена точка разрыва причинно-следственной ткани.' + #13#10 + 'Чтобы изменить свою судьбу, проследуйте в точку с географическими координатами: ' + coord1 +' '+ digword(coord1) +
#13#10 + #13#10 + 'Дополнительное увеличение дивергенции эффекта бабочки возможно при взаимодействии со следующими пользователями:' + #13#10 + usarlog + #13#10 + 'Ключевое слово: ' + words[round(Random(wordcount))] ;
end;

Form1.ICQClient1.SendMessage(######### , klmes);
but3;
end;


procedure TForm1.Button4Click(Sender: TObject); //stop
begin
stop:=true;
end;

procedure TForm1.Button5Click(Sender: TObject); //save
var
nam:string;
begin
nam:=Edit3.Text;
assignFile(output, nam);
rewrite(output);
write(output, outnicks);
closefile(output);
assignFile(output, 'U'+ nam);
rewrite(output);
write(output, outnicks1);
closefile(output);
assignFile(mesres, 'Mes'+ nam);
rewrite(mesres);
write(mesres, mesres1);
closefile(mesres);
assignFile(unansw, 'unans'+ nam);
rewrite(unansw);
write(unansw, unanswered);
closefile(unansw);


end;

procedure TForm1.Timer2Timer(Sender: TObject);
begin
if stop=false then but3;
end;

procedure TForm1.Timer3Timer(Sender: TObject); //1 hour pause
begin
stop:=true; k2:=6; k3:=7;
rec := False;
Form1.ICQCLient1.Disconnect;
Form1.Timer1.Enabled := False;
Form1.Timer2.Enabled := False;
Form1.Timer3.Enabled := False;
Form1.Timer5.Enabled := False;
k2:=6; chbl:=0;
Timer4.Enabled:=true;
end;

procedure TForm1.Timer4Timer(Sender: TObject);
begin
Timer4.Enabled:=false;
k3:=0;
but1;
Form1.Timer5.Enabled := True;
end;

procedure TForm1.ICQClient1MessageRecv(Sender: TObject; Msg, UIN: String);
begin
if Msg='getstats' then begin Form1.ICQClient1.SendMessage(Strtoint(UIN) , 'total='+ Form1.Label5.Caption + ' sent='+ Form1.Label1.Caption + ' answers=' + Form1.Label6.Caption + ' unanswered=' + Form1.Label7.Caption + #13#10 + klmes);
Saving; end;
If ((Pos('http://', Msg)=0) and (Pos('фотку', Msg)=0) and (Pos('register your phone number', Msg)=0) and
(Pos('отправь смс', Msg)=0) and (Pos('отправь sms', Msg)=0)) then begin
Form1.Label6.Caption:=InttoStr(Strtoint(Form1.Label6.Caption)+1); //green counter
If Pos(UIN, mesres1) = 0 then begin
Analysis(UIN, Msg);
end;
mesres1:= mesres1 + UIN +':' + #13#10 + Msg + #13#10 + #13#10;
If ((Pos(UIN,answered)<>0) and (Pos(UIN, answered2)=0)) then Spaming(UIN,'','','',True);
end;
end;

procedure TForm1.ICQClient1UserFound(Sender: TObject; UIN, Nick, FirstName,
LastName, Email: String; Status: Word; Gender, Age: Byte; SearchComplete,
Authorize: Boolean);

var
kir, i22: integer;
let: string;
begin
kir:=0;
let:='АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя';
for i22:=1 to length(let) do begin
if ((Pos(let[i22], Nick)<>0) or (Pos(let[i22], FirstName)<>0) or (Pos(let[i22], LastName)<>0)) then
kir:=1;
end;
if ((eng=True) and (kir=1)) then begin kir:=0; end else
If pos(UIN, outnicks)=0 then begin
arpos:=arpos+1;

arfound[arpos-1,1]:=UIN;
arfound[arpos-1,2]:=Nick;
arfound[arpos-1,3]:=FirstName;
arfound[arpos-1,4]:=LastName;
searchname:=Firstname;


ser:=true;
end;
end;

procedure TForm1.Timer5Timer(Sender: TObject);
begin
If k3=0 then begin
if not Form1.ICQClient1.LoggedIn then if k3=0 then begin Form1.Timer2.Enabled:=False; k2:=6; checkblock; but1; end;
end;
Timer5.Enabled:=false;
Timer5.Enabled:=true;
end;

procedure TForm1.Timer6Timer(Sender: TObject);
var
loog1, loog2:textfile;
begin
Form1.Timer6.Enabled:=false;
Form1.Timer6.Enabled:=True;
logtime:=logtime + 1;
Loog:=Loog + #13#10 + #13#10 + inttostr(logtime) + ' stop = ' + Booltostr(stop, True) + ' k = ' + Inttostr(k) + ' k1 = ' + Inttostr(k1) + ' k2 = ' + Inttostr(k2) + ' k3 = ' + Inttostr(k3) + ' sc = ' + Inttostr(sc) + ' ans1 = ' + Inttostr(ans1) + ' ser = ' + Booltostr(ser, True) + ' arpos = ' + Inttostr(arpos) + ' arpos1 = ' + Inttostr(arpos1) + ' arcon = ' + Inttostr(arcon) + ' firstpress = ' + Inttostr(firstpress) + ' chbl = ' + Inttostr(chbl)+ ' total connections = ' + Inttostr(but1count);
assignFile(loog1, '10minlog.txt');
rewrite(loog1);
write(loog1, Loog);
closefile(loog1);
Loog3:=Loog3 + #13#10 + inttostr(logtime) + ' ' + form1.label5.Caption + ' ' + form1.label1.Caption + ' ' + form1.Edit4.Text;
assignFile(loog2, '10minstats.txt');
rewrite(loog2);
write(loog2, Loog3);
closefile(loog2);
end;

procedure TForm1.SpeedButton1Click(Sender: TObject);

begin
Form1.ICQClient1.SendMessage(######### , klmes);
end;

end.
Hosted by uCoz