new: fixed rsa identity generation and implemented api enrollment plugin

This commit is contained in:
Simone Margaritelli
2019-10-06 23:25:02 +02:00
parent 107eb57f26
commit 1c251fc093
16 changed files with 127 additions and 27 deletions

View File

@ -10,6 +10,7 @@ if __name__ == '__main__':
import pwnagotchi.plugins as plugins
from pwnagotchi.log import SessionParser
from pwnagotchi.identity import KeyPair
from pwnagotchi.agent import Agent
from pwnagotchi.ui.display import Display
@ -34,10 +35,11 @@ if __name__ == '__main__':
plugins.load(config)
keypair = KeyPair()
display = Display(config=config, state={'name': '%s>' % pwnagotchi.name()})
agent = Agent(view=display, config=config)
agent = Agent(view=display, config=config, keypair=keypair)
logging.info("%s@%s (v%s)" % (pwnagotchi.name(), agent._identity, pwnagotchi.version))
logging.info("%s@%s (v%s)" % (pwnagotchi.name(), agent._keypair.fingerprint, pwnagotchi.version))
for _, plugin in plugins.loaded.items():
logging.debug("plugin '%s' v%s loaded from %s" % (plugin.__name__, plugin.__version__, plugin.__file__))
@ -64,7 +66,7 @@ if __name__ == '__main__':
time.sleep(1)
if Agent.is_connected():
plugins.on('internet_available', display, config, log)
plugins.on('internet_available', display, keypair, config, log)
else:
logging.info("entering auto mode ...")