|
NAMENet::Netcat - A wrapper class for nc Swiss army knife of networkingDESCRIPTIONA simple interface for using netcat command line utility. You can run TCP, UDP or UNIX domain servers and clients.SYNOPSISuse 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(); METHODSnew('/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. I tested and developed this on OpenBSD 5.2 netcat. This is substantially different from Linux netcat. So kindly sene me bug reports. There seems to be a bug in netcat with UNIX domain sockets and the verbose flag. So don't use that combo. Usually you have to terminate the command with the Ctrl-C keyboard interrupt signal. You could also redirect the output to a file if desired. 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:
AUTHORGirish Venkatachalam, <girish at gayatri-hitech.com> BUGSPlease 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. SUPPORTYou can find documentation for this module with the perldoc command. perldoc Net::Netcat You can also look for information at:
ACKNOWLEDGEMENTSThe author of Netcat Hobbit who remains anonymous to this day.COPYRIGHT & LICENSECopyright 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.
Visit the GSP FreeBSD Man Page Interface. |