CiscoPSIRT / openVulnAPI

Documentation and Tools for Cisco's PSIRT openVuln API
https://developer.cisco.com/psirt/
MIT License
102 stars 52 forks source link

openVulnQuery._library.advisory.AdvisoryDefault object at 0x03BA2530 #65

Closed anahmu closed 5 years ago

anahmu commented 5 years ago

Hi, I have the following code as per the example but and am getting the following response:

Code:

from openVulnQuery import query_client

query_client = query_client.OpenVulnQueryClient(client_id="****", client_secret="*****")

advisories = query_client.get_by_year(year=2010, adv_format='default')

for a in advisories: print(a)

Response:

<openVulnQuery._library.advisory.AdvisoryDefault object at 0x03BA2530>

Any assistance is appreciated, the client_id and secret have been validated by running openvulquery directly from the console.

Thanks

Marcussjogren commented 5 years ago

Hi,

I know the post is old, but I post the answer anyway in case someone else runs in to the same issue.

You have to print the attribute and not the object. For example: print(a.advisory_id).

santosomar commented 5 years ago

Thank you @Marcussjogren !

santosomar commented 5 years ago

Hi,

I know the post is old, but I post the answer anyway in case someone else runs in to the same issue.

You have to print the attribute and not the object. For example: print(a.advisory_id).

Closing as the solution has been provided by @Marcussjogren .