Здарова всем!
Хочу создать брут на сайт [Ссылки могут видеть только зарегистрированные пользователи. ]
Вообщем вот код, все идет правильно ошибок не выдает, но когда нажимаю на кнопку Старт проверяет только один логин и все.
if Opendialog1.Execute then
begin
send.Clear;
send.LoadFromFile(Opendialog1.FileName);
Label4.Caption:=IntToStr(send.Count-1);
end;
if pos(';',send.Strings[0])<>0 then // авторазделитель
begin
del:=';';
end else
begin
del:=':';
end;
if del=';' then
begin
login:=copy(send.Strings[0], 1, pos(';',send.Strings[0])-1);
Pass:=copy(send.Strings[0], pos(';',send.Strings[0])+1, maxint);
end;
if del=':' then
begin
login:=copy(send.Strings[0], 1, pos(':',send.Strings[0])-1);
Pass:=copy(send.Strings[0], pos(':',send.Strings[0])+1, maxint);
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
http, go: string;
BruteThread: TBruteThread;
begin
BruteThread:=TBruteThread.Create(True);
BruteThread.freeonterminate:=true;
BruteThread.Priority:=tpLower;
BruteThread.resume;
send:=tstringlist.create;
assignfile(goodfile, extractfilepath(application.exename)+'Good.txt');
Rewrite(goodfile);
closefile(goodfile);
end
else
begin
Form1.Label6.Caption:=IntToStr(StrToInt(Form1.Labe l6.Caption)+1);
Form1.gauge1.Progress:=Form1.gauge1.Progress+1;
end;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
Button1.Enabled:=true;
Button3.Enabled:=false;
Work:=false;
end;
procedure TForm1.FormShow(Sender: TObject);
begin
CS:=TcriticalSection.Create;
send:=Tstringlist.create;
end;
procedure TbruteThread.Execute;
var
Thread, Acc:integer;
begin
CS.Enter;
send:=tstringlist.Create;
send.LoadFromFile(extractfilepath(application.ExeN ame));
for thread:=0 to send.count -1 do
begin
sleep(100);
send[thread];
acc:=thread;
end;
CS.Leave;
end;
end.
end.
Последний раз редактировалось eramontana; 06.05.2013 в 22:53.