Penetration Testing mailing list archives
ANNOUNCE: Net::Packet 2.00 released
From: GomoR <sfml () gomor org>
Date: Fri, 28 Jan 2005 08:24:39 +0100
Changes since 1.28: - major release, backward compatibility broken - full documentation - a battery of tests - new layers: o Layer2/SLL o Layer2/RAW o Layer2/NULL o Layer3/IPv6 - sending frames at DescL4 now fully works - huge speed improvements - some memory usage improvements - many many bugfixes README: Net::Packet version 2.00 ==================== This module is a unified framework to craft, send and receive packets at layers 2, 3, 4 and 7. Basically, you forge each layer of a frame (Net::Packet::IPv4 for layer 3, Net::Packet::TCP for layer 4 ; for example), and pack all of this into a Net::Packet::Frame object. Then, you can send the frame to the network, and receive it easily, since the response is automatically searched for and matched against the request. If you want some layer 2, 3 or 4 protocol encoding/decoding to be added, just ask, and give a corresponding .pcap file ;) EXAMPLE: # Load main module, it also initializes a Net::Packet::Env object use Net::Packet qw($Env); # Build IPv4 header use Net::Packet::IPv4; my $ip = Net::Packet::IPv4->new(dst => '192.168.0.1'); # Build TCP header use Net::Packet::TCP; my $tcp = Net::Packet::TCP->new(dst => 22); # Assemble frame # It will also open a Net::Packet::DescL3 descriptor # and a Net::Packet::Dump object use Net::Packet::Frame; my $frame = Net::Packet::Frame->new(l3 => $ip, l4 => $tcp); $frame->send; # Print the reply just when it has been received until ($Env->dump->timeout) { if ($frame->recv) { print $frame->reply->l3, "\n"; print $frame->reply->l4, "\n"; last; } } -- ^ ___ ___ FreeBSD Network - http://www.GomoR.org/ <-+ | / __ |__/ Security Engineer, searching for work | | \__/ | \ ---[ zsh$ alias psed='perl -pe ' ]--- | +--> Net::Packet <=> http://search.cpan.org/~gomor/ <--+
Current thread:
- ANNOUNCE: Net::Packet 2.00 released GomoR (Jan 28)