TNSCM (Tenable Nessus CLI Manager) by LimberDuck is a CLI tool which enables you to perform certain actions on Nessus by (C) Tenable, Inc. via Nessus API.
Initial version of TNSCM lets you perform actions like:
- plugin family list
- policy
- list
- delete
- scan
- list
- delete
- server info
- status
- licensed IPs
- version
- advanced settings list
- user list
To filter data to specific values you can use JMESPath.
Note: It's advisable to use python virtual environment for below instructions. Read more about python virtual environment in The Hitchhiker’s Guide to Python!
Read about virtualenvwrapper in The Hitchhiker’s Guide to Python!: virtualenvwrapper provides a set of commands which makes working with virtual environments much more pleasant.
-
Install TNSCM
pip install tnscm
To upgrade to newer version run:
pip install -U tnscm
-
Run TNSCM
tnscm
option / command | plugin |
policy |
scan |
server |
settings |
user |
---|---|---|---|---|---|---|
--help |
yes | yes | yes | yes | yes | yes |
--list |
yes | yes | yes | yes | ||
--list-family |
yes | |||||
--delete |
yes | yes | ||||
--filter |
yes | yes | yes | yes | yes | |
--format |
yes | yes | yes | yes | yes | |
--status |
yes | |||||
--ips |
yes | |||||
--version |
yes |
To check possible keys and values by returning only first entry:
--filter "[] | [0]" --format json
To get only name and id columns:
--filter "[].{id: id, name: name}"
To sort by id
column:
--filter "sort_by([], &id)[].{id: id, name: name}"
To filter returned data to these items which name
contain exampl
:
--filter "[? contains(name, 'exampl')].{id: id, name: name}"
To filter returned data to these items which name
contain exampl1
or exampl2
:
--filter "[? contains(name, 'exampl1') || contains(name, 'exampl2')].{id: id, name: name}"
To filter returned data to item which id
is equal to number 10
:
--filter '[?id==`10`].{id: id, name: name}'
To filter returned data to item which name
is equal to string test name
:
--filter "[?name == 'test name'].{id: id, name: name}"
To filter returned data to items which name
is different than string test name
:
--filter "[?name != 'test name'].{id: id, name: name}"
See CHANGELOG.
MIT: LICENSE.
Damian Krawczyk created TNSCM (Tenable Nessus CLI Manager) by LimberDuck.