#!/usr/bin/perl -w use strict; use IO::Socket; my $host = "www.chinaunix.net"; my $port = "80"; my $http_head = "GET / HTTP/1.0\nHost: $host:$port\n\n"; my $sock = IO::Socket::INET->new ( "$host:$port" ) or die "Socket() error, Reason : $! \n"; print $sock $http_head; print <$sock>; exit 0;
by: 发表于:2017-09-13 14:15:59 顶(0) | 踩(0) 回复
??
回复评论