Skip to content

Instantly share code, notes, and snippets.

@tomastrajan
Created May 20, 2019 12:11
Show Gist options
  • Select an option

  • Save tomastrajan/2e809f585935ea54c4ed73e446697ec0 to your computer and use it in GitHub Desktop.

Select an option

Save tomastrajan/2e809f585935ea54c4ed73e446697ec0 to your computer and use it in GitHub Desktop.

Revisions

  1. tomastrajan created this gist May 20, 2019.
    7 changes: 7 additions & 0 deletions change-mac.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    function changeMac() {
    local mac=$(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')
    sudo ifconfig en0 ether $mac
    sudo ifconfig en0 down
    sudo ifconfig en0 up
    echo "Your new physical address is $mac"
    }