I'm new to Python, but I'm convinced that you should learn by doing. So here goes:
I'm trying to create a small CLI-application that takes two textfiles as input. It's then supposed to create a list of common SSIDs from the file SSID.txt, and then go through Kismet.nettxt to see how many of the Access Points that have common names.
Am I on the right track here at all? This is what I have so far, which imports the SSID.txt into a variable called "ssids"
f = open('SSID.txt', "r")
s = open('Kismet.nettxt', "r")
for line in f:
ssids = line.strip()
s.close()
f.close()
Any tips on how I should proceed from here and what to look for?
This is how the files are formatted:
SSID.txt:
linksys
<no ssid>
default
NETGEAR
Wireless
WLAN
Belkin54g
MSHOME
home
hpsetup
smc
tsunami
ACTIONTEC
orange
USR8054
101
tmobile
<hidden ssid>
SpeedStream
linksys-g
3Com
This is how the Kismet.nettxt is formatted:
Network 3: BSSID REMOVED
Manuf : Siemens
First : Sun Dec 29 20:59:46 2013
Last : Sun Dec 29 20:59:46 2013
Type : infrastructure
BSSID : REMOVED
SSID 1
Type : Beacon
SSID : "Internet"
First : Sun Dec 29 20:59:46 2013
Last : Sun Dec 29 20:59:46 2013
Max Rate : 54.0
Beacon : 10
Packets : 2
Encryption : WPA+PSK
Encryption : WPA+TKIP
Channel : 5
Frequency : 2432 - 2 packets, 100.00%
Max Seen : 1000
LLC : 2
Data : 0
Crypt : 0
Fragments : 0
Retries : 0
Total : 2
Datasize : 0
Last BSSTS :
Seen By : wlan0 (wlan0mon)