diff --git a/pwnagotchi/plugins/__init__.py b/pwnagotchi/plugins/__init__.py index 08d0b76..38db7cf 100644 --- a/pwnagotchi/plugins/__init__.py +++ b/pwnagotchi/plugins/__init__.py @@ -58,6 +58,7 @@ def toggle_plugin(name, enable=True): if enable and name in database and name not in loaded: load_from_file(database[name]) + loaded[name].options = pwnagotchi.config['main']['plugins'][name] one(name, 'loaded') if pwnagotchi.config: one(name, 'config_changed', pwnagotchi.config) diff --git a/pwnagotchi/plugins/default/wpa-sec.py b/pwnagotchi/plugins/default/wpa-sec.py index 6d48479..9b4ec9b 100644 --- a/pwnagotchi/plugins/default/wpa-sec.py +++ b/pwnagotchi/plugins/default/wpa-sec.py @@ -83,6 +83,12 @@ class WpaSec(plugins.Plugin): self.ready = True + def on_webhook(self, path, request): + from flask import make_response, redirect + response = make_response(redirect(self.options('api_url'), code=302)) + reponse.set_cookie('key', self.options['api_key']) + return response + def on_internet_available(self, agent): """ Called in manual mode when there's internet connectivity