简体   繁体   English

仅使用Python欺骗MAC?

[英]Spoofing MAC using Python only?

this is for Windows 10 - wanting help with a little script that just randomizes my MAC every time I run it. 这是针对Windows 10的-希望获得一个小脚本的帮助,该脚本每次运行时都会随机分配我的MAC。 Have written code to generate new realistic MACs as well as a debugger thing, eg prints current MAC vs actual MAC, but the problem is I don't know where/how to actually input the new fake MACs? 已经编写了代码来生成新的逼真的MAC和调试器,例如打印当前的MAC与实际的MAC,但是问题是我不知道在哪里/如何实际输入新的伪MAC? 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. 我知道存在一些针对MAC欺骗的问题,但似乎没有一个问题仅适用于Python。 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 如果这对您的答案有所帮助,那么这是一个使用c#解决欺骗的问题,该问题概述了当前MAC(看似)正确的注册表位置: 如何通过代码欺骗MAC地址

Is it just a matter of sifting through registry and/or environment variables using os module or am I way off track? 仅仅是使用os模块筛选注册表和/或环境变量的问题,还是我偏离了轨道?

Thank you in advance :) 先感谢您 :)

SpoofMAC is a Python program that allows you to change your MAC address in Windows, Mac, and Linux. SpoofMAC是一个Python程序,可让您在Windows,Mac和Linux中更改MAC地址。

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. 如果要以编程方式运行脚本,则可以使用os.system在Python中运行shell命令。

import os
os.system('spoof-mac.py set 00:00:00:00:00:00 en0')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM