1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[GET] MAC address changer for OSX

Discussion in 'Other Scripting Languages' started by delspon, Feb 2, 2012.

  1. delspon

    delspon Junior Member

    Joined:
    Dec 6, 2011
    Messages:
    126
    Likes Received:
    24
    Home Page:
    This is a little bash script I wrote to swiftly change my wireless MAC address on Apple OSX if I'm banned from a network. I couldn't find anywhere on the internet showing me how to do this, all sites I checked said MAC address could not be temporarily changed on a Macbook. I know it's not having to do with SEO, but it will be helpful in your life if you do sketchy things on private networks and become blocked.

    Code:
    #! /bin/bash
    # Written by delspon
    # Script to spoof airport MAC address
    # This script will only work if the address you supply is VALID
    clear
    echo
    echo " *** MAC spoofer for OSX ***"
    echo 
    echo "Is your airport ON? (y or n) "
    read -e airportStatus
    if [ $airportStatus == 'y' ]; then
    echo Your current airport MAC: 
    eval ifconfig en1 | grep ether
    echo
    echo Enter desired NEW airport MAC:
    read -n 17 MACaddr
    echo
    echo Disassociating from all networks...
    eval sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z
    echo Spoofed airport MAC to $MACaddr
    echo NOTE - restart your computer to revert to hardware MAC...
    exec sudo ifconfig en1 ether $MACaddr
    else
    clear
    echo "Turn on airport, then rerun this script."
    fi
    
     
    • Thanks Thanks x 2
    Last edited: Feb 2, 2012
  2. sfidirectory

    sfidirectory Senior Member

    Joined:
    Mar 29, 2010
    Messages:
    899
    Likes Received:
    483
    Occupation:
    Web developer/BTC enthusiast
    Location:
    php artisan make:migration
    Home Page:
    Good stuff, welcome to BHW :). Any chance you could write a similar script for Windows?
     
  3. WizGizmo

    WizGizmo Super Moderator Staff Member Premium Member

    Joined:
    Mar 28, 2008
    Messages:
    3,845
    Likes Received:
    55,442
    Since this is not actually a download, I have moved this
    thread to the "Other Scripting Languages" section.

    "Wiz"
     
  4. delspon

    delspon Junior Member

    Joined:
    Dec 6, 2011
    Messages:
    126
    Likes Received:
    24
    Home Page:
    Thanks Wiz. To sfidirectly, unfortunately cannot write that because I only have Mac OSX sorry!
     
  5. jonvital

    jonvital Junior Member

    Joined:
    Nov 13, 2011
    Messages:
    148
    Likes Received:
    48
    Location:
    Brooklyn, NY
    ..sooo uhhh... where do i put this again? :eek:
     
    • Thanks Thanks x 1
  6. jazzc

    jazzc Moderator Staff Member Moderator Jr. VIP

    Joined:
    Jan 27, 2009
    Messages:
    2,468
    Likes Received:
    10,148
    [​IMG]
     
    • Thanks Thanks x 2