[wplug] Interesting question du jour

Lance Tost ltost at pobox.com
Mon Apr 21 16:38:38 EDT 2003


weird.. works on mine.  Did you copy and paste it?

ppcas01 00:09:6B:49:06:F4
        00:09:6B:49:06:F5

ppcas02 00:09:6B:63:09:F6
        00:09:6B:63:09:F7

rcas0024        00:09:6B:49:08:2E
        00:09:6B:49:08:2F

rcas0025        00:09:6B:49:09:12
        00:09:6B:49:09:13

rcas0026        00:09:6B:A3:03:ED
        00:09:6B:A3:03:EE

rcas0027        00:09:6B:63:0B:69
        00:09:6B:63:0B:6A


On Mon, 21 Apr 2003, Vanco, Donald wrote:

> Date: Mon, 21 Apr 2003 16:19:26 -0400
> From: "Vanco, Donald" <VANCOD at pios.com>
> Reply-To: wplug at wplug.org
> To: "'wplug at wplug.org'" <wplug at wplug.org>
> Subject: RE: [wplug] Interesting question du jour
> 
> Lance Tost wrote:
> > This should do it... again, invalid for MACs ending in FF.
> > 
> > #!/usr/bin/perl
> > 
> > open (IN, "/tmp/infile") or die "Cannot open file: $!\n";
> > open (OUT, ">/tmp/outfile") or die "Cannot open file: $!\n";
> > 
> > while (<IN>) {
> >         ($host, $mac) = split;
> >         (undef,undef,undef,undef,undef,$x) = split(':',$mac);
> >         printf OUT ("%s\t%s\n", $host, $mac);
> >         $y = sprintf ("%02X\n", (hex $x) + 1);
> >         $mac =~ s/:.{2}$/:$y/;
> >         printf OUT ("\t%s\n", $mac);
> > }
> > close (IN);
> > close (OUT);
> 
> Getting closer - but it still does goofy things:
> This is dorked:
> rcas0024        00:09:6B:49:08:2E
>         00:09:6B:49:08:3
> 
> Yet this is OK:
> rcas0026        00:09:6B:A3:03:ED
>         00:09:6B:A3:03:EE
> 
> here again:
> rcas0029        00:09:6B:63:0B:4B
>         00:09:6B:63:0B:5
> 
> 	...seems like the "number/letter" combo is not handled correctly
> 
> Don
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
> 

-- 
Lance Tost <ltost at pobox.com>




More information about the wplug mailing list