by classichasclass on 6/21/25, 3:37 PM
Alternatively, if you don't want to run the whole Electron app, the money is this line:
sudo.exec("/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport en0 -z && ifconfig en0 ether `openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`",
by ammar2 on 6/21/25, 3:45 PM
Glad this feature is built into most modern operating systems these days.
For MacOS (Sequoia+) you can just forget the network and reconnect to get a new MAC address [1].
Android's documentation for if it decides to generate a new address per connection is a little vague [2], but I'm guessing forgetting and reconnecting works as well, you may also need to flip the "Wi-Fi non-persistent MAC randomization" bit in developer settings.
On Windows, flipping the "Random hardware address" switch seems to cause it to generate a new seed/address for me.
[1] https://support.apple.com/en-euro/102509
[2] https://source.android.com/docs/core/connect/wifi-mac-random...
by purplehat_ on 6/21/25, 5:22 PM
Here's an equivalent little script for Debian Linux (but should work on most distros), based on classhasclass's comment:
NEW_MAC=$(printf '02:%02x:%02x:%02x:%02x:%02x\n' $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)))
sudo ip link set wlan0 down
sudo ip link set wlan0 address "$NEW_MAC"
sudo ip link set wlan0 up
You should replace `wlan0` with whatever you see in `ip link show` for your wireless interface, for me it is `wlp0s20f3`. I replaced the `openssl rand` command because it was generating some invalid MACs; this is hopefully only valid ones.
by vachina on 6/21/25, 6:33 PM
I used to strap 20 virtual eths to my Linux box because my dorm gave only like 512kbps per account, and then aggregated the 20 interfaces.
by o_____________o on 6/21/25, 4:20 PM
by mannyv on 6/21/25, 4:46 PM
If you really want to screw with these set your MAC address to 00:00:00:00:00:00
It’s an illegal address, but most equipment will take it because test devices occasionally come from the factory with that MAC. But higher level stuff might barf on it because it’s technically illegal.
by kazinator on 6/21/25, 3:43 PM
This has been an option in Android network settings forever: randomize your MAC. I think it's enabled by default now?
It's a basic privacy feature; you can be fingerprinted by your device's MAC.
by josh_carterPDX on 6/22/25, 5:58 AM
This reminded me of an old app that would scan the MAC addresses of devices already connected to a paid WiFi network. You would then just change your MAC to one that already paid for the WiFi, and then reset it once you were done.
by glerk on 6/21/25, 3:55 PM
Alternatively, disconnect from the wifi, use this command and reconnect:
sudo ifconfig en0 ether 02:11:22:33:44:55
Just ran into this on icelandair.
by netik on 6/21/25, 5:27 PM
The trivial defense against this is time limited passwords for Wifi access. Deny all access until a valid password is entered, only permit that password and MAC address pair for n minutes.
Buy a coffee, get a new password, etc.
by cactusplant7374 on 6/21/25, 3:35 PM
Doesn't Mac already have this with rotating MAC addresses? I also ran into an access point that detected this and required me to turn it off to continue.
by avidiax on 6/21/25, 3:38 PM
I feel this would be more useful as a utility to manage your MAC addresses.
That would let you, for example, clone a MAC address or IP address between your computer and a phone, and maybe automatically resolve contention.
That way, you can split purchased WiFi (such as on a plane) between multiple devices.
by balls187 on 6/21/25, 7:48 PM
Haven’t ever encountered any place that had a wifi time limit. In the late 2000’s internet cafes had time limits but that was enforced on their own devices.
Is there a specific scenario where time limited wifi is common place?
by nixpulvis on 6/21/25, 5:57 PM
by gsibble on 6/22/25, 12:52 AM
WOAH. MAC address spoofing is some old school stuff. I got in trouble for it in college.
I didn't realize you could spoof MAC addresses on....well....a Mac but it's not something I'd do lightly.
by tptacek on 6/21/25, 10:24 PM
Or you could just comply with the terms you tacitly agree to when using these services. Use this stuff or don't, but if you do, you don't get to complain about GPL infringement anymore.
by jmtulloss on 6/22/25, 12:32 AM
This is exactly how I managed to get my dorm room’s internet turned off in college. My roommate was unimpressed with my cleverness.
by neilv on 6/22/25, 4:44 AM
This kind of thing can be a useful tool, including for privacy&security use cases that the page doesn't mention.
But be conscious and thoughtful when using it. Some terms to consider whether they apply to a particular use include "unauthorized access", "circumvention", and "theft of service".
by boston_clone on 6/21/25, 3:59 PM
Can you not manually set your MAC address in the network configuration portion of macOS settings anymore? Does this not accomplish that same task, just with an abstracted layer of “randomness” for address generation? Another commenter already de-bloated the entire application into a bash one-liner
by ClawsOnPaws on 6/21/25, 8:08 PM
Since this is only available for mac, couldn't this fairly easily be solved with shortcuts?
by johnebgd on 6/21/25, 8:57 PM
Reminds me of Perfigo Smart Access before Cisco bought them. Network security with a MAC address whitelist. If you knew a whitelisted computer you’d have the same access it permitted. This was back before captive portal took off…
by Beijinger on 6/21/25, 10:09 PM
Like macchanger under Linux since 20 years? Must be cool to have an Apple I guess.
by polivier on 6/21/25, 5:01 PM
On Linux you can use `macchanger` to change your MAC address from the terminal.
by caioluders on 6/21/25, 7:52 PM
by lrvick on 6/21/25, 8:05 PM
by deanc on 6/21/25, 7:22 PM
A few years ago I saw a tip somewhere here on how to scan which MAC addresses are connected to nearby wifi and hijack their mac address and steal their internet connection.
by crustycoder on 6/21/25, 4:14 PM
On android it can be toggled on If Developer Options are enabled.
by delfugal on 6/22/25, 1:38 PM
AirPass? I had that wrong. Maybe because I just had lunch.
by ndgold on 6/21/25, 3:42 PM
Nice little helper friend
by satellite2 on 6/21/25, 9:36 PM
Fantastic. Now we're promoting script kiddies scamming airlines. That's a new low for hn
by gsibble on 6/22/25, 12:58 AM
If this site was really hackers, this wouldn't be considered news.
by deadbabe on 6/21/25, 6:16 PM
This is so unethical and no one gives a fuck, society crumbles when people just feel entitled to take more than their fair share.