Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.55 KB | None | 0 0
  1. unit Unit1;
  2.  
  3. interface
  4.  
  5. uses
  6. Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  7. Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection,
  8. IdTCPClient, IdHTTP;
  9.  
  10. type
  11. TForm1 = class(TForm)
  12. Button1: TButton;
  13. OpenDialog1: TOpenDialog;
  14. Memo1: TMemo;
  15. Button2: TButton;
  16. Button3: TButton;
  17. Button4: TButton;
  18. Label1: TLabel;
  19. Label2: TLabel;
  20. Label3: TLabel;
  21. Label4: TLabel;
  22. Label5: TLabel;
  23. Label6: TLabel;
  24. Label7: TLabel;
  25. Label8: TLabel;
  26. Label9: TLabel;
  27. Label10: TLabel;
  28. IdHTTP1: TIdHTTP;
  29. procedure Button1Click(Sender: TObject);
  30. procedure FormCreate(Sender: TObject);
  31. procedure Button2Click(Sender: TObject);
  32. procedure Button4Click(Sender: TObject);
  33. procedure Button3Click(Sender: TObject);
  34. private
  35. { Private declarations }
  36. public
  37. { Public declarations }
  38. end;
  39.  
  40. type
  41. Potok = class(TThread)
  42. private
  43. { Private declarations }
  44. protected
  45. constructor Create (CreateSuspended: Boolean);
  46. procedure Execute; override;
  47. end;
  48.  
  49.  
  50. var
  51. Form1: TForm1;
  52. accaunts, proxylist: TStringList;
  53. work: Boolean;
  54. login, password: string;
  55.  
  56. implementation
  57.  
  58. {$R *.dfm}
  59.  
  60. constructor Potok.Create (CreateSuspended: Boolean);
  61. begin
  62. inherited Create (CreateSuspended);
  63. end;
  64.  
  65. procedure TForm1.FormCreate(Sender: TObject);
  66. begin
  67. accaunts:=TStringList.Create;
  68. proxylist:=TStringList.Create;
  69. end;
  70.  
  71. procedure TForm1.Button1Click(Sender: TObject);
  72. begin
  73. if OpenDialog1.Execute then
  74. begin
  75. Accaunts.LoadFromFile(OpenDialog1.FileName);
  76. Label6.Caption:=inttostr(accaunts.count);
  77. end;
  78. end;
  79.  
  80. procedure TForm1.Button2Click(Sender: TObject);
  81. begin
  82. if OpenDialog1.Execute then
  83. begin
  84. ProxyList.LoadFromFile(OpenDialog1.FileName);
  85. Label7.Caption:=inttostr(proxylist.Count);
  86. end;
  87. end;
  88.  
  89.  
  90. procedure TForm1.Button4Click(Sender: TObject);
  91. begin
  92. Potok.Create;
  93. work:= false;
  94. end;
  95.  
  96. procedure TForm1.Button3Click(Sender: TObject);
  97. begin
  98. work:=true;
  99. end;
  100.  
  101.  
  102. procedure Potok.Execute;
  103. var
  104. HTTP: TidHTTP;
  105. data: TStringList;
  106. HTML:String;
  107. i, acc, pl: integer;
  108. begin
  109.  
  110. while work do
  111. begin
  112.  
  113. for i:=0 to accaunts.Count do
  114. begin
  115. HTTP:= TidHTTP.Create;
  116. data:= TStringList.Create;
  117.  
  118. Login:= copy(accaunts[acc],1,pos(';', accaunts[acc])-1);
  119. Password:= copy(accaunts[acc], pos(';', accaunts[acc])+, maxint);
  120.  
  121. HTTP.ProxyParams.ProxyServer:= copy(proxylist[pl],1,pos(':', proxylist[pl])-1);
  122. HTTP.ProxyParams.ProxPort:=strtoint(copy(proxylist[pl],pos(':', proxylist[pl])+1), maxint));
  123.  
  124. end;
  125. end;
  126.  
  127. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement