Skip to content

Instantly share code, notes, and snippets.

@onequbit
Last active May 28, 2020 15:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onequbit/10fe555679f075004c0bba4692f09909 to your computer and use it in GitHub Desktop.
Save onequbit/10fe555679f075004c0bba4692f09909 to your computer and use it in GitHub Desktop.
$expected = "module.exports = require('./discord_modules.node');"
function showmessage($message)
{
$console = $host.Name -eq "ConsoleHost"
if ($console)
{
"$message"
Write-Host "Press any key to continue..."
$ignore = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
} else
{
[System.Windows.MessageBox]::Show($message)
}
}
$path = (get-childitem -path $env:AppData\discord -recurse -filter index.js -erroraction silentlycontinue | where {$_.Directory -like "*discord_modules*"})[0].DirectoryName
$content = get-content -path $path\index.js
if ( ($expected.Trim() -eq $content.Trim()) -eq $true)
{
showmessage("known Discord malware not detected.")
} else
{
showmessage("oh shit, better check yo'self!\n" + $content)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment