Get a list of available wireless networks. Returns: A list containing available wireless networks.
00700 : """ Get a list of available wireless networks. Returns: A list containing available wireless networks. """ cmd = 'iwlist ' + self.iface + ' scan' if self.verbose: print cmd results = misc.Run(cmd) # Split the networks apart, using Cell as our split point # this way we can look at only one network at a time. # The spaces around ' Cell ' are to minimize the chance that someone # has an essid named Cell... networks = results.split( ' Cell ' ) # Get available network info from iwpriv get_site_survey # if we're using a ralink card (needed to get encryption info) if self.wpa_driver == RALINK_DRIVER: ralink_info = self._GetRalinkInfo() else: ralink_info = None # An array for the access points access_points =  for cell in networks: # Only use sections where there is an ESSID. if 'ESSID:' in cell: # Add this network to the list of networks entry = self._ParseAccessPoint(cell, ralink_info) if entry is not None: access_points.append(entry) return access_points def _FreqToChannel(self, freq):