/usr/share/doc/libio-socket-socks-perl/examples/udp.pl is in libio-socket-socks-perl 0.61-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #!/usr/bin/perl
use lib '../lib';
use IO::Socket::Socks;
use Socket;
use strict;
# daytime UDP client
my $sock = IO::Socket::Socks->new(
UdpAddr => 'localhost',
UdpPort => 8344,
ProxyAddr => 'localhost',
ProxyPort => 1080,
SocksDebug => 1
) or die $SOCKS_ERROR;
my $peer = inet_aton('localhost');
$peer = sockaddr_in(13, $peer);
$sock->send('!', 0, $peer) or die $!;
$sock->recv(my $data, 50) or die $!;
$sock->close();
print $data;
|