NAME
Net::Netcat - A wrapper class for nc Swiss army knife of networking
DESCRIPTION
A simple interface for using netcat command line utility. You can run TCP, UDP or UNIX domain servers and clients.
SYNOPSIS
use Net::Netcat;
my $nc = Net::Netcat->new('/usr/bin/nc');
my $result = $nc->exec(); croak $nc->errstr unless $result;
$nc->exec();
$nc->options{ '-s' => 'source IP', '-p' => 'source port', };
$nc->exec()
# All options in OpenBSD netcat ipv4only => '-4', ipv6only => '-6', staylistening => '-k', listenmode => '-l', nodns => '-n', randomports => '-r', md5sign => '-S', rfc854telnet => '-y', unixsocket => '-U', udpsocket => '-u', verbose => '-v', scanmode => '-z', tcprecvbuff => '-I length', tcpsendbuff => '-O length', delaypkt => '-i interval', sourceport => '-p source_port', sourceip => '-s source', toskeyword => '-T tos', timeout => '-w timeout', port => '-port port', dest => '-dest destination_to_connect_to'
$nc->options{'-v' => 1,'-4' => 1, '-l' => 1, 'port' => 2300};
$nc->exec();
=head1 METHODS
=head2 new('/usr/bin/nc')
Contructs Net::Netcat object.It takes a path of netcat command.
You can omit this argument and this module searches netcat command within PATH environment variable.
options( @options )
Specify netcat command options directly
execute()
Executes netcat command with specified options.
exec()
An alias of execute()
stdout()
Get netcat command output to stdout.
stderr()
Get netcat command output to stderr.
Specify output file name and output options.
Avaiable options are:
=over
=item destination
The destination IP address to connect to
=item port
The port to connect to
=item author
Set the author.
=item comment
Set the comment.
=back
=head1 AUTHOR
Girish Venkatachalam, C<< <girish at gayatri-hitech.com> >>
=head1 BUGS
Please report any bugs or feature requests to
C<bug-text-cowsay at rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=text-cowsay>.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Net::Netcat
You can also look for information at:
=over 4
=item * AnnoCPAN: Annotated CPAN documentation
L<http://annocpan.org/dist/Text-COWsay>
=item * CPAN Ratings
L<http://cpanratings.perl.org/d/Text-COWsay>
=item * RT: CPAN's request tracker
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Text-COWsay>
=item * Search CPAN
L<http://search.cpan.org/dist/Text-COWsay>
=back
=head1 ACKNOWLEDGEMENTS
=head1 COPYRIGHT & LICENSE
Copyright 2012 Girish Venkatachalam, all rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=cut