谢谢各位,我已经做好了,附上代码~ #!/bin/bash
echo echo "They are the known hosts :" echo echo "29 攀 0C:60:76:13:16:7E" echo "30 欣 00:26:82:2B:CF:D7" echo "36 薇 00:1F:3C:1A:E9:02" echo "41 亮 00:26:82:D8:37:0A" echo "75 飞 00:1C:BF:96:47:37" echo "83 倩 C4:17:FE:E0:13:FD" echo echo "Type ID above to change your MAC now , 0 to change nothing ." read m sudo ifconfig wlan0 down case $m in 29) sudo ifconfig wlan0 hw ether 0C:60:76:13:16:7E;; 30) sudo ifconfig wlan0 hw ether 00:26:82:2B:CF:D7;; 36) sudo ifconfig wlan0 hw ether 00:1F:3C:1A:E9:02;; 41) sudo ifconfig wlan0 hw ether 00:26:82:D8:37:0A;; 75) sudo ifconfig wlan0 hw ether 00:1C:BF:96:47:37;; 83) sudo ifconfig wlan0 hw ether C4:17:FE:E0:13:FD;; *) echo "unknown host , nothing changed ." sudo ifconfig wlan0 up ifconfig wlan0 exit;; esac sudo ifconfig wlan0 up sudo /etc/init.d/networking restart ifconfig wlan0 192.168.1.$m ifconfig wlan0 exit 再次谢谢大家的帮助! -------------- 下一部分 -------------- 一个HTML附件被移除... URL: <https://lists.ubuntu.com/archives/ubuntu-zh/attachments/20110505/2f3fde21/attachment.html> -- ubuntu-zh mailing list ubuntu-zh@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-zh