#!/usr/local/bin/perl


print $1,"\n",$2,"\n";
exit;

print "Content_type:text/html";
($them,$port)=@ARGV;
$port=80 unless $port;
#$them = 'www.spacecom.com' ;
$them = 'qs.secapl.com' ;
#$them = 'www.infomall.org' ;
print "Port and host :$port,$them\n";
$AF_INET = 2;
$SOCK_STREAM = 1;
$sockaddr = 'S n a4 x8';
#print $sockaddr, "\n";
chop($hostname=`hostname`);
#print $hostname, "\n";
($name,$aliases,$proto) = getprotobyname('tcp');
#print "\n\n";
#print " New Stat $name,$aliases,$proto, \n";
($name,$aliases,$port) = getservbyname($port,'tcp') unless $port=~/^\d+$/;;
#print $name,$aliases,$port, "\n";
($name,$aliases,$type,$len,$thisaddr) = gethostbyname($hostname);
#print $name,$aliases,$len,$thisaddr,"\n";
($name,$aliases,$type,$len,$thataddr) = gethostbyname($them);
#print $name,$aliases,$len,$thataddr, "\n";
print "\n\n",$name,$aliases,$len,$thataddr, "\n";
$this = pack($sockaddr,$AF_INET, 0, $thisaddr);
$that = pack($sockaddr,$AF_INET, $port, $thataddr);
#print $that,"\n";
print "\n\n",$that,"\n";
if (socket (S,$AF_INET,$SOCK_STREAM, $proto))
{ print "socket ok\n";}
if (bind(S,$this)){print "bind ok\n";
}
if (connect(S,$that)) { print "connect ok \n";
}
#print $sockaddr,$addr;
select(S);
$| = 1;
select(STDOUT);
print S "POST /cgi-bin/qs?tick950812=IBM HTTP/1.0\n\n";
#print S "GET index.html HTTP/1.0\n\n";
#print S "GET SFgate/SFproxy.html HTTP/1.0\n\n";
while(<S>)
{
printf ;
}

