Skip to content

Instantly share code, notes, and snippets.

@vgmoose
Created Jun 17, 2014
Embed
What would you like to do?
spoof.pl
print(" Old:");
print(`ifconfig en0 | grep ether`);
$oldmac=sprintf(`ifconfig en0 | grep ether`);
do{
if (length($ARGV[$0])==17)
{$mac=$ARGV[$0]."\n";}
elsif (length($ARGV[$0])!=0)
{
print(" New: ether ".$ARGV[$0]."\n");
die();
}
else
{
$mac="";
for($x=0;$x<6;$x++){
$mlist[$x]=int(rand()*256);
}
$mac=(lc(sprintf("%02x:%02x:%02x:%02x:%02x:%02x\n", $mlist[0],$mlist[1],$mlist[2],$mlist[3],$mlist[4],$mlist[5],)));
}
print("Target: ether $mac");
chomp $mac;
print(`sudo ifconfig en0 ether $mac`);
print(" New:");
print(`ifconfig en0 | grep ether`);
$newmac=sprintf(`ifconfig en0 | grep ether`);
if ($oldmac ne $newmac)
{
print("Changes successful!\n");
}
else{
print("Change unsuccessful.\n");}
} while ($newmac eq $oldmac && length($ARGV[$0])==0);
1. download spoof.pl
2. sudo perl spoof.pl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment