Get the URL of the latest matching Nessus Agent Download.
Tenable has no "latest" URL for downloading a Nessus Agent installer. They also somewhat frequently drop previously available downloads from their site.
Get the URL for the latest Amazon Linux / Amazon Linux 2 agent RPM installer for x86_64:
./nessus-agent-url '-amzn.x86_64.rpm'
Returns something like this:
https://www.tenable.com/downloads/api/v1/public/pages/nessus-agents/downloads/16733/download?i_agree_to_tenable_license_agreement=true
Scripted download in Bash:
curl --location --remote-name --remote-header-name "$(./nessus-agent-url '-amzn.x86_64.rpm')"
Or more compactly if you prefer:
curl -LOJ "$(./nessus-agent-url '-amzn.x86_64.rpm')"
For your platform only:
go build .
For a configurable selection of platforms in the Makefile:
make compile