feross / spoof Goto Github PK
View Code? Open in Web Editor NEWEasily spoof your MAC address in macOS, Windows, & Linux!
Home Page: https://feross.org/spoofmac/
License: MIT License
Easily spoof your MAC address in macOS, Windows, & Linux!
Home Page: https://feross.org/spoofmac/
License: MIT License
running Current Version: v0.12.7 node.js and last version of spoof
sudo spoof randomize en2
Error: Cannot read property 'toUpperCase' of undefined
And executing with sudo privileges returned:
~$ sudo spoof list
sudo: spoof: command not found
I also have ifconfig installed.
13.0.0
to 13.0.1
.This version is covered by your current version range and after updating it in your project the build failed.
standard is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 4 commits.
c713e2e
13.0.1
72e0f1b
Update CHANGELOG.md
934a5b8
[email protected]
501624c
Update CHANGELOG.md
See the full diff
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
First of all: Thank you very much for building and maintaining this package, it's very useful.
Today, I noticed what I assume to be a bug:
# Preparation
npm i -g spoof
# see the corresponding help message
spoof --help
# …
# spoof version | --version | -v Show package version.
# …
# While these two lines work:
spoof version # (prints "2.0.1")
spoof --version # (prints "2.0.1")
# The following results in an error:
spoof -v
/usr/local/lib/node_modules/spoof/node_modules/minimist/index.js:65
setKey(argv, x.split('.'), value);
^
TypeError: x.split is not a function
at /usr/local/lib/node_modules/spoof/node_modules/minimist/index.js:65:28
at Array.forEach (<anonymous>)
at setArg (/usr/local/lib/node_modules/spoof/node_modules/minimist/index.js:64:30)
at module.exports (/usr/local/lib/node_modules/spoof/node_modules/minimist/index.js:179:21)
at Object.<anonymous> (/usr/local/lib/node_modules/spoof/bin/cmd.js:8:14)
at Module._compile (internal/modules/cjs/loader.js:1128:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:983:32)
at Function.Module._load (internal/modules/cjs/loader.js:891:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
This bug is of course not too much of a problem when using the tool, it is only about retrieving the version number, after all, and there are other ways to obtain that information, but I thought I should report it here anyway.
This is mostly a placeholder issue till me or somebody else implements it.
I believe the correct commands are
netsh wlan disconnect
netsh wlan connect name="WIFI-NAME"
After randomising MAC address with
sudo spoof randomize <device>
where the device is a wifi connection, the computer does not re-connect to the last connected wifi.
turn the wifi card off and on after randomizing MAC.
Just a suggestion to add support for randomize with a given prefix
I do no get any output from this tool when I run spoof list
on Linux OS.
I've narrowed down the condition it is failing to pass, it is the regular expression for parsing the output of ifconfig
.
Line 117 in 58dd7de
br-420df7a1a7ee: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.27.0.1 netmask 255.255.0.0 broadcast 172.27.255.255
inet6 fe80::42:10ff:fe81:e45a prefixlen 64 scopeid 0x20<link>
ether 02:42:10:81:e4:5a txqueuelen 0 (Ethernet)
RX packets 11438 bytes 2596038 (2.5 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 17119 bytes 2419291 (2.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
inet6 fe80::42:efff:fe5b:5ba7 prefixlen 64 scopeid 0x20<link>
ether 02:42:ef:5b:5b:a7 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3 bytes 306 (306.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 3953586 bytes 723678103 (723.6 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3953586 bytes 723678103 (723.6 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.178.35 netmask 255.255.255.0 broadcast 192.168.178.255
inet6 2001:a61:243f:5101:94c1:c4f1:ccb6:5c1c prefixlen 64 scopeid 0x0<global>
inet6 2001:a61:243f:5101:5324:51f6:1c7d:6 prefixlen 64 scopeid 0x0<global>
inet6 fd00::6adc:ffea:e940:a20c prefixlen 64 scopeid 0x0<global>
inet6 fe80::702d:52ab:7674:588d prefixlen 64 scopeid 0x20<link>
inet6 fd00::4bd6:4c28:c115:4ef6 prefixlen 64 scopeid 0x0<global>
ether dc:41:a9:9f:a8:d5 txqueuelen 1000 (Ethernet)
RX packets 20323810 bytes 13583854451 (13.5 GB)
RX errors 0 dropped 334652 overruns 0 frame 0
TX packets 13009338 bytes 7201165364 (7.2 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Do we know why the pattern of (.*?)HWaddr(.*)
is expected? Can we improve this parsing?
Encountering this issue with a 2018 MacBook Air on macOS Mojave 10.14.6.
Running the following command fails without any status messages:
sudo spoof set aa:bb:cc:dd:ee:ff en0
I run the command, enter my password, and the command seems to complete. However, running spoof list
reveals the Mac Address has not changed.
This issue appears to affect manually setting the address with ifconfig
as well. Running this command also does not change anything and does not throw an error:
sudo ifconfig en0 ether aa:bb:cc:dd:ee:ff
Not sure if or how Mac spoofing might be disabled system-wide, or if something else is going on here. Any help is appreciated.
Hi,
Ifconfig command is deprecated. Please support ip command. which is supporting on spoofMac project.
Thank you
Wasn't able to play with this due to its reliance on ifconfig
, where I use iproute2
.
The equivalent commands to randomize your MAC using iproute2
:
ip link set dev eth0 down
ip link set dev eth0 address `hexdump -n3 -e'/3 "00:60:2F" 3/1 ":%02X"' /dev/urandom`
ip link set dev eth0 up
Up to you if this information is useful or not, just putting it out there for others.
Hello!
This is a great tool but something that would make it even better is the ability to randomise after X MB is sent and/or received from the server.
Hello! I'm not sure if this is the right place to do this but i recently stumbled upon this error a little bit ago on windows 11 even tho this command was working perfectly before. Running spoof list
returned devices without a name but with a MAC address and i couldnt do anything to randomize my adapter. I just figured out how to fix it so i thought i'd save you guys the time and effort
Simply open your settings, go to Network & Internet > Advanced Network Settings
Under Network Adapters, find your Wifi Adapter. For me it was the second one.
Click the Dropdown and under "Rename this adapter", rename it to something like wi-fi
Restart your command line and then run spoof list
. You should see Wi-Fi come back
Run spoof randomize Wi-Fi
or whatever the device name is under that command
I hope this is helpful to anyone. I know nothing about node js so i cant really help much, i kind of just aimlessly stumbled upon a solution after two days. Thank you feross for creating this amazing command, it's saved me a bunch :)
Q: Is it possible to use this repository as the default brew
formulae?
Rather than the default python brew option.
label:enhancement
label:question
Hello, not sure if this is a bug or something wrong with my system but I thought I'd report it anyways, perhaps someone could look into it.
The output below, notice lines such as "- on device Wifi with MAC address B8:EE:65:98:0C:4F " immediately after the - in the beginning of the line, there should be the name of the device. Without said line I am not able to properly select the adapter I want to change MAC for.
Below is complete output of my experience
Windows 7 x64, up to date
ASUS i5 Laptop
node -v: v6.11.2
npm -v: 3.10.10
C:\Users\John-Laptop\Desktop\nodeProjects\spoof (master) ([email protected])
λ spoof list
C:\Users\John-Laptop\Desktop\nodeProjects\spoof (master) ([email protected])
λ spoof randomize Wifi
C:\Users\John-Laptop\Desktop\nodeProjects\spoof (master) ([email protected])
λ spoof list
C:\Users\John-Laptop\Desktop\nodeProjects\spoof (master) ([email protected])
λ spoof randomize Wifi
C:\Users\John-Laptop\Desktop\nodeProjects\spoof (master) ([email protected])
λ spoof list
C:\Users\John-Laptop\Desktop\nodeProjects\spoof (master) ([email protected])
λ spoof list wifi
Thank you for looking into this!
Hi Feross,
I have a quick question. I plan to package this software (or SpoofMac) for Debian. Which of these two (this nodejs version or the python version) is more stable and maintained? Is your intention to replace the python version with this nodejs version? Or is the nodejs version experimental?
Cheers,
Kevin
Hello! I can try again and paste output if necessary, but I got
Error: Object # has no method 'execSync'
when doing "spoof list" using nodes 0.11.11.
Thanks!
Hi, I'm running Elementary OS and using your script via Node.
I uses another script to change my MAC address that also edits it in /etc/NetworkManager/System-Connections/MYNETWORKNAME
I ran your script and it did not change it in that file. When I logged in to my router, the old MAC is still listed for my connection but running ifconfig lists the MAC your utility gave me. Sorta odd.
I'm actually surprised it connected to the network in the first place.
Any ideas what might be happening?
What are root privileges in the context of a Windows OS? Do you mean Admin privileges?
Hi, I was using this for a while now then all of a sudden it won't change the MAC address.
It says it has but it has not changed anything.
I'm using latest version and on macOS 1.13.6
$ sudo spoof set XX:XX:XX:XX:XX:X9 en1
$ spoof list
Have you ever (or anybody else) been able to spoof a Bluetooth PAN MAC address in any way?
Seems to me that it cannot be done with ifconfig
since ifconfig
command does not ever show that interface on my system, as opposed to networksetup -listallhardwareports
which does
Any attempt to set a MAC address results in:
ifconfig: ioctl (SIOCAIFADDR): Operation not supported on socket
spoof actually supports windows since April 2016 but we still haven't updated the readme.
This issue is mostly a placeholder if and when somebody finds the time for it.
Error when try to use spoof command in terminal
spoof --help
/usr/local/lib/node_modules/spoof/bin/cmd.js:6
const { stripIndent } = require('common-tags')
^
SyntaxError: Unexpected token {
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
Windows 10, node.js 10.9.0
$ spoof list
Error: Cannot read property 'forEach' of undefined
No stack trace, only that message.
$ spoof version
2.0.1
Also:
$ spoof reset wi-fi
Error: Could not find device for wi-fi
$ spoof randomize wi-fi
Error: Could not find device for wi-fi
(Same when using "Wi-Fi" as ID)
My network:
$ ipconfig
Windows IP Configuration
Wireless LAN adapter Local Area Connection* 15:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Local Area Connection* 16:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . : fritz.box
IPv6 Address. . . . . . . . . . . : 2003:ea:93d0:f500:1850:c080:15ca:a08b
Temporary IPv6 Address. . . . . . : 2003:ea:93d0:f500:f409:fa1f:aec5:5195
Link-local IPv6 Address . . . . . : fe80::1850:c080:15ca:a08b%21
IPv4 Address. . . . . . . . . . . : 192.168.178.28
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : fe80::3631:c4ff:fefb:6967%21
192.168.178.1
Ethernet adapter Bluetooth Network Connection 6:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
MacBook Pro (13-inch, 2018, Four Thunderbolt 3 Ports)
It works like charm on macOS Catalina. But not Big Sur.
I think you should be using the newer ip
command as ifconfig
is not only deprecated, but also inconsistent across linux distros.
E.g., my output is incompatible with spoof (Ubuntu 16.10):
br-aaaf777a4e49: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.18.0.1 netmask 255.255.0.0 broadcast 0.0.0.0
ether 02:42:0b:29:dd:90 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 0.0.0.0
ether 02:42:9b:59:49:b4 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 188143 bytes 11719536 (11.7 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 188143 bytes 11719536 (11.7 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.43.69 netmask 255.255.255.0 broadcast 192.168.43.255
inet6 fe80::b60f:1f73:168b:9d98 prefixlen 64 scopeid 0x20<link>
ether 60:6d:c7:c6:25:cb txqueuelen 1000 (Ethernet)
RX packets 53917 bytes 35312965 (35.3 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 47734 bytes 11155012 (11.1 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I'll make the necessary changes if you're willing to accept the move from ipconfig
to ip
.
It seems all 2018 version macbook pros are unable to change mac address using "ifconfig ether".
https://www.reddit.com/r/macbook/comments/93h2mi/mac_address_changing_on_new_2018_mbp_broken/
https://www.quora.com/Can-you-change-the-MAC-address-on-a-2018-MacBook-Pro
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.