unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TForm1 = class(TForm)
test: TMemo;
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
function PosEx(const Source, Sub: string; Index: integer): integer;
var
Buf : string;
i, Len, C : integer;
begin
C := 0;
Result := 0;
Buf := Source;http://dfeej.info
http://rtkuh.info
http://xrtyf.info
http://qefky.info
http://whjir.info
http://dfew.info
http://cbjya.info
http://qwfgr.info
http://kuyhb.info
http://qjyt.info
http://wrtu.info
http://xdes.info
http://mkoy.info
http://txbf.info
http://wfkm.info
http://njer.info
http://www.dfeej.info
http://www.rtkuh.info
http://www.xrtyf.info
http://www.qefky.info
http://www.whjir.info
http://www.dfew.info
http://www.cbjya.info
http://www.qwfgr.info
http://www.kuyhb.info
http://www.qjyt.info
http://www.wrtu.info
http://www.xdes.info
http://www.mkoy.info
http://www.txbf.info
http://www.wfkm.info
http://www.njer.info
http://yuip.info
http://fwqw.info
http://hyui.info
http://q237.info
http://www.yuip.info
http://www.fwqw.info
http://www.hyui.info
http://www.q237.info
http://gsfea.info
http://swzsa.info
http://123wb.info
http://ts235.info
http://dt098.info
http://sbr69.info
http://xdfth.info
http://dft2.info
http://dvny6.info
http://rh5n.info
i := Pos(Sub, Source);
Len := Length(Sub);
while i <> 0 do
begin
inc(C);
Inc(Result, i);
Delete(Buf, 1, i + Len - 1);
i := Pos(Sub, Buf);
if C >= Index then Break;
if i > 0 then Inc(Result, Len - 1);
end;
if C < Index then Result := 0;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
i,y:integer;
x,c:string;
g,g1:integer;
begin
randomize; //生成随机数种子
i:=random(30);
y:=i+1;
c:='topfox000|topfox001|topfox002|topfox003|topfox004|topfox005|topfox006|topfox0007|topfox008|topfox009|tellyoumysecret000|tellyoumysecret002|tellyoumysecret003|tellyoumysecret004|tellyoumysecret005|tellyoumysecret006|'+
'onhacker046|onionhacker047|onionhacker048|onionhacker049|onionhacker140|onionhacker141|onionhacker142|onionhacker143|onionhacker144';
test.text:=test.text+inttostr(PosEx( c, '|',i));//返回5
g:= PosEx( c, '|',i)+1;//返回5
test.text:=test.text+inttostr(PosEx( c, '|',y));//返回5
g1:=PosEx( c, '|',y);//返回5
x:=Copy(c,g,g1-g);
memo1.text:=x;
end;
end.