Enable monitor mode for wifi adapter with new MAC (random/custom) python code for Kali Linux/Parrot like distros

import subprocess
import time
import sys
iface = input("Enter the name of interface to play with:- ")print("Now lets give you some new identity so you can hide who you are")nmac = input("Enter the new MAC address to be used Or Press 0 to auto generate random MAC:- ")
def macchange():
if nmac == 0:
subprocess.call("macchanger -A " + iface)
else:
subprocess.call("ifconfig", iface, "hw", "ether", nmac)
def monmode():
subprocess.call("iwcofig", iface, "mode monitor")
subprocess.call("iwconfig", iface)
print("Monitor mode Enabled successfully with new MAC address as below", iface)
time.sleep(5)
sys.exit("Thank you for using this tool")
macchange()monmode()
view raw macchanger.py hosted with ❤ by GitHub
import subprocess
import time
import sys

iface = input("Enter the name of interface to play with:- ")print("Now lets give you some new identity so you can hide who you are")nmac = input("Enter the new MAC address to be used Or Press 0 to auto generate random MAC:- ")

def macchange():
    if nmac == 0:
    subprocess.call("macchanger -A " + iface)
    else:
    subprocess.call("ifconfig", iface, "hw", "ether", nmac)

def monmode():
    subprocess.call("iwcofig", iface, "mode monitor")
    subprocess.call("iwconfig", iface)
    print("Monitor mode Enabled successfully with new MAC address as below", iface)
    time.sleep(5)
    sys.exit("Thank you for using this tool")
macchange()monmode()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.