.: ShaolinTiger - Kung-Fu Geekery :.

Did Your Coppermine Gallery (CPG) Get Spammed? Eww Spam..

Mine did, really it sucks!

Anyway if yours did too, you can get rid of all the spam in a few seconds, go to your control panel or however you get to phpMyAdmin on your server (or command line MySQL interface), whichever you are comfortable with and run this SQL statement:


DELETE FROM `cpgXXX_comments`
WHERE
msg_body LIKE '%cialis%'
OR msg_body LIKE '%viagra%'
OR msg_body LIKE '%tinyurl%'
OR msg_body LIKE '%og-seote%'
OR msg_body LIKE '%custom-tshirts%'

cpgXXX will be whatever your table prefix is for coppermine, depending on when you installed it, mine is cpg131_

You will also have to adjust the words for example OR msg_body LIKE '%custom-tshirts%' can be changed to OR msg_body LIKE '%YOUR_SPAMWORD%' you can just keep adding OR statements on following lines according to any of the words that uniquely identify the spam comments.

I mean don't go deleting everything with 'the' in it for example.

Yah spammers are using tinyurl to spam their dirty generic viagra pills too, abusing a free service.

I hope it doesn't effect legitimate users.

6 comments

Ok So…What the F&#@ is a PING? And How do I Ping?

Seems like some people don't know what a Ping is, which is fair enough really..

Some know what it is, sort of, but don't know how to intepret the results.

So here's a quick run-down.

Good Ping

Here's what my work ping to google.com looks like now:

Work Ping

As you can see, it's pretty constant around the 300ms mark, with no "Request timed out".

Bad Ping

When I was in Brunei and people were using Peer to Peer software in the hotel, my connection looked like this:

Brunei Hotel Connection

As you can see there are many "Request timed out" and high ping times.

Ok so how do I interpret this?

As you can see in the first either picture there are multiple similar lines in the format:

Reply from 64.233.187.99: bytes=32 time=300ms TTL=241

Reply from THE SERVER YOU PINGED bytes=SIZE OF PING time=PING TIME TTL=IGNORE

A ping is basically a packet containing a bunch of junk (1-10 and a-z) or something like that, a packet is just a small peice of data sent over the Internet.

When another machine receives your ping packet, it will send back a reply, the purpose of the ping is to time this whole process.

That's the time= part shown above, the time taken for the packet you sent to get a reply.

So it's a basic metric for the quality of service your Internet connection is giving you.

Request Timed Out

If you see the "Request timed out" shown in the Bad Ping section above, it means you got no reply at all, which is called a dropped packet. This is bad, and means there is a failure somewhere, and either your packet isn't reaching the destination, or you aren't getting a reply.

Ping Times

500ms = 1/5 second (1000ms = 1 second).

  • A normal time for streamyx would be 250-300ms
  • At peak times it seems to be around 500-600ms
  • When it's really bad its 800-1200ms
  • If it's above 1000ms trying restarting your connection

Ok, so how do I Ping?

Ok to ping something, go to the Start - Run menu option and type cmd:

Start - Run

Then press enter, you'll see a DOS prompt come up.

In the prompt type:

ping google.com -t

And press enter.

Ping -t

You'll see the ping running, the -t argument tells it to ping constantly, so it won't stop untill you press CTRL+C.

Ping Statistics

It'll then give you a summary of the Ping statistics for that session.

You can also try pinging yahoo.com, I usually get slightly better times for Yahoo! than Google.

If you ping streamyx.com you should get something like 20-50ms.

If you want to read more about Ping and some of the options, check Wikepedia - Ping.

20 comments