/usr/share/doc/libnet-frame-perl/examples/pack-eth-ipv4-tcp.pl is in libnet-frame-perl 1.17-1.
This file is owned by root:root, with mode 0o644.
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 | #!/usr/bin/perl
use strict;
use warnings;
use Net::Frame::Layer::ETH;
use Net::Frame::Layer::IPv4;
use Net::Frame::Layer::TCP;
use Net::Frame::Simple;
my $eth = Net::Frame::Layer::ETH->new;
my $ip4 = Net::Frame::Layer::IPv4->new;
my $tcp = Net::Frame::Layer::TCP->new(
options => "\x02\x04\x54\x0b",
);
my $oSimple = Net::Frame::Simple->new(
layers => [ $eth, $ip4, $tcp ],
);
print $oSimple->print."\n";
print unpack('H*', $oSimple->raw)."\n";
|