This commit is contained in:
dadav 2020-04-18 13:02:42 +02:00
parent 81db495f33
commit e436dc8b8e
2 changed files with 7 additions and 0 deletions

View File

@ -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)

View File

@ -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