Jump to content
Ketarin forum

Tip: A note on github changes: include-fragment element


Recommended Posts

Good evening folks!

If you have apps from Github you'll notice that many are not parsing anymore the last few days. This is because many apps on Github are now using a bleeding edge feature, "include-fragment", which will collect the contents of another URL and inject it into the body of the generated page, effectively creating a client-side include.

In all the apps I've tested (only about a dozen right now) the downloads are being pulled from a subfolder of "/releases/" called "/expanded_assets/" with either release or tag and the release or tag name. If you're having problems with a Github download, I'd recommend a two-step download using /latest then collecting the /expanded_assets/ address then collect the download address from that as you normally would.

Link to comment
Share on other sites

I've been reviewing and updating all 102 of my github-sourced apps and every single one of the first 20 suffer from the include-fragment change. Worse yet, many of them are incapable of opening the fragment URL directly - but work when using Kuppet. This is going to be a long night.

Link to comment
Share on other sites

  • 1 month later...

I updated all my Github apps back when I created this thread and just now had to create a couple more. The list below are sample Github variables. This relies on Kuppet (though it might not always be necessary). The {version}, {sdownloadsource} and {sdownloadstub} each use "content from url (regex)". The other two use "textual content".

{version} variable:
url:   https://github.com/VirusTotal/yara/releases/latest
pattern:   releases/tags?/v?([\d\.]+)

{sdownloadsource} variable:
url:   https://github.com/VirusTotal/yara/releases/latest
pattern:   "([^'"\s]+expanded_assets[^'"\s]+)"

{sdownloadstub} variable:
url:   {>}{sdownloadsource}
pattern:   (/[^'"]+download/v{version}[^'"]+.zip)

{sdownload} variable:
text:   https://github.com{sdownloadstub}

{schangelog} variable:
text:   https://github.com/VirusTotal/yara/releases/latest

The {sdownloadstub} is the actual file pattern pulled from the new expanded_assets path. While this pattern will work for some, you'll need to update it for most apps.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.