Показать сообщение отдельно
  #1  
Старый 16.11.2015, 14:43
DeNiSoK12Rus DeNiSoK12Rus вне форума
Прохожий
 
Регистрация: 15.10.2015
Сообщения: 13
Версия Delphi: Delphi XE3
Репутация: 10
По умолчанию Парни, в чем ошибка ?

Код:
procedure TNewThread.Execute;
var
    HTTP: thttpsend;
    SSL : TIdSSLIOHandlerSocketOpenSSL;
    SOCKS: TIdSocksInfo;
    ath:string;
    Post,post1: Tstringstream;
    cook:TIdCookieManager;
 begin
  while Work do
  begin
   CS.Enter;
   inc(tp);
   if tp=Proxy.Count-1 then tp:=0;
   CS.Leave;
   if Work then
    begin
    HTTP:= THttpsend.Create();
    SSL:=TIdSSLIOHandlerSocketOpenSSL.Create;
    ssl.Port:=443;
    http.Timeout:=strtoint(form2.sSpinEdit2.text)*1000;
    post:= Tstringstream.Create;
    post1:= Tstringstream.Create;
    userinf:=Tstringlist.Create;
    sexe:=tstringlist.Create;
      if Proxy.Text = '' then sleep(0) else
      begin
      if Form2.sComboBox1.Text='HTTP(S)' then
    begin
     http.ProxyHost:=Copy(Proxy[tp],1,Pos(':',Proxy[tp])-1);
     http.ProxyPort:=Copy(Proxy[tp],Pos(':',Proxy[tp])+1,Length(Proxy[tp]));
    end;
    if Form2.sComboBox1.Text='SOCKS 4/5' then
    begin
     HTTP.Sock.SocksIP := Copy(Proxy[tp],1,Pos(':',Proxy[tp])-1);
     HTTP.Sock.SocksPort := Copy(Proxy[tp],Pos(':',Proxy[tp])+1,Length(Proxy[tp]));
    end;
      end;
    HTTP.MimeType:='application/x-www-form-urlencoded';
    HTTP.UserAgent:='Moblie';
    post.WriteString('sedit1.text');
    HTTP.Document.LoadFromStream(post);
    // Сам запрос
     if HTTP.HTTPMethod('post', 'site') then
     sexe.LoadFromStream(http.Document);
     if http.ResultCode<>200 then
     begin
     Rezult:=-1;
     end else
     begin
    if Pos('Link=', sexe.Text)<>0 then
    begin
    ath:= Pars('Link=', sexe.text ,'"');
    HTTP.Headers.Clear;
    HTTP.MimeType:='application/x-www-form-urlencoded';
    HTTP.UserAgent:='Mobile';
    post1.WriteString('sedit2.text');
    HTTP.Document.LoadFromStream(post1);
// Сам запрос
     if HTTP.HTTPMethod('post', 'site'+ath) then
     userinf.LoadFromStream(http.Document);
  if Pos('Utorrent', userinf.Text)<>0 then
 begin
 Rezult:=1;
end else
begin
Rezult:=0;
end;
    end;
     end;
    end;
     HTTP.Free;
     sexe.Free;
     post.Free;
     post1.Free;
     userinf.Free;
     Synchronize(Parsurl);
    end;
     dec(Thread);
     if Thread=0 then
     Form1.N6.Enabled:=true;
     Form1.N7.Enabled:=true;
     Form1.sbitbtn1.Enabled:=true;
     Form1.sbitbtn3.Enabled:=true;
     Form1.sbitbtn1.Enabled:=true;
     Form1.sbitbtn3.Enabled:=true;
     Form1.sComboBox1.Enabled:=true;
     Form1.sBitBtn5.Enabled:=true;
end;
Ошибки: http://i.imgur.com/mi9xSvC.png
Ответить с цитированием