Skip to content

Instantly share code, notes, and snippets.

@pitchinnate
Last active September 16, 2025 02:01
Show Gist options
  • Select an option

  • Save pitchinnate/991e69d7388bab63fa02e7c306394fc0 to your computer and use it in GitHub Desktop.

Select an option

Save pitchinnate/991e69d7388bab63fa02e7c306394fc0 to your computer and use it in GitHub Desktop.
Search for eslint-config-prettier malware
Get-ChildItem -Path "c:/" -Recurse -Directory -Force -ErrorAction SilentlyContinue |
Where-Object { $_.Name -in @("eslint-config-prettier", "eslint-plugin-prettier", "snyckit", "@pkgjs/core", "napi-postinstall", "@ctrl/tinycolor") } |
ForEach-Object {
$pkg = Join-Path $_.FullName 'package.json'
if (Test-Path $pkg) {
$ver = (Get-Content $pkg | ConvertFrom-Json).version
$validVersions = @{
"eslint-config-prettier" = @("8.10.1", "9.1.1", "10.1.6", "10.1.7")
"eslint-plugin-prettier" = @("4.2.2", "4.2.3")
"snyckit" = @("0.11.9")
"@pkgjs/core" = @("0.2.8")
"napi-postinstall" = @("0.3.1")
"@ctrl/tinycolor" = @("4.1.2")
}
if ($ver -in $validVersions[$_.Name]) {
Write-Host "Path: $($_.FullName)"
Write-Host "Version: $ver"
Write-Host ""
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment