Ejemplo n.º 1
0
 def _update_advertisement(self, s):
     self._advertisement['pwnd_run'] = len(self._handshakes)
     self._advertisement['pwnd_tot'] = utils.total_unique_handshakes(
         self._config['bettercap']['handshakes'])
     self._advertisement['uptime'] = pwnagotchi.uptime()
     self._advertisement['epoch'] = self._epoch.epoch
     grid.set_advertisement_data(self._advertisement)
Ejemplo n.º 2
0
 def exec_update(self, ui):
     try:
         Beacons._busy = True
         #TODO parse and send peers in another beacon frame
         packedInfo = self.pack_info(self.get_unsafe_unsync(ui, 'channel'),
                                     self.get_unsafe_unsync(ui, 'aps'),
                                     self.get_unsafe_unsync(ui, 'shakes'),
                                     pwnagotchi.uptime(),
                                     self.get_unsafe_unsync(ui, 'face'),
                                     self.get_unsafe_unsync(ui, 'mode'),
                                     pwnagotchi.name())
         self.broadcast_info(packedInfo, self._packet_type['report'])
     except Exception as e:
         logging.warning(" *beacons* -> exec_update exception: ")
         logging.warning(" *beacons* -> " + str(type(e)))
         logging.warning(" *beacons* -> " + str(e))
     Beacons._busy = False
Ejemplo n.º 3
0
 def _update_uptime(self, s):
     secs = pwnagotchi.uptime()
     self._view.set('uptime', utils.secs_to_hhmmss(secs))