import subprocess
command = ["wine"]
arguments = ['/root/Desktop/COLDHEART/exploits/eternalblue/Eternalblue-2.2.0.exe', ' --inconfig /root/Desktop/COLDHEART/exploits/eternalblue/Eternalblue-2.2.0.0.xml', '--targetip 0.0.0.0']
command.extend(arguments)
proc = subprocess.Popen(command, stdout=subprocess.PIPE).communicate()[0]
print(proc)
print("\n Done")
所以我使用subprocess.Popen从命令中获取输出。这个命令在运行两个程序,wine和eternalblue.exe。我需要将参数传递给eternalblue.exe,但是我得到了错误。它似乎采取任何参数,我通过,并试图使用它们的葡萄酒,而不是exe
根据Python文档
你只需要把你的论点分成两部分。例如, 'inconfig/root/Desktop/COLDHEART/exploits/eternalblue/eternalblue-2.2.0.0.xml'>;'在图','/root/Desktop/COLDHEART/exploits/eternalblue/eternalblue-2.2.0.0.xml'中
相关问题 更多 >
编程相关推荐