Skip to content

Instantly share code, notes, and snippets.

@mcrisc
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save mcrisc/fbdbeecbcb08d67d6291 to your computer and use it in GitHub Desktop.

Select an option

Save mcrisc/fbdbeecbcb08d67d6291 to your computer and use it in GitHub Desktop.
Simple script for scanning pen drives for common security threats from Windows world
#!/bin/bash
if [ $# -lt 1 ]; then
echo "usage: $0 <directory>"
exit 1
fi
TARGET_DIR=$1
echo "Running clamscan..."
clamscan -rv --bell --exclude='\.(JPG|jpg|MPG|mpg)' $TARGET_DIR
echo "done."
echo
echo "Searching for *.{ini,inf,bat,cmd}... "
find $TARGET_DIR -iname "*.ini" -or -iname "*.inf" -or -iname "*.bat" -or -iname "*.cmd"
echo "done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment