Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-09-01 19:56:17

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

[request] Simple Admin Plugin: Pre-Flight Check Notifications

One of the easiest ways to hack sites is to append nefarious PHP files to some of TXP’s core files like index.php and config.php. However, Textpattern’s diagnostics tab shows when a core TXP file has been altered, allowing site owners to quickly identify the naughty bits of code. Would it be possible to write a small plugin that fires off an e-mail to those of Publisher status when one of these changes occur?


Kevin
(graphicpush)

Offline

#2 2010-09-01 20:09:16

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: [request] Simple Admin Plugin: Pre-Flight Check Notifications

An admin-only plugin is only active if someone is logged in and active on the admin side. A better solution would be to use a cron job. Simply create an md5 checksum file containing checksums for all the files you want to check, then run md5sum --quiet -c /path/to/checksum_file from your crontab. The quiet part ensures that it doesn’t generate output (= no email) while the files are still the same.

Offline

#3 2010-09-01 20:15:01

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: [request] Simple Admin Plugin: Pre-Flight Check Notifications

OK, I literally only understood like half the words you just wrote. :)

Any good tutorials / references I can read to start building this? Happy to do it myself, but if you have recommendations on good learning resources, I’m all ears.


Kevin
(graphicpush)

Offline

Board footer

Powered by FluxBB