Saturday, November 21, 2015

MAC Address Spoofing on Linux

Here's a simple shell script which can be used to change the MAC address of your computer to something else. Open your favorite text editor and enter the following content there. Save the file as somewhere in your system. Move in to the place where this shell script is saved using a terminal and run it using the command sh which will ask for the root password. Once you enter it, you are done. Try ifconfig command to check whether your MAC address has changed to what you wanted. Don't forget to replace the interface name (wlan0) and MAC address (xx:xx:xx:xx:xx:xx) according to your requirement in the script.

sudo service network-manager stop
sudo ifconfig wlan0 down
sudo ifconfig wlan0 hw ether xx:xx:xx:xx:xx:xx
sudo ifconfig wlan0 up
sudo service network-manager start

No comments:

Post a Comment