+ elif request.path[0:4] == "/phy":
+ #INCOMPLETE - Need to work out device mappings still
+ devices=list(load_db("select cast(device as text) from devices where type='Wi-Fi AP'"))
+ for device in devices:
+ (json_result,) = device
+ device_json = json.loads(json_result)
+ try:
+ if str(devicename) == str(device_json['dot11.device']['dot11.device.last_beaconed_ssid_record']['dot11.advertisedssid.ssid_hash']):
+ print("MATCH")
+ print(device_json)
+ except:
+ print("skipping")
+ return HttpResponse("{}", content_type='text/json')