【发布时间】:2018-01-22 10:26:01
【问题描述】:
The Python library for searching certificate logs 的文档很少。如何使用它来搜索日志并检索可理解的内容?
我能找到的最接近的方法是运行 dashboard.py 或 simple_scan.py,但 simple_scan.py 会抛出此错误:
File "/certificate-transparency/python/ct/client/tools/simple_scan.py", line 35, in run
if not FLAGS.output:
NameError: global name 'FLAGS' is not defined
这是没有意义的,因为 FLAGS 是 gflags 的一部分,而 gflags 是在脚本中导入的。
dashboard.py 抛出此错误:
File "/certificate-transparency/python/ct/dashboard/dashboard.py", line 141, in <module>
with open(FLAGS.ctlog_config, "r") as config:
IOError: [Errno 2] No such file or directory: 'ct/config/logs.config'
ct/config/logs.config 绝对存在。我认为这是 PYTHONPATH 问题,但 ct 的父目录 python 位于 PYTHONPATH 中。
理想情况下,我不会将此库用作脚本,而是用作库。我想我基本上可以从脚本中剪切和粘贴我需要的东西,但是由于脚本根本不起作用,我不清楚我需要什么脚本才能运行!
我完全看不到如何处理这件事的指导。作为另一个例子,我觉得我可以使用类似async_client 的东西,但除了获取某物并以某种方式作为服务器运行之外,它到底在做什么还不清楚。
有什么想法吗?我该如何解决这个问题?
【问题讨论】:
标签: certificate python certificate-transparency