Skip to content

Instantly share code, notes, and snippets.

@ricardojba
Created August 19, 2023 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ricardojba/4d87f1e58ff49712dbb134459a2e39e9 to your computer and use it in GitHub Desktop.
Save ricardojba/4d87f1e58ff49712dbb134459a2e39e9 to your computer and use it in GitHub Desktop.
ScanLolDrivers.ps1
# Powershell Core 7.3.6 tested
$lolDriversUri = 'https://www.loldrivers.io/api/drivers.json'
"Fetching loldriver list as json from $lolDriversUri"
$response = Invoke-RestMethod -Uri $lolDriversUri
$jsonObject = ConvertFrom-Json $response -AsHashTable
#Write-Host $jsonObject.Tags
"Obtained driver list from loldrivers.io, count is $($jsonObject.Count)"
"Scanning $scanPath for drivers (*.sys)"
$scanPath = "$env:windir\System32"
$driverList = Get-ChildItem -Path $scanPath -Recurse -Filter "*.sys" -ErrorAction SilentlyContinue | Select-Object Name, FullName
"Found $($driverList.Count) drivers"
ForEach ($driver in $driverList) {
if ($jsonObject.Tags.Contains($driver.Name)) {
"Found: $($driver.Name) at $($driver.FullName)"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment