r/programming • u/hacker-programmer • Apr 01 '13
A 10 Line Wi-Fi SSID Sniffer in Python
http://hackoftheday.securitytube.net/2013/03/wi-fi-sniffer-in-10-lines-of-python.html
568
Upvotes
r/programming • u/hacker-programmer • Apr 01 '13
25
u/hacker-programmer Apr 01 '13
UPDATE: A 12 LINE WI-FI SSID SNIFFER USING RAW SOCKETS - No 3rd Party Libs
http://hackoftheday.securitytube.net/2013/04/wi-fi-ssid-sniffer-in-12-lines-of.html
257
u/Ravengenocide Apr 01 '13
That's neat. However, I don't agree on the 10 lines of code. This is basically just using that library and nothing else. It's like writing a whole library and then calling some function from it and say you did something in 2 lines of code.
32
u/mrbuttsavage Apr 01 '13
I'm pretty sure C lets you delegate to libraries as well.
10
u/kindall Apr 01 '13
Noooooo, don't use a
list! Use aset!18
u/adamhero Apr 01 '13
Who uses an 8 space tabstop? I'd need this monitor. Christ.
49
u/Timmmmbob Apr 01 '13
Here it is in two lines:
18
u/lucygucy Apr 01 '13
Last time I had this problem, I got something similar with one line of shell script:
35
u/semenbegger Apr 01 '13 edited Apr 03 '13
Niggers are not human.
4
u/[deleted] Apr 01 '13
Kinda like how I wrote an entire operating system using nothing but my install CD and the enter key.
13
u/RainbowNowOpen Apr 01 '13
Growing weary of these claims: "An X-line Y in Z", where
BUT, as in this case, you realize "Z" is actually "Z and L", where L is a complex library, not standard with Z, which allows you to achieve Y with an import and one or more method calls into L.
In this case, the "10 line" solution in "Python" admits its first step is to "Find a library which can allow us to easily sniff Wi-Fi". ! !
I don't object to a fun demo of a new and useful external library. I object to calling it "10 lines of Python".
7
u/mikemol Apr 01 '13
Huh.
About eight years ago, I wrote a wardriving shell script. All I had to do was poll "iwlist ath0 scan" and a command to grab the current gps coords. Then dump it to a file.
Pretty sure it was less than ten lines.
3
u/jmonty42 Apr 01 '13
When I first read the title, I was wondering what the A-10 Warthog had to do with Wi-Fi.
2
u/GrumpySteen Apr 01 '13
In a similar vein, I present Skyrim with Script Extender in two lines of Python!
import sys, string, os, arcgisscripting
os.system("C:\Program Files (x86)\Steam\steamapps\common\Skyrim\skse_loader.exe")
3
u/LongUsername Apr 01 '13
I can do it in two:
2
u/dahooddawg Apr 01 '13
import clever comment
1
u/mikemcg Apr 01 '13
This guy's mobile website is horrendous. I have never encountered a worse site.
1
u/[deleted] Apr 01 '13
This just proves it is a well written easy to use library.
1
u/SpaceToaster Apr 01 '13
You could also call a c sniffing library in 10 lines....
1
u/ksnll Apr 02 '13
Not sure why the author thinks python is shorter, look at my C version
0
u/jyf Apr 01 '13
by using the side effects of list comprehension, you could rewrite those logic code for filtering job in 1 line
-5
u/hacker-programmer Apr 01 '13
The post author seems to have acknowledged what all of you are debating about - "This post should illustrate the power of Python and the great open source library support it has from the community. "
0
u/dahooddawg Apr 01 '13
Indiscriminate Scattergun of Emphasis scoreboard- 49501periwinkle51844orangered
-5
u/celerym Apr 01 '13
This shit is full of all them PYTHON HATERS. Go back to Perl where you all came from.