chris_henderson has asked for the wisdom of the Perl Monks concerning the following question:
#!/bin/perl use strict; use warnings; use sigtrap; use diagnostics; my $mac="ff:ff:ff:ff:ff:ff"; my $command = system (`tshark -i eth0 -n port 68 -R 'bootp.type == 2' +-o column.format:'"Source MAC","%hs"'`); if ($command ne $mac) { system ('echo "match" | /usr/bin/mail -s "mac_found" user@foo. +com'); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: get mac addr, compare & send out email
by NetWallah (Canon) on Mar 24, 2009 at 03:04 UTC | |
|
Re: get mac addr, compare & send out email
by irah (Pilgrim) on Mar 24, 2009 at 05:10 UTC | |
|
Re: get mac addr, compare & send out email
by zentara (Cardinal) on Mar 24, 2009 at 12:32 UTC |