mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
edit bettercap.py
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
@ -60,7 +60,7 @@ def closest_peer():
|
||||
return all[0] if len(all) else None
|
||||
|
||||
|
||||
def update_data(last_session):
|
||||
def update_data(last_session, plugin_data):
|
||||
brain = {}
|
||||
try:
|
||||
with open('/root/brain.json') as fp:
|
||||
@ -84,7 +84,8 @@ def update_data(last_session):
|
||||
'uname': subprocess.getoutput("uname -a"),
|
||||
'brain': brain,
|
||||
'version': pwnagotchi.__version__,
|
||||
'build': "Pwnagotchi-Torch by Jayofelony"
|
||||
'build': "Pwnagotchi-Torch by Jayofelony",
|
||||
'plugins': plugin_data
|
||||
}
|
||||
|
||||
logging.debug("updating grid data: %s" % data)
|
||||
|
@ -5,6 +5,7 @@ import importlib.util
|
||||
import logging
|
||||
import os
|
||||
import threading
|
||||
import pwnagotchi.grid
|
||||
|
||||
default_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "default")
|
||||
loaded = {}
|
||||
@ -130,6 +131,8 @@ def load(config):
|
||||
enabled = [name for name, options in config['main']['plugins'].items() if
|
||||
'enabled' in options and options['enabled']]
|
||||
|
||||
pwnagotchi.grid.update_data(None, enabled)
|
||||
|
||||
# load default plugins
|
||||
load_from_path(default_path, enabled=enabled)
|
||||
|
||||
|
@ -129,7 +129,7 @@ class Grid(plugins.Plugin):
|
||||
|
||||
with self.lock:
|
||||
try:
|
||||
grid.update_data(agent.last_session)
|
||||
grid.update_data(agent.last_session, None)
|
||||
except Exception as e:
|
||||
logging.error("error connecting to the pwngrid-peer service: %s" % e)
|
||||
logging.debug(e, exc_info=True)
|
||||
|
Reference in New Issue
Block a user