#!/bin/bash
LINES=`cat $0 | wc -l`
let LINES=LINES-1
HASH=`head -${LINES} $0 | md5sum | tr -d " -"`
HASH="#"${HASH}
STORED=`tail -1 $0`
if [[ ${HASH} != ${STORED} ]] ; then
echo -e "\033[31mINVALID HASH! SCRIPT MODIFIED OR CORRUPTED! EXIT NOW\033[0m"
exit 1
fi
echo -e "\033[32mSimple selfprotected script\033[0m"
#0eb63c093c9be4cfb535c85e826fd9fa
(
Read more... )