[nycphp-talk] Determine if your site has been defaced
sbeam
sbeam at onsetcorps.net
Wed Oct 8 16:53:33 EDT 2008
On Wednesday 08 October 2008 16:39, Dan Cech wrote:
> Jeff Siegel wrote:
> > Anyone know of a PHP script that can be run from a cron and which can
> > check whether a website has been defaced?
>
> cURL + preg would do the trick I'd imagine.
interesting :) but yeah PHP is not needed.
also md5/sha1 might do the trick, combined with curl
GOODHASH=399257fc956120012baf094ffd7eed9b; \
HASH=`curl -s www.yoursite.com | md5sum`; \
if [ "$HASH" != "$GOODHASH" ]; then mail -s "uh-oh" you at yoursite.com; fi
where you first get the value of "GOODHASH" with the same command as in HASH
above.
enjoy,
Sam
More information about the talk
mailing list
Automatic Email Organization without missing anything!