commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Prompts for network name (SSID) and password, and generates (as qr-wifi.png) a WiFi QR code (e.g. "WIFI:S:mynet;T:WPA;P:mypass;;" for mynet/mypass). Dependencies [sudo apt-get install]: qrencode zenity
This command will disconnect the user whose mac was specified from the current list of clients from the wireless network when the network card is working in access point mode. Works on atheros-based access points which use the madwifi driver (not sure, but don't think it will work on access points which are not atheros-based, as it uses the atheros's iwpriv extensions).
It will not prevent the user from reconnecting to the network, but may force the user to roam to another AP, with stronger signal.
The closer to zero the better.Credit to TheSeb on macrumors: http://forums.macrumors.com/showthread.php?t=1289884
Instead of hard-coding in a check to scrape info from ifconfig based on a specific interface, do it in a more portable way.
This works really well if you switch between wired, wireless, bluetooth or even VPN connections. You can get your current IP in a script (since it'll be something like tun0 instead of eth0 or wlan1).
This uses a well known public ip address 220.127.116.11, but it doesn't actually connect to it, it just shows you the route it would take.
Values will depend on the driver and the hardware specifics, so you need to refer to your driver documentation for proper interpretation of those values.
This command will place your card into monitor mode. Gets around the "ioctl(SIOCSIWMODE) failed: Device or resource busy" error encountered when running airodump-ng.