new: button to restart in auto or manu mode

This commit is contained in:
Simone Margaritelli
2019-11-04 17:35:06 +01:00
parent e336fca0de
commit 364af70ad5
4 changed files with 37 additions and 12 deletions

View File

@ -18,6 +18,8 @@ RECOVERY_DATA_FILE = '/root/.pwnagotchi-recovery'
class Agent(Client, Automata, AsyncAdvertiser, AsyncTrainer):
INSTANCE = None
def __init__(self, view, config, keypair):
Client.__init__(self, config['bettercap']['hostname'],
config['bettercap']['scheme'],
@ -39,10 +41,13 @@ class Agent(Client, Automata, AsyncAdvertiser, AsyncTrainer):
self._history = {}
self._handshakes = {}
self.last_session = LastSession(self._config)
self.mode = 'auto'
if not os.path.exists(config['bettercap']['handshakes']):
os.makedirs(config['bettercap']['handshakes'])
Agent.INSTANCE = self
def config(self):
return self._config