Change MAC address Cocoa - Objective-C

牧云@^-^@ 提交于 2019-12-11 14:45:11

问题


How can I change the MAC address via Objective-C? Looking for a simple solution. I already have a shell script (Bash) that can do it if that helps. How would I open that from my Cocoa application? Thanks.


回答1:


You can run external commands using NSTask.

However, it's likely that changing the MAC address requires superuser privileges so you will have to look into authorization as well.



来源:https://stackoverflow.com/questions/4825332/change-mac-address-cocoa-objective-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!