diff options
author | noraj | 2023-09-02 12:09:48 +0200 |
---|---|---|
committer | noraj | 2023-09-02 12:09:48 +0200 |
commit | 6a69de24875ef6df204e94b3a51dd29933fbc96c (patch) | |
tree | 4bb1b48d71e78829ba38c2a3993bc59e9eaf279b | |
parent | c3a7e941ce2bf315b3b7b30da4fe244b3f99acbf (diff) | |
download | aur-6a69de24875ef6df204e94b3a51dd29933fbc96c.tar.gz |
10.6.0
+ link finder in ruby
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rwxr-xr-x | get_nessus_link.rb | 35 |
3 files changed, 41 insertions, 6 deletions
@@ -1,6 +1,6 @@ pkgbase = nessus pkgdesc = Nessus vulnerability scanner - pkgver = 10.5.4 + pkgver = 10.6.0 pkgrel = 1 url = https://www.tenable.com/downloads/nessus install = nessus.install @@ -8,11 +8,11 @@ pkgbase = nessus license = custom makedepends = inetutils depends = gnupg - source = nessus-10.5.4-fc34.x86_64.rpm::https://www.tenable.com/downloads/api/v1/public/pages/nessus/downloads/20390/download?i_agree_to_tenable_license_agreement=true + source = nessus-10.6.0-fc34.x86_64.rpm::https://www.tenable.com/downloads/api/v1/public/pages/nessus/downloads/20623/download?i_agree_to_tenable_license_agreement=true source = nessus.desktop source = nessus.sh source = LICENSE - b2sums = e0f9d476e86581e458dcb38c35c96e4887d3f8bbaf7e0076f2c103f1b6981e70191d8d79fbd921a3fe06f62f2bf1bacb2fee930284e471ba8d2612ada089f92b + b2sums = 33cc8ffd0ea816621c6a833aab33dfb83bcba65dba642cf9f475a85f9ab1e9648a0454b537a61357cd98d79c6286658f12d7e604f4ad12fdb738194732b82446 b2sums = e9f6346d0c2b444c71f0673a9dd22f4298abf1ccc4500fa2db4439627844106e3d523cda976411aa243f56711b691a12ac228809cdae038371607db11a44dd61 b2sums = fbc6b44c6722e48b26011314d3cd2a44780ef94965db159ef1a35743e371927ec4927a9da2db9ebbb9714fc3a0a30fa4d785b23aa76e4a8a1e446a515fc1bcdd b2sums = 2c68d4f30686a711fbf5c77b70d9b307f9fdcc8095cea79d8c310edfeea87563d94b9106fce35fc53685e6703afb729b9d81f504a1983c367621605690ea03e1 @@ -4,7 +4,7 @@ # Contributor: xsmile pkgname=nessus -pkgver=10.5.4 +pkgver=10.6.0 pkgrel=1 pkgdesc="Nessus vulnerability scanner" arch=('x86_64') @@ -13,11 +13,11 @@ makedepends=('inetutils') license=('custom') url="https://www.tenable.com/downloads/nessus" install=${pkgname}.install -source=("nessus-${pkgver}-fc34.x86_64.rpm::https://www.tenable.com/downloads/api/v1/public/pages/nessus/downloads/20390/download?i_agree_to_tenable_license_agreement=true" +source=("nessus-${pkgver}-fc34.x86_64.rpm::https://www.tenable.com/downloads/api/v1/public/pages/nessus/downloads/20623/download?i_agree_to_tenable_license_agreement=true" nessus.desktop nessus.sh LICENSE) -b2sums=('e0f9d476e86581e458dcb38c35c96e4887d3f8bbaf7e0076f2c103f1b6981e70191d8d79fbd921a3fe06f62f2bf1bacb2fee930284e471ba8d2612ada089f92b' +b2sums=('33cc8ffd0ea816621c6a833aab33dfb83bcba65dba642cf9f475a85f9ab1e9648a0454b537a61357cd98d79c6286658f12d7e604f4ad12fdb738194732b82446' 'e9f6346d0c2b444c71f0673a9dd22f4298abf1ccc4500fa2db4439627844106e3d523cda976411aa243f56711b691a12ac228809cdae038371607db11a44dd61' 'fbc6b44c6722e48b26011314d3cd2a44780ef94965db159ef1a35743e371927ec4927a9da2db9ebbb9714fc3a0a30fa4d785b23aa76e4a8a1e446a515fc1bcdd' '2c68d4f30686a711fbf5c77b70d9b307f9fdcc8095cea79d8c310edfeea87563d94b9106fce35fc53685e6703afb729b9d81f504a1983c367621605690ea03e1') diff --git a/get_nessus_link.rb b/get_nessus_link.rb new file mode 100755 index 000000000000..bbf3b27fbbb7 --- /dev/null +++ b/get_nessus_link.rb @@ -0,0 +1,35 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# To install the prerequisites, use the command below: +# pacman -S ruby-nokogiri + +require 'json' +require 'nokogiri' +require 'open-uri' + +def get_json + res = URI.open('https://www.tenable.com/downloads/nessus') + doc = Nokogiri::HTML(res) + json = doc.at_css('#__NEXT_DATA__').content + JSON.parse(json) +end + +def get_link + data = get_json + url, filename = nil + downloads = data['props']['pageProps']['page']['downloads'] + downloads.each do |download| + filename = download['file'] + if filename.end_with?('-fc34.x86_64.rpm') + url = "https://www.tenable.com/downloads/api/v1/public/pages/nessus/downloads/#{download['id']}/download?i_agree_to_tenable_license_agreement=true" + break + end + end + raise 'Cannot find a download link!' if url.nil? + + puts filename + puts url +end + +get_link if __FILE__ == $PROGRAM_NAME |