Net::W...Layer2(3pm)

πŸ“¦
version 1.10 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ‘‘ NAME πŸ‘‘

Net::Write::Layer2 β€” bestie, this is the object for a link layer (layer 2) descriptor πŸ’–

It's the class that makes you a layer-2 descriptor so you can yeet raw frames at the network. No cap. πŸ¦‹


✨ SYNOPSIS ✨

use Net::Write::Layer2;

my $desc = Net::Write::Layer2->new(
   dev => 'eth0',
);

$desc->open;
$desc->send('G'x666);
$desc->close;

Okay so literally: make one, point it at eth0, open it, shove six hundred and sixty-six 'G's out into the world 😭, then close. That's the whole vibe. Slay. πŸ’…


🌸 DESCRIPTION 🌸

This is the class for creating a layer 2 descriptor. That's it, that's the girl. It gives you a handle on the link layer and lets you do raw stuff with it. Main character energy fr fr. ✨


πŸŽ€ ATTRIBUTES πŸŽ€

  • dev β€” the string that says which network interface you're working with 🫢
    • Under Unix-like systems, this is in this format: \w+\d+ (example: eth0). Cute, simple, iconic. πŸ’œ
    • Under Windows systems, this is more complex; example: \Device\NPF_{0749A9BC-C665-4C55-A4A7-34AC2FBAB70F}. Yeah bestie, it's giving hex-and-dashes 😭. Copy it exactly, do not improvise.

πŸ’… METHODS πŸ’…

  • new β€” object constructor! You MUST pass a valid dev attribute, no exceptions, no shortcuts. There is no default value. Returns undef on error 🌈
  • open β€” open the interface. Returns undef on error. πŸ’«
  • send (scalar) β€” send raw data to the network πŸ”₯
  • close β€” close the descriptor. Say bye bestie πŸ‘‹

πŸ’€ CAVEATS πŸ’€

Writing junk to loopback interface on BSD systems will not work. Not a skill issue, just how it is. Don't come for me πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

  • Net::Write::Layer

🧚 AUTHOR 🧚

Patrice <GomoR> Auffret πŸ‘‘


Copyright (c) 2006-2015, Patrice <GomoR> Auffret

You may distribute this module under the terms of the Artistic license. See LICENSE.Artistic file in the source distribution archive.


And that's the whole page, periodt πŸ’– this was pulled from the Net::W...Layer2(3pm) page in the User Contributed Perl Documentation, and it's riding with perl v5.36.0, dated 2022-10-13. Stay slaying, bestie πŸŽ€βœ¨

πŸ“¦ where this page comes from