#!/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. #
#-------------------------------------------#
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");
}
}
sub choice
{
my $choice;
my @os = ("Linux","MAC\(APPLE\)","FreeBSD");
print "Please Choose an Operating System..\n\n";
print "\[1\] Linux \(All Distros\)\n\[2\]FreeBSD\n\n";
system("ifconfig $_[0] down");
$choice=<STDIN> and chomp $choice;
while(@os[$choice])
{
if($choice = 1)
{
print "You have Selected @os[1]\n";
print "Now Spoofing MAC Address\n";
for(my $i=0;$i=7;$i++)
{
print "$i\n";
}
system("ifconfig $_[0] hw ether 00:01:00:01:00:01");
print "MAC Address Changed to 00:01:00:01:00:01\!\n";
system("ifconfig $_[0] up");
}
if($choice = 2)
{
print "You have Selected @os[1]\n";
print "Now Spoofing MAC Address\n";
for(my $i=0;$i=7;$i++)
{
print "$i\n";
}
system("ifconfig $_[0] hw ether 00:02:00:02:00:02");
print "MAC Address Changed to 00:02:00:02:00:02\!\n";
system("ifconfig $_[0] up");
}
}
}