Skip to content

Commit

Permalink
tweak nessus agent download recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
jgstew committed Feb 8, 2024
1 parent 3f15e4c commit 779dbad
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
18 changes: 16 additions & 2 deletions Tenable/Nessus-Agent-Win64.download.recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,34 @@ Description: Downloads the latest Nessus Windows 64bit agent
Identifier: com.github.jgstew.download.Nessus-Agent-Win64
Input:
NAME: Nessus-Agent-Win64
MinimumVersion: '2.3'
MinimumVersion: "2.3"
Process:
- Processor: com.github.jgstew.SharedProcessors/URLTextSearcher
Arguments:
url: https://www.tenable.com/downloads/nessus-agents?loginAttempted=true
re_pattern: '"id":(?P<id>\d+),"file":"NessusAgent-(?P<version>\d+\.\d+\.\d+)\-x64.msi"'

- Processor: URLDownloaderPython
Arguments:
url: https://www.tenable.com/downloads/api/v1/public/pages/nessus-agents/downloads/%id%/download?i_agree_to_tenable_license_agreement=true
# NOTE: the filename isn't in the url tail
prefetch_filename: True
filename: Nessus-x64.msi
# NOTE: `www.tenable.com/downloads` doesn't seem to provide etag or last modified header info so we can't be smart about this
COMPUTE_HASHES: True
User_Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0
CHECK_FILESIZE_ONLY: True
download_version: "%version%"

- Processor: EndOfCheckPhase

# get SourceReleaseDate from HTTP `Last-Modified` header:
- Processor: com.github.jgstew.SharedProcessors/DateTimeFromString
Arguments:
# parse last_modified header info from URLDownloaderPython
datetime_string: "%last_modified%"
datetime_strptime: "%a, %d %b %Y %H:%M:%S %Z"
datetime_strftime: "%Y-%m-%d"
datetime_parsed_name: SourceReleaseDate

# get version from MSI:
- Processor: com.github.jgstew.SharedProcessors/FileMsiGetProperty
10 changes: 0 additions & 10 deletions Tenable/Nessus-Agent-Win64.versionwin.recipe.yaml

This file was deleted.

0 comments on commit 779dbad

Please sign in to comment.