#!/usr/bin/perl
#-------------------------------------------#
# MACSHIFT - MAC Switcher Based on Roamer's #
# "SirMACsAlot". #
# #
# Version : 1.0b (Beta) #
# Author : Gnomer (Robert) #
#===========================================#
# Description #
#===========================================#
# This program was inspired by another MAC #
# tool, "SirMACsAlot", and therefore credit #
# is given to it's maker. The reason for a #
# recode is, SirMACsAlot is repetitive with #
# "if" statements. This program should be a #
# little cleaner, and a bit more complex. #
# #
# NOTE : I am NOT calling Roamer a bad #
# coder, just his program is repetitive. #
#-------------------------------------------#
readMAC($ARGV[0]);
sub readMAC
{
my $interface = $_[0];
my $macr = "ifconfig -a | grep \"$_[0]\" | grep \"HWaddr\"";
if(!$interface)
{
print "Error In Function readMAC() : $!\n";
die;
} else {
system("$macr > MAC.log");
}
} exit;