subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
result = subprocess.run(["wg", "show"], capture_output=True, text=True) if result.returncode == 0 and len(result.stdout) > 0: # Interface is up - sync config without restarting result = subprocess.run( ["sudo", "wg", "syncconf", "wg0", str(CONFIG_FILE)], capture_output=True, text=True- Confidence
- 89% confidence
- Finding
- result = subprocess.run( ["sudo", "wg", "syncconf", "wg0", str(CONFIG_FILE)], capture_output=True, text=True )
