Search code examples
pythonwindowswifi

Enabling Wifi In monitor mode Using Python in Windows Platform


Can any one help in enabling wifi monitor mode in windows using python scripting. Suggest Modules available for the same purpose compatible with Windows 7 and Python 3.6

For Linux it done using the follwoing code

iface = "wlan"
os.system('iwconfig ' + iface + ' mode monitor')

Please let me know if any thing else is to be mentioned for more clarification.


Solution

  • The equivalent of "iwconfig" for windows is "netsh"

    So your command should look something like:

    import subprocess
    ...
    subprocess.call('netsh trace start capture=yes', shell=True)
    

    You can find all the details there: How to run cmd windows netsh command using python?