Skip to content

Instantly share code, notes, and snippets.

@lap00zza
Created September 5, 2018 18:56
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 lap00zza/8c9ee31431c464d46efc59047df4f13c to your computer and use it in GitHub Desktop.
Save lap00zza/8c9ee31431c464d46efc59047df4f13c to your computer and use it in GitHub Desktop.
A simple shell wrapper for Windows Defender (tested with msys2/mintty)
#!/bin/sh
# A simple shell wrapper for Windows Defender
defender_path="/c/Program Files/Windows Defender/MpCmdRun.exe"
if [ $1 == "--help" ]
then
echo "Usage:"
echo " ./defender_scan /full/path/to/file_or_directory"
echo "Note:"
echo "- Don't end directory with /"
echo "- Looks like symlinks cant be resolved"
else
"$defender_path" -Scan -ScanType 3 -File $1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment