From 3b72519827f5ae0bc106e9764ecae071aadc8549 Mon Sep 17 00:00:00 2001 From: Paulo Ferraz Date: Thu, 2 Jun 2022 14:59:42 -0300 Subject: [PATCH] Enhancement #3 - Removing exec() vulnerable function --- src/honeybot/gui_manager.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/honeybot/gui_manager.py b/src/honeybot/gui_manager.py index 98c6186..e693cae 100644 --- a/src/honeybot/gui_manager.py +++ b/src/honeybot/gui_manager.py @@ -1,10 +1,8 @@ from tkinter import * import tkinter as tk import os -import inspect -import configparser -import queue import threading +import subprocess as sp window = tk.Tk() window.geometry("650x670") @@ -55,7 +53,7 @@ def run_bot(): global rbot_thread def run_it(): - exec(open("run.py").read()) + sp.run(["python", "run.py"]) rbot_thread = threading.Thread(target=run_it) rbot_thread.start()