更改MAC地址可可 - Objective-C的 [英] Change MAC address Cocoa - Objective-C

查看:128
本文介绍了更改MAC地址可可 - Objective-C的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能改变通过Objective-C的MAC地址?寻找一个简单的解决办法。我已经有一个shell脚本(bash)的,可以做,如果没有什么帮助。我将如何打开从我的Cocoa应用程序?谢谢你。

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.

推荐答案

您可以通过运行外部命令<一href=\"http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSTask_Class/Reference/Reference.html\"相对=nofollow> NSTask 。

You can run external commands using NSTask.

但是,很可能改变MAC地址需要超级用户权限,所以你将不得不寻找到<一个href=\"http://developer.apple.com/library/mac/#sample$c$c/BetterAuthorizationSample/Introduction/Intro.html\"相对=nofollow>授权的为好。

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

这篇关于更改MAC地址可可 - Objective-C的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆