how to write a shell script to input wireless connection password from my password file?
in ubuntu, does it possibl开发者_JAVA百科e to write a script to read passwords from a txt file (one password per line), to try to connect to a wireless connection?
assume i know the ESSID and MAC, and the connection on my computer is eth1.
what command can i use to input password, and how to know the status?
Thanks.
In bash or whatever shell scripting :
- to read passwords from a txt file: yes it's possible (while read..)
- to try to connect to a wireless connection: yes it's possible (bring up eth n )
To connect to a wlan net:
iwconfig wlan0 essid NETWORK_ID key WIRELESS_KEY
If the key isn't hex, but ascii:
iwconfig wlan0 essid NETWORK_ID key s:WIRELESS_KEY
精彩评论