PDA

View Full Version : Defaced cleaner!


tinyblob
01-27-2006, 08:50 AM
just knocked up a very quick php script which deletes our lovely new friends defacement comments.

it's simply:

require("includes/pixelpost.php");
require("includes/functions.php");
start_mysql();
$query = sql_query("DELETE FROM ".$pixelpost_db_prefix."comments WHERE message LIKE '%defaced%'");

which deletes comments including the word defaced.

find it attached, download it, unzip it, upload it, and navigate to the file with your web browser. you'll just get a blank page, but it should have done the job.

i've knocked this out reallllly quick because i'm at work, and have better things to do. so if it screws up your comments, unlucky. it worked for me ;)

sentinel
01-27-2006, 08:53 AM
adding words like "javascript" or "META" might help too, cause this two words are imho the "main problem"

tinyblob
01-27-2006, 09:04 AM
this is a file that should be run once, and deleted. adding more words doesn't actually matter, assuming the comment contains the word "defaced" it's going to delete it. if the comment doesn't contain "defaced" it's trivial to open this script in notepad and substitute another word :)

sentinel
01-27-2006, 09:07 AM
ahm true :)
*moving back to the edge he came from*

tinyblob
01-27-2006, 09:28 AM
you are right though, those are the more pertinent parts to check for.
it's just that this is intended to clean one specific issue, not check for potential ones :)

raminia
01-27-2006, 09:52 AM
To prevent further attacks try this provieded by blinking8s. I'm testing it on my photoblog now... works for me.
Replace the file includes/functions.php with this modified file function.php.

the patch is for pixelpost 1.5 Beta and 1.4.3. Please download the file according to your photoblog versiona and test it please.

eon
01-27-2006, 09:35 PM
That's cool, thank's!

blinking8s
01-27-2006, 09:38 PM
the patch ramin provided isnt our final solution...so please stay tuned for an announcement

raminia
01-29-2006, 07:33 PM
maybe
$query = sql_query("DELETE FROM ".$pixelpost_db_prefix."comments WHERE message LIKE '%<META%'"); would be better