fix: on_internet_available plugins callback is now called for both MANU and AUTO mode (fixes #210)

This commit is contained in:
Simone Margaritelli
2019-10-08 14:54:03 +02:00
parent 1c526b0bf1
commit 55d99836e7
14 changed files with 139 additions and 102 deletions

View File

@ -55,11 +55,14 @@ def _upload_to_ohc(path, timeout=30):
raise e
def on_internet_available(display, keypair, config, log):
def on_internet_available(agent):
"""
Called in manual mode when there's internet connectivity
"""
if READY:
display = agent.view()
config = agent.config()
handshake_dir = config['bettercap']['handshakes']
handshake_filenames = os.listdir(handshake_dir)
handshake_paths = [os.path.join(handshake_dir, filename) for filename in handshake_filenames if filename.endswith('.pcap')]