mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2026-03-12 21:02:52 -07:00
fix(fix_services): remove unused Popen in on_ready (resource leak)
on_ready opens a subprocess.Popen to read journalctl but never uses the result. The Popen object is never closed, leaking a file descriptor and zombie process on every startup. Signed-off-by: PwnPacker <4704376+CoderFX@users.noreply.github.com>
This commit is contained in:
@@ -105,8 +105,6 @@ class FixServices(plugins.Plugin):
|
||||
def on_ready(self, agent):
|
||||
if self.is_disabled:
|
||||
return
|
||||
last_lines = ''.join(list(TextIOWrapper(subprocess.Popen(['journalctl', '-n10', '-k'],
|
||||
stdout=subprocess.PIPE).stdout))[-10:])
|
||||
try:
|
||||
cmd_output = subprocess.check_output("ip link show wlan0mon", shell=True)
|
||||
logging.debug("[Fix_Services ip link show wlan0mon]: %s" % repr(cmd_output))
|
||||
|
||||
Reference in New Issue
Block a user