Skip to content

Instantly share code, notes, and snippets.

@symm
Last active February 14, 2021 13:06
Show Gist options
  • Save symm/3c9003d52d7c2f04809104142da7be21 to your computer and use it in GitHub Desktop.
Save symm/3c9003d52d7c2f04809104142da7be21 to your computer and use it in GitHub Desktop.
MD5 (NessusAgent-6.10.2-es7.x86_64.rpm) = 0a42d5838aac2e468663463e1133a6e3
9cd362cd591eda8626ef96bdf9ece2220ee8a5c4 NessusAgent-6.10.2-es7.x86_64.rpm
#!/bin/bash
TOKEN=$(curl -L -s https://www.tenable.com/products/nessus/agent-download | pup 'div#timecheck text{}')
FILE="NessusAgent-6.10.2-es7.x86_64.rpm"
URL="https://downloads.nessus.org/nessus3dl.php?file=$FILE&licence_accept=yes&t=$TOKEN"
echo $URL
@ghanima
Copy link

ghanima commented Mar 3, 2017

This example works amazingly well... but if you going to use CURL you need to you the -L flag to follow the redirect that the model link points too.

I hope this helps and thanks for putting this in a GIST.

@symm
Copy link
Author

symm commented Apr 30, 2017

Cheers, updated with the -L flag 👍

@kitsushadow
Copy link

This doesn't work on Centos7

@ee07dazn
Copy link

ee07dazn commented Feb 14, 2021

Cheers, updated with the -L flag 👍

@symm : TOKEN=$(curl -L -s https://www.tenable.com/products/nessus/agent-download | pup 'div#timecheck text{}') line output is blank...could you please tell me what to expect from -- pup 'div#timecheck text{}' like if you can show me a sample?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment