CHALLENGE - download file from web if local file version is older than in the web

hi all,
a little challenge for everyone :slight_smile:
I;m trying to create task/fixlet that conditionally will download and install latest version of wireshark.
the condition should be only if the latest version in the web is newer than the installed version on server.
so getting the installed version on server I’m achieving by querying:

value "ProductVersion" of version block of file "c:\program files\wireshark\wireshark.exe"

the question now is how should I compare the local file version vs the online?

regards,

The Bigfix dynamic download could help to solve your challange. See:
https://developer.bigfix.com/action-script/guide/dynamic_download.html

Couple of questions:

Does the URI of the download file remain constant or does it change for each released version?

Do you really want to install the latest version, untested, or do you want to have a known and tested minimum version (and then then have to maintain the fixlet as you approve new versions)?

I saw that the URI changes for each version, it’s wireshark…
I do want to install the latest version, I have no fear of bugs for wireshark :slight_smile:
the issue is that our InfoSec team demands all 3rd party apps to be updated with latest versions, otherwise we should uninstall them from servers.
so I’m trying to automate this task.
also, I want the task/fixlet to show only relevant servers (servers with version installed is older than the one online)

If the URI changes I’m not sure how you could code up something that predicts what the current latest and greatest URI will be. Dynamic downloads can read a file with that information, but you would still have to keep that updated. Also, the dynamic download is part of the script, not part of the relevance for the fixlet and/or action.

Correct, the dynamic download doesn’t address the requirement of making the fixlet relevant only where required. An alternative way is to build a new fixlet for each new version of “wireshark” . The fixlet must contain the relevance to check the version on the targets. You can use a .bes fixlet template (xml file) and a script program to customize it. Your script should be capable to monitor the wireshsrk download site and replace the relevant information (URL, sha, size, version…) in the .bes template. The script can finally call the rest API “import” to import the fixlet into a site.