"Fossies" - the Fresh Open Source Software Archive

Member "arpwatch-NG1.7/convert_ether_nmap.pl" (21 Feb 2005, 240 Bytes) of archive /linux/misc/old/arpwatch-NG1.7.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/perl
    2 #
    3 # convert the ethercodes from nmap to arpwatch format
    4 # (C) by Freek/2005
    5 #
    6 #
    7 while(<>) {
    8     chomp;
    9     ($mac, @info)= split(/ /);
   10     $x=substr $mac, 0,2;
   11     $y=substr $mac, 2,2;
   12     $z=substr $mac, 4, 2;
   13     print "$x:$y:$z\t@info\n"
   14 }