Skip to content

Instantly share code, notes, and snippets.

View mrrobotbot's full-sized avatar
:shipit:

Mr.Robot mrrobotbot

:shipit:
View GitHub Profile
@mbierman
mbierman / randommac.sh
Last active July 26, 2025 22:26
NOTE: Looks like Apple killed tis in Sonoma for Ethernet but the following works for Wi-Fi.
#!/bin/bash
# v 2.0
# https://gist.github.com/mbierman/03b2a962ac04963ef5bbc8354d0ed5d1
# 2022 mbierman
sleep="${1:-6}"
regex="^([0-9A-F]{2}[:]){5}([0-9A-F]{2})$"
getmac () {
rnd=$(openssl rand -hex 6 | sed 's/\(..\)\(..\)\(..\)\(..\)\(..\)\(..\)/\1:\2:\3:\4:\5:\6/')