A
Aielman
I am trying to set up LWP to work with sockets. I am currently using
the use LWP:rotocol::http::SocksChain module to connect. The connect
works fine, however I can't get the IO::Socket::INET that it calls to
stop printing outputs when the connection fails.
22/06 12:18:30 [ 07505 : 1005 ] : IO::Socket::INET: connect: Connection
refused
22/06 12:18:30 [ 07505 : 1005 ] : Can't create network socket... :
Connection refused
Is there anyway to squelch outputs to the system? Or someway to get
IO::Socket::INET to stop making the system print outs?
use LWP::UserAgent;
use LWP:rotocol::http::SocksChain;
LWP:rotocol::implementor( http => 'LWP:rotocol::http::SocksChain'
);
@LWP:rotocol::http::SocksChain::EXTRA_SOCK_OPTS = (
Chain_Len => 1,
Debug => 0,
Random_Chain => 1,
Chain_File_Data => ['vpn1.findnot.com:1088:XXXXXX:XXXXXXX:5',],
Auto_Save => 0,
Restore_Type => 0 );
&socket();
sub socket{
my $ua = LWP::UserAgent->new();
my $res =
$ua->get('http://www.samair.ru/proxy/proxychecker/results.htm');
if ($res->is_success) {
print $res->content;
} else {
print "failed";
}
}
the use LWP:rotocol::http::SocksChain module to connect. The connect
works fine, however I can't get the IO::Socket::INET that it calls to
stop printing outputs when the connection fails.
22/06 12:18:30 [ 07505 : 1005 ] : IO::Socket::INET: connect: Connection
refused
22/06 12:18:30 [ 07505 : 1005 ] : Can't create network socket... :
Connection refused
Is there anyway to squelch outputs to the system? Or someway to get
IO::Socket::INET to stop making the system print outs?
use LWP::UserAgent;
use LWP:rotocol::http::SocksChain;
LWP:rotocol::implementor( http => 'LWP:rotocol::http::SocksChain'
);
@LWP:rotocol::http::SocksChain::EXTRA_SOCK_OPTS = (
Chain_Len => 1,
Debug => 0,
Random_Chain => 1,
Chain_File_Data => ['vpn1.findnot.com:1088:XXXXXX:XXXXXXX:5',],
Auto_Save => 0,
Restore_Type => 0 );
&socket();
sub socket{
my $ua = LWP::UserAgent->new();
my $res =
$ua->get('http://www.samair.ru/proxy/proxychecker/results.htm');
if ($res->is_success) {
print $res->content;
} else {
print "failed";
}
}