【发布时间】:2020-07-25 08:31:24
【问题描述】:
我对 Python 还不是很了解,但我遇到了以下问题(我正在学习一门 Python 应用于安全的课程)。
在我的 Windows 10 机器上安装了 Python 2.7.17 版本。
然后我有这个非常简单的脚本:
#!/usr/env/bin python
import subprocess
command = "msg you have been hacked !!!"
# Popen() continue the program and doesn't wait that the command is completly finished to terminate the script execution:
subprocess.Popen(command, shell=True)
问题是当我尝试执行它时,我得到了这个错误:
C:\Users\myuser\Desktop\python_evil>python execute_command.py
C:\Users\myuser\Desktop\python_evil>you inesistente o disconnesso
这个错误对我来说似乎很奇怪(一半是英语(你),一半是意大利语)。基本上它说:你不存在或断开连接
为什么?怎么了?我错过了什么?如何解决此问题并正确执行此命令?
【问题讨论】:
-
这不是一个关于 Python 的问题,而是一个关于
msg程序的问题。
标签: python python-2.7 subprocess