if DEBUG: print "In cookie:", cookie # Get list of possible BSSIDs by searching Wigle for specific SSID bssids = applewloc.getSSIDloc(ssid=ssid, cookie=cookie) # Process each of the BSSIDs returned by Wigle # Wigle dictionary format: {'stayoffmylawn [00:25:9C:ED:0F:EB] [6]': (33.65253067, -112.03952026) for key, value in bssids.items(): if key: key = key.split()[1][1:-1] else: continue #print_locs(AppleWloc(bssid=key)) networks = applewloc.AppleWloc(bssid=key) #print "networks: ", networks applewloc.print_locs(networks) if ssid_count == 0: if networks.keys()[0] != None: base_bssid = networks.keys()[0] mymap = pygmaps.maps((networks[base_bssid][0]), (networks[base_bssid][1]), 4) ssid_count = 1 for e in networks: mymap.addpoint(networks[e][0], networks[e][1], color="#FF0000", title=[e]) mymap.draw('./' + output_file) output_file = os.path.abspath(output_file) print "File written to:", output_file
if op == '-o': output_file = sys.argv.pop(1) if op == '-w': openbrowser = True if op == '-h': usage() if op not in ops: print "Unknown option:",op usage() # Test for user input if not bssid: usage() if DEBUG: print "In bssid:",bssid # Get BSSID from Apple and print results applewloc.print_locs(applewloc.AppleWloc(bssid)) networks = applewloc.AppleWloc(bssid) #print "networks:",networks # Create Google map of networks mymap = pygmaps.maps((networks[bssid][0]),(networks[bssid][1]), 8) for e in networks: mymap.addpoint((networks[bssid][0]),(networks[bssid][1]),color = "#FF0000",title = bssid) mymap.draw('./'+output_file) output_file = os.path.abspath(output_file) print "File written to:", output_file # Open in web browser if openbrowser == True: webbrowser.open_new_tab("file://"+output_file)
if tmp[0].count('x'): print "You know this is going to take FOREVER, right?" tmp2 = [] for e in tmp: tmp2.extend([e.replace('x',x,1) for x in octets]) tmp = tmp2 # Search for networks for e in tmp: # Process each bssid network = applewloc.AppleWloc(bssid=e) #print "networks:",network networks.update(network) # Print each network discovered applewloc.print_locs(network) #networks = applewloc.AppleWloc(bssid) #print "networks:",networks #if writemap == True: # Create Google map of networks base_bssid = networks.keys()[0] mymap = pygmaps.maps((networks[base_bssid][0]),(networks[base_bssid][1]), 4) for e in networks.keys(): mymap.addpoint(networks[e][0],networks[e][1],color = "#FF0000",title = [e]) mymap.draw('./'+output_file) output_file = os.path.abspath(output_file) print "File written to:", output_file
if op == '-o': output_file = sys.argv.pop(1) if op == '-w': openbrowser = True if op == '-h': usage() if op not in ops: print "Unknown option:", op usage() # Test for user input if not bssid: usage() if DEBUG: print "In bssid:", bssid # Get BSSID from Apple and print results applewloc.print_locs(applewloc.AppleWloc(bssid)) networks = applewloc.AppleWloc(bssid) #print "networks:",networks # Create Google map of networks mymap = pygmaps.maps((networks[bssid][0]), (networks[bssid][1]), 8) for e in networks: mymap.addpoint((networks[bssid][0]), (networks[bssid][1]), color="#FF0000", title=bssid) mymap.draw('./' + output_file) output_file = os.path.abspath(output_file) print "File written to:", output_file # Open in web browser if openbrowser == True: