Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run: sudo brew services start spoof-mac #117

Open
mkelley33 opened this issue Mar 1, 2024 · 6 comments
Open

Unable to run: sudo brew services start spoof-mac #117

mkelley33 opened this issue Mar 1, 2024 · 6 comments

Comments

@mkelley33
Copy link

I get the following error when I try to run sudo brew services start spoof-mac on MacOS Sonoma 14.3.1

This started happening after I installed MongoDB Community Edition 7.0

Warning: Taking root:admin ownership of some spoof-mac paths:
  /opt/homebrew/Cellar/spoof-mac/2.1.1_5/libexec/bin
  /opt/homebrew/Cellar/spoof-mac/2.1.1_5/libexec/bin/spoof-mac
  /opt/homebrew/opt/spoof-mac
  /opt/homebrew/opt/spoof-mac/bin
  /opt/homebrew/var/homebrew/linked/spoof-mac
This will require manual removal of these paths using `sudo rm` on
brew upgrade/reinstall/uninstall.
Bootstrap failed: 5: Input/output error
Error: Failure while executing; `/bin/launchctl bootstrap system /Library/LaunchDaemons/homebrew.mxcl.spoof-mac.plist` exited with 5.
@DIGIX666
Copy link

Hi @mkelley33

Did you run sudo brew services start spoof-mac to install spoof-mac?
I have executed the command brew install spoof-mac and spoof-mac.py --help and it works fine for me.

SCR-20240419-lfvh

@mkelley33
Copy link
Author

I ran brew install spoof-mac, then I ran sudo brew services start spoof-mac, which gave me the following error:

Warning: Taking root:admin ownership of some spoof-mac paths:
/opt/homebrew/Cellar/spoof-mac/2.1.1_5/libexec/bin
/opt/homebrew/Cellar/spoof-mac/2.1.1_5/libexec/bin/spoof-mac
/opt/homebrew/opt/spoof-mac
/opt/homebrew/opt/spoof-mac/bin
/opt/homebrew/var/homebrew/linked/spoof-mac
This will require manual removal of these paths using sudo rm on
brew upgrade/reinstall/uninstall.
Bootstrap failed: 5: Input/output error
Error: Failure while executing; /bin/launchctl bootstrap system /Library/LaunchDaemons/homebrew.mxcl.spoof-mac.plist exited with 5.

@DIGIX666 Is there another way I should be starting the launch daemon?

@mkelley33
Copy link
Author

@DIGIX666 then when I run brew services start spoof-mac I get the following, which is helpful, but I'd like spoof-mac to start at startup.

Warning: spoof-mac must be run as root to start at system startup!
==> Successfully started spoof-mac (label: homebrew.mxcl.spoof-mac)

Do you know of a way around this?

@DIGIX666
Copy link

DIGIX666 commented Apr 19, 2024

Oh ok, I understand your request better now.
Have you already tried the command spoof-mac.py --help to see if it returns the USAGE ?
SCR-20240419-nauk

Yes, your command sudo brew services start spoof-mac is indeed correct.

it's strange because the path for file homebrew.mxcl.spoof-mac.plist is not the same, me is SCR-20240419-nhml and you is /bin/launchctl bootstrap system /Library/LaunchDaemons/homebrew.mxcl.spoof-mac.plist

@mkelley33
Copy link
Author

@DIGIX666 I did try the --help command thanks, but I see this now when manually attempting to spoof:

sudo spoof-mac randomize en0
Password:
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
WARNING: The airport command line tool is deprecated and will be removed in a future release.
For diagnosing Wi-Fi related issues, use the Wireless Diagnostics app or wdutil command line tool.
ifconfig: ioctl (SIOCAIFADDR): Can't assign requested address
Traceback (most recent call last):
  File "/opt/homebrew/bin/spoof-mac", line 138, in <module>
    sys.exit(main(arguments, root_or_admin))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/bin/spoof-mac", line 118, in main
    set_interface_mac(device, target_mac, port)
  File "/opt/homebrew/Cellar/spoof-mac/2.1.1_5/libexec/lib/python3.12/site-packages/spoofmac/interface.py", line 540, in set_interface_mac
    spoofer.set_interface_mac(device, mac, port)
  File "/opt/homebrew/Cellar/spoof-mac/2.1.1_5/libexec/lib/python3.12/site-packages/spoofmac/interface.py", line 450, in set_interface_mac
    subprocess.check_call([
  File "/opt/homebrew/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ifconfig', 'en0', 'ether', '08:00:27:1C:1D:6B']' returned non-zero exit status 1.

@DIGIX666
Copy link

DIGIX666 commented May 12, 2024

@mkelley33
It's normal, I have the same problem too. To successfully change your MAC address, you must forget the Wi-Fi network you are connected to and then run the command sudo spoof-mac.py randomize Wi-Fi or sudo spoof-mac.py randomize en0 . After that, reconnect to your Wi-Fi network and check the change with sudo spoof-mac.py list .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants