1、在用python执行sqlmap批量扫描时,文件名带中文,os.popen命令执行失败。
def Cmd_Sqlmap(self,path,b="疑似存在注入汇总.txt"):
filename = os.path.join(path,b)
os.chdir("E:\Python27\sqlmap")
cmd="python sqlmap.py -m "+filename+' --random-agent --level=3 --threads="3" --batch --users --tables'
print(cmd)
p = os.popen(cmd.encode('gb2312').decode('gb2312'))
print(p.read())
我在filename里有中文 ,代码应该没写错吧,命令执行失败了 ,求指教