0

this is for Windows 10 - wanting help with a little script that just randomizes my MAC every time I run it. Have written code to generate new realistic MACs as well as a debugger thing, e.g. prints current MAC vs actual MAC, but the problem is I don't know where/how to actually input the new fake MACs? and/or the best module(s) with which to do so.

I'm aware that there are questions addressing MAC spoofing but none of them seem to be with Python only. If it helps with your answer here's a question addressing spoofing using c# that outlines the (seemingly) correct registry location of the current MAC: how to spoof MAC address via code

Is it just a matter of sifting through registry and/or environment variables using os module or am I way off track?

Thank you in advance :)

Balthazar
  • 1
  • 1
  • 1

1 Answers1

1

SpoofMAC is a Python program that allows you to change your MAC address in Windows, Mac, and Linux.

But it's a command line program, not a package. If you want to run the script programmatically you can use os.system to run shell commands in Python.

import os
os.system('spoof-mac.py set 00:00:00:00:00:00 en0')
njbbaer
  • 45
  • 1
  • 6
  • 1
    I took a quick look at the source, and not only does it provide a package spoofmac, the main script is importable (uses the `__main__` test, and has a callable main function). – Yann Vernier Nov 19 '17 at 08:12