Skip to content

Instantly share code, notes, and snippets.

@SimplGy
Created March 14, 2015 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SimplGy/1da9c9c980f2bdaf75a2 to your computer and use it in GitHub Desktop.
Save SimplGy/1da9c9c980f2bdaf75a2 to your computer and use it in GitHub Desktop.
Change a MAC address in OSX and disconnect correctly from the current WIFI network.

Quick Start

Figure out which en interface to use

ifconfig 

See the mac address

ifconfig en0 | grep ether

Learn arp

man arp

The arp utility displays and modifies the Internet-to-Ethernet address translation tables used by the address resolution protocol (arp(4)). With no flags, the program displays the current ARP entry for hostname. The host may be specified by name or by number, using Internet dot nota-tion.

Display current ARP entries.

arp -a

Disconnect from current wifi network (if connected). Do not turn OFF wifi — the MAC address may reset when you turn it back on.

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/[PUBLICWIFI] -z

Change your MAC address to a different one

sudo ifconfig en0 ether [new mac address]

Read More:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment