from IWList import * import sys, os, logging logging.basicConfig() log = logging.getLogger("PyWiList") log.setLevel(logging.DEBUG) if __name__ == '__main__': iwl = IWList(sys.argv[1]) data = iwl.getData() items = list(data.values()) names = set(map(lambda x: x['ESSID'], items)) print(names)
from IWList import * import sys, os, logging logging.basicConfig() log = logging.getLogger("PyWiList") log.setLevel(logging.DEBUG) if __name__ == '__main__': iwl = IWList("eth1") print iwl.getData()
from IWList import * import sys, os, logging logging.basicConfig() log = logging.getLogger("PyWiList") log.setLevel(logging.DEBUG) if __name__ == '__main__': iwl = IWList(sys.argv[1]) print(iwl.getData())
while True: # Get GPS data gpsdata = xgpsd.get_data() # this is a rough estimate of distance, Manhattan: not Cartesian distance_moved = (abs(gpsdata["lat"] - last_coords[0]) + abs(gpsdata["lon"] - last_coords[1])) strongest_signal = 0 if distance_moved > .00005: # Set last gps coords last_coords = [gpsdata["lat"], gpsdata["lon"]] # Process WiFi data for cell in IWList(interface).getData().values(): match = re.match(r"(\d+)/(\d+)", cell["Signal"]) strength_nu = match.group(1) strength_de = match.group(2) strength = float(strength_nu) / float(strength_de) essid = cell["ESSID"] mac = cell["MAC"] if essid == "": continue # Keep track of the strength of our primary network. if essid == "Westmont_Encrypted" and strength > strongest_signal: strongest_signal = strength Tweet.bark(essid, json_data)