pyTenable icon indicating copy to clipboard operation
pyTenable copied to clipboard

[Tenable.sc] Defining multiple tuples in "filter" for sc.plugins.list

Open stiong-p opened this issue 1 year ago • 2 comments

Hi Team,

I am looking to list out plugins within a specified time range, based on plugin modified date. Single filter works fine.

plugins = sc.plugins.list(
        fields=['id','name','pluginModDate'],
        filter=('pluginModDate','gte','1692399599'))
for plugin in plugins:
        print(plugin)

However, it spits out all the plugins with the following: filter=(('pluginModDate','gte','1692399599')and('pluginModDate','lte','1692489599'))

1692399599 = Friday, August 18, 2023 10:59:59 PM GMT 1692489599 = Saturday, August 19, 2023 11:59:59 PM GMT

What am I missing? Please kindly advise.

If multiple conditions for the same filter parameter cannot be made, are there other workarounds?

Thank you.

stiong-p avatar Aug 21 '23 03:08 stiong-p

The API seems to support multiple filters and pyTenable doesn't. Adding this as an enhancement to do to pyTenable.

aseemsavio avatar Aug 24 '23 10:08 aseemsavio