03-29-2019 01:17 PM
I'm trying to build a script using the Python Library using the filtering example provided on Github, but I'm getting errors:
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from openVulnQuery import query_client >>> client = query_client.OpenVulnQueryClient(id, secret) >>> advisories = client.get_by_all(adv_format='cvrf', all_adv='all', LastUpdate(2019-03-01, 2019-03-28)) File "<stdin>", line 1 advisories = client.get_by_all(adv_format='cvrf', all_adv='all', LastUpdate(2019-03-01, 2019-03-28)) ^ SyntaxError: invalid token >>> adv = client.get_by_severity(adv_format='cvrf', severity='high', LastUpdate(2019-03-01, 2019-03-28)) File "<stdin>", line 1 adv = client.get_by_severity(adv_format='cvrf', severity='high', LastUpdate(2019-03-01, 2019-03-28)) ^ SyntaxError: invalid token >>> filter = client.LastUpdate(2019-03-01, 2019-03-28) File "<stdin>", line 1 filter = client.LastUpdate(2019-03-01, 2019-03-28) ^ SyntaxError: invalid token >>> adv = client.get_by_severity(adv_format='cvrf', severity='high', LastUpdate('2019-03-01', '2019-03-28')) File "<stdin>", line 1 SyntaxError: positional argument follows keyword argument >>> filter = client.LastUpdate('2019-03-01', '2019-03-28') Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'OpenVulnQueryClient' object has no attribute 'LastUpdate'
Solved! Go to Solution.