USB Scan Antivirus
USB Scan Antivirus
I made this script to clean USB Drives:
usbscan.sh:
#!/bin/bash # Author: Albertux (Alberto Isaac Ayala Esquivias) # Email: <albertoi7@gmail.com> # Web: http://www.AyalaSoft.com # # First install clamav: sudo apt-get install clamav # copy usbcan.desktop on /home/$USER/Desktop # copy usbscan on /home/$USER/bin/ # # This script tested on Debian or Ubuntu USB="sdb1" # check first using mount command or cat /etc/mtab IFS=$'\t\n' LIGHT_RED="\033[1;31m" LIGHT_GREEN="\033[1;32m" LIGHT_BLUE="\033[1;34m" YELLOW="\033[1;33m" NORMAL="\033[0m" echo -e "${LIGHT_GREEN}" echo "# # #### #### #### #### ### # #" echo "# # # # # # # # # ## #" echo "# # ### #### # ### # ##### # # #" echo "# # # # # # # # # # ##" echo " ### #### #### #### #### # # # #" echo -e "${NORMAL}" echo -n "Inserte el USB y precione [Enter]" read sleep 5 USB_TMP=`cat /etc/mtab | grep $USB | awk '{print $2}'` USB_PATH=`echo $USB_TMP | sed -e 's/\\\040/ /g'` if [ -z $USB_PATH ]; then echo -en "\n${LIGHT_RED}AVIZO!${NORMAL} \"USB no detectado, precione [Enter]\"" read exit fi echo -e "\nUSB localizado en [${LIGHT_BLUE}$USB_PATH${NORMAL}]" echo -e "\n${YELLOW}AVIZO!${NORMAL} \"No desconecte el USB hasta que se le indique\"\n" clamscan --remove --infected --recursive $USB_PATH > usbscan.log 2> usbscan.err.log umount /dev/sdb1 echo -en "\n${YELLOW}LISTO!${NORMAL} \"Puede desconectar el USB, precione [Enter]\"" read
usbscan.desktop:
[Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Terminal=true Icon[en_US]=gnome-panel-launcher Exec=/home/aayala/usbscan.sh Name[en_US]=USB SCAN Name=Antivirus Icon=/home/aayala/bin/.virus.png
eicar.com (virus test file):
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
virus.png:

Notes:
The scan is slow but efective



Recent Comments