Baracchino-Della-Scuola / Bot

Audit: Starting a process with a partial executable path BAN-B607
Security
Minor
5 months ago2 years old
Starting a process with a partial executable path
26
27    async def on_ready(self):
28        print("Running. Printing wd")
29        os.system("pwd")30        self.staff_chat = self.get_channel(907937553343209472)
31        dotenv.load_dotenv(".env")
32        self.host = os.getenv("DB_HOST")
Starting a process with a partial executable path
196            return
197        await ctx.send("Restarting...")
198        await self.staff_chat.send(f"{ctx.author.mention} has restarted the bot.")
199        subprocess.call("python3 main.py", shell=True)200        self.bot.close()
201
202    @commands.command(name="rename", alias=["ren"], description="Rename a file")