Sunday, June 3, 2012

Writing a simple bash script for a mon0 interface

Recently I wrote my first bash script. While not a master piece by any means I consider it an accomplishment. Bash scripting is something I have been trying to pick up on since I picked up on Linux. I highly recommend that if you're interested in Linux or pen-testing that you try and do the same. Anyways, with out any further tangents I bring you the ./mon0.sh script.


#!/bin/bash
airmon-ng start wlan1
airmon-ng

This script starts a mon0 interface on wlan1 and then verifies that the interface was successfully created by running airmon-ng again with out arguments. Why did I create this script? Because I don't like having to remember to write all that crap to get a mon0 interface up and running. This script reduces the number of characters I have to put into the terminal to start the mon0 interface and relieves me of having to remember the command lines necessary to accomplish this task. If our computer's aren't working for us, then what good are they?

Here are some related links to help you get started on writing your own bash scripts:

http://linuxconfig.org/Bash_scripting_Tutorial
http://tldp.org/LDP/abs/html/index.html




New Blog

This blog is for me to track and document my progress in learning penetration testing related skills. The best way to show case that you've learned a skill is to teach it to others. In that regard this blog will feature a lot of "how to's." If by some miracle you happen to learn something while perusing my blog, or you think the documents I create are worthwhile please feel free to share with your friends.