-1

I am a web developer (PHP/Javascript) and to increase my skill set, I would like to learn a new language. I have a simple test project in mind for this, so I can learn more about (wireless) networks and Linux, something I'm interested in as well.

I have specced out my project like this:

Look at all the open wireless networks in my area, and determine which one is the least busy (i.e. has the least data traffic), then list its ESSID. Do this by putting the wireless interface in monitor mode, and collect statistics about which access point receives/transmits the least TCP packets.

I think this would be a fun, simple way to get the "best" access point to connect to. I'm sure there are better ways to reach that goal, but this would cover all the things I want to learn about.

I am working in Ubuntu, and would like to learn Python or Ruby with this project. I have done a bit of research, and I think I'll need (a wrapper for) libpcap to sample the amount of data. I would also need to address iwconfig to change to the next channel, and look for packets there.

So, my question is: is there an ideal language for this? Is it possible to do this "inside" a language, without having to break out of it to issue a command line command like "iwconfig"? Any advice in general?

  • Either language is capable of this. The python-wifi, python-libpcap, and Rubypcap libraries come up on Google. I'm sure Ruby has a wifi library also, but I'm not sure what it's called. – James Jul 20 '11 at 16:21

2 Answers2

2

My preference is Ruby, and that is because it is my preference. However, there are lots of libraries availble in each language. See:

http://www.scribd.com/doc/56319311/Programming-Wireless-Security-32813

also

Which of these scripting languages is more appropriate for pen-testing?

Community
  • 1
  • 1
Dmitri
  • 2,658
  • 2
  • 25
  • 41
  • Thanks, that's usefull reading material. The whole pentesting angle makes it much easier to google for specific information, thanks for the tip! – Stephane Henkel Jul 21 '11 at 06:49
0

I don't know much about Ruby, but I'm sure that Python could do what you want. In regards to stepping down into OS/CLI land, I would have a look at the os and subprocess modules. The subprocess module will let you call arbitrary binaries (such as iwconfig) from python and collect their results.

Python is fun to learn. Good luck.

Wilduck
  • 13,822
  • 10
  • 58
  • 90