Skip to content

Commit

Permalink
creating flag features
Browse files Browse the repository at this point in the history
  • Loading branch information
brian committed Jun 26, 2018
1 parent 30201f9 commit 7623427
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions minerchk.sh
Expand Up @@ -65,6 +65,31 @@ else echo -e "$yell Newer version of Minerchk available, please use option 5 to
sleep 10
fi

####### Flags for other options ######

while getopts "d:" opt;do
case ${opt} in
d ) direct=$OPTARG
echo $scanhead
if [[ -x $(which clamscan) 2>/dev/null ]] ; then #use clamav and yara
echo -e "$gre ClamAV installed using clamscan for scanning \n"
clamscan -ir --no-summary -l $log -d /usr/local/minerchk/miners.yar $direct
else
echo $scanhead
grep -R 'stratum+tcp' $direct 1>> $log 2> /dev/null
fi
exit 0;;

\? ) echo "Usage: -d scan a directory for miners, otherwsie use without flags to bring up the mail menu"
exit 0;;
esac
done






#drop environment data into logs for easier identification
header > $log
hostname >> $log
Expand Down

0 comments on commit 7623427

Please sign in to comment.