Random mac address changing script for your Linux WIFI (mac address spoofing)

A quick howto for all of you that need to change your WIFI mac address (run this from root user):

#!/bin/bash
hexchars="0123456789ABCDEF"
end=$( for i in {1..10} ; do echo -n ${hexchars:$(( $RANDOM % 16 )):1} ; done | sed -e 's/\(..\)/:\1/g' )
MAC=00$end

service network-manager stop
ifconfig wlan0 down
ifconfig wlan0 hw ether $MAC
ifconfig wlan0 up
service network-manager start

echo $MAC

Categories: Other, Software

1 Comment

  1. José Ricardo Ulloa

    June 12, 2017 — 01:43

    Thank you very much!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Copyright © 2024 Closer to Code

Theme by Anders NorenUp ↑