因此,对于我的工作,我被要求为 McAfee 学习 Python……无论如何,我找不到任何像样的文档,所以我想我会在这里添加我的笔记,看看任何人都可以改进我的解决方案。
无论如何,我一直收到以下错误:
Error/reason: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)>
我的代码在下面,删除了私人信息
import mcafee
mc = mcafee.client("172.16.153.194", "8443","admin","password")
#code specific to this task
input = "mytag" #
systems = mc.system.find(input)#Search text can be IP address, MAC address, user name, agent GUID or tag
#The above uses the System Tree for searching
for system in systems:
#The below file contains EPOComputerProperties
#the file is in the for loop to all each device to produce results
for each property
file = open('C:/.../.../.../myquery.txt')
for i in file:
id = system[i.rstrip('\n')]
print id
print ""
file.close()