Hey guys. I'm on Mac OS X and there are a few occasions where I'll need to spoof my MAC address, so I just run this shell script that I wrote and it looks like this: Code: #!/bin/bash
#Spoof MAC address in the OS X environment.
oldaddr=$(ifconfig en0 | grep ether)
newaddr=$(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')
sudo ifconfig en0 ether $newaddr
echo "Your old MAC address was $oldaddr"
echo "Your new spoofed MAC address is $newaddr" Copy and paste that into a text editor, and save it to your computer as "spoofmacaddress.sh" (or something like that - feel free to change the exact filename to anything you want but always keep the .sh extension).
Now you'll need to open up Terminal and change the permissions on that file so that you can execute it. By default when you save a file you can only read and write it, not execute. Navigate to that file in Terminal and execute this command on it:
sudo chmod 755 'spoofmacaddress.sh'
This gives you execute permissions. Now in your Terminal window just type "./spoofmacaddress.sh" and the shell script will execute and your MAC address will be spoofed. You will have to enter your administrator password during this process because the spoofed MAC address is something that will effect all users of the computer (even if you are the only user).
I hope this helps some of you, at least the OS X users.
Sorry Windows users but this will not work for your machines, however a batch script can be written to achieve the same results - if anybody has written or knows how to write a batch script to spoof the MAC address PLEASE post it here - I think it would help us all out.
Happy selling.
EDIT: Sorry, OP, I just noticed you are only asking about how to _check_ your MAC address, not spoof it. Well, in a Mac OS X environment, you can open up Terminal and execute the following command to check what your MAC address is: Code: ifconfig en0 | grep ether
Last edited by sacka_man; 09-04-2013 at 07:23 PM.
|