subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
try: # 使用wttr.in查询天气 cmd = ["curl", "-s", f"wttr.in/{location}?format={format_type}"] result = subprocess.run(cmd, capture_output=True, text=True, timeout=10) if result.returncode == 0: return {- Confidence
- 95% confidence
- Finding
- result = subprocess.run(cmd, capture_output=True, text=True, timeout=10)
