I try to create a socket (scirpt is run on UNIX):
#!/usr/bin/perl
use Socket;
print "Content-Type: text/html\n\n";
print "<html>";
print "<title>Cyrus</title>";
print "<head>";
print "</head>";
print "<body>";
$server = " $port = 80;
$server_addr =(gethostbyname($server))[4];
$server_struct = pack("S n a4 x8", AF_INET, $port, $server_addr);
$proto = (getprotobyname('ftp'))[2];
socket(MYSOCK, PF_INET, SOCK_STREAM, $proto)|| print "Failed to initialize socket: $!\n";
connect(MYSOCK, $server_struct) || print "Failed to connect() to server: $!\n";
print "</body>";
print "</html>";
as result I got: "Failed to connect() to server: Permission denied", it seems to me that some firewall restrict my responses. How could I found this firewall and connect throught it? (LWP library doesn't exists on this server)
#!/usr/bin/perl
use Socket;
print "Content-Type: text/html\n\n";
print "<html>";
print "<title>Cyrus</title>";
print "<head>";
print "</head>";
print "<body>";
$server = " $port = 80;
$server_addr =(gethostbyname($server))[4];
$server_struct = pack("S n a4 x8", AF_INET, $port, $server_addr);
$proto = (getprotobyname('ftp'))[2];
socket(MYSOCK, PF_INET, SOCK_STREAM, $proto)|| print "Failed to initialize socket: $!\n";
connect(MYSOCK, $server_struct) || print "Failed to connect() to server: $!\n";
print "</body>";
print "</html>";
as result I got: "Failed to connect() to server: Permission denied", it seems to me that some firewall restrict my responses. How could I found this firewall and connect throught it? (LWP library doesn't exists on this server)