列出目录中的对象#并将它们一起添加

时间:2016-06-02 08:44:56

标签: python-2.7

我试图添加在目录中提供数字对象的变量并将它们一起添加

import commands    
fuzzer1 = commands.getoutput("ls -1 /usr/haxxor/fuzzers/windows/browser | wc -l")

fuzzer2 = commands.getoutput("ls -1 /usr/haxxor/fuzzers/windows/os | wc -l ")
fuzzer3 = commands.getoutput("ls -1 /usr/haxxor/fuzzers/mac_os/browser | wc -l ")
fuzzer4 = commands.getoutput("ls -1 /usr/haxxor/fuzzers/mac_os/os | wc -l")
fuzzer5 = commands.getoutput("ls -1 /usr/haxxor/fuzzers/linux/browser | wc -l")
fuzzer6 = commands.getoutput("ls -1 /usr/haxxor/fuzzers/linux/os | wc -l")
fuzzer7 = commands.getoutput("ls -1 /usr/haxxor/fuzzers/misc/browser | wc -l")
fuzzer8 = commands.getoutput("ls -1 /usr/haxxor/fuzzers/misc/os | wc -l")
module1 = commands.getoutput("ls -1 /usr/haxxor/modules/scanning | wc -l")
module2 = commands.getoutput("ls -1 /usr/haxxor/modules/dns | wc -l")
module3 = commands.getoutput("ls -1 /usr/haxxor/modules/enumeration | wc -l")
list_fuzzers = (fuzzer1 + fuzzer2 + fuzzer3 + fuzzer4 + fuzzer5 + fuzzer6 + fuzzer7 + fuzzer8)

但我一直得到100000的总和

0 个答案:

没有答案