欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

自己亲自做的 修改 mac 地址 有大用 有大大用 有大大大用

#!/bin/bash

#


#网卡名称

EnX=$(/usr/bin/osascript -e 'display dialog "请输入网卡名称" default answer "" with icon note buttons {"Cancel", "Continue"} default button "Continue"

    set result1 to result

    set the text_data to text returned of the result

    set the button_data to button returned of the result1

    if button_data = "Cancel" then

      return ""

    end if

    return text_data')   

sudo ifconfig $EnX ether A4:BB:6D:E6:AE:FF  

networksetup -detectnewhardware

sudo ifconfig $EnX up  

(/usr/bin/osascript -e  'display dialog "修改成功!"')

 


普通分类: