1.隐藏网址一般有两种方式:数据库查询语句和重定向
2.下面一段程序可以获得隐藏的地址,得到的内容中Location:后面就是真正的地址
uses WinSock;
...
procedure TForm1.Button1Click(Sender: TObject);
var
len,s:integer;
name:sockaddr_in;
he
HostEnt;
buf:array[0..1023]of char;
str,data:String;
wsd:WSADATA;
begin
WSAStartup($101,wsd);
s:=socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
he:=gethostbyname('www.ttdown.com');//网站地址
if he=nil then
Raise Exception.Create('err');
FillChar(name,sizeof(name),0);
name.sin_family:=AF_INET;
name.sin_port:=htons(80);//网站端口
name.sin_addr.S_addr:=PDWORD(PDWORD(he.h_addr)^)^;
connect(s,name,sizeof(name));
str:='HEAD /SoftDown.asp?ID=34589 HTTP/1.1'#13#10'Host: www.ttdown.com'#13#10'Accept:
*/*'#13#10'Connection: Close'#13#10#13#10;
send(s,PChar(str)^,Length(str),0);
data:='';
while true do
begin
len:=recv(s,buf,sizeof(buf),0);
if len<1 then
break;
SetString(str,buf,len);
data:=data+str;
end;
closesocket(s);
WSACleanup();
ShowMessage(data);
end;