Looking through my blog stats I saw that one of my old articles was still getting a lot of views – the one about downloading an offline copy of the Malwarebytes definitions file.
I decided to write a quick version 2 of the script so that it can now run natively in PowerShell without any third party tools (wget) – it’s also easier to understand and slightly more elegant only requiring four lines to do the job.
$version = Invoke-WebRequest -URI http://data-cdn.mbamupdates.com/v0/database/version.check $defrules = "http://data-cdn.mbamupdates.com/v0/database/data/rules" + "." +$version.Content + ".ref" $destination = "rules.ref" Invoke-WebRequest $defrules -OutFile $destination
Without any modifications, this will save the rules.ref file in the same directory the script is run from.
Download the script below or simply copy the code above and paste it in a new file with the .ps1 extension.