os.system() or os exec-family call
High
- Category
- Dangerous Code Execution
- Content
print(f"Starting HTTP server from {media_dir}...") if platform.system() == "Windows": # Start server and save PID to file os.system(f'start /b python -m http.server {HTTP_PORT} --directory "{media_dir}"') # On Windows, we can't easily get the PID of start /b, so just track by port # The stop_http_server will use port-based killing as fallback else:- Confidence
- 98% confidence
- Finding
- os.system(f'start /b python -m http.server {HTTP_PORT} --directory "{media_dir}"')
