Changed the directory
Changed the directory where it looks for handshakes to /home/pi.
This commit is contained in:
parent
d179cd9fcf
commit
a92916d2b0
@ -86,14 +86,14 @@ class HandshakesDL(plugins.Plugin):
|
|||||||
return "Plugin not ready"
|
return "Plugin not ready"
|
||||||
|
|
||||||
if path == "/" or not path:
|
if path == "/" or not path:
|
||||||
handshakes = glob.glob(os.path.join(self.config['bettercap']['handshakes'], "*.pcap"))
|
handshakes = glob.glob(os.path.join("/home/pi", "*.pcap"))
|
||||||
handshakes = [os.path.basename(path)[:-5] for path in handshakes]
|
handshakes = [os.path.basename(path)[:-5] for path in handshakes]
|
||||||
return render_template_string(TEMPLATE,
|
return render_template_string(TEMPLATE,
|
||||||
title="Handshakes | " + pwnagotchi.name(),
|
title="Handshakes | " + pwnagotchi.name(),
|
||||||
handshakes=handshakes)
|
handshakes=handshakes)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
dir = self.config['bettercap']['handshakes']
|
dir = "/home/pi"
|
||||||
try:
|
try:
|
||||||
logging.info(f"[HandshakesDL] serving {dir}/{path}.pcap")
|
logging.info(f"[HandshakesDL] serving {dir}/{path}.pcap")
|
||||||
return send_from_directory(directory=dir, filename=path+'.pcap', as_attachment=True)
|
return send_from_directory(directory=dir, filename=path+'.pcap', as_attachment=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user