Created
August 19, 2023 21:04
-
-
Save ricardojba/4d87f1e58ff49712dbb134459a2e39e9 to your computer and use it in GitHub Desktop.
ScanLolDrivers.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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