屏蔽wordpress垃圾留言

On 2011年01月15日, in tips, by netoearth

I tried a quick & dirty way to get rid of massive wordpres spamming.

  1. In your wordpress directory: mv wp-comments-post.php any_other_name.php
  2. grep -r "wp-comments-post.php" .
  3. edit the files grep returned
  4. ???
  5. Profit!

Now I only got 1 or 2 spams everyday. And the best part is you can

awk '/wp-comments-post\.php HTTP\/1.1\" 404/{print $1}' /var/log/http_server_access_log

to harvest the lamest spammer’s IP and black list them 🙂

Here a list of (> 100) spam IP from my blog history:

113.142.9.160 808
113.142.9.35 778
183.62.126.8 718
208.94.117.216 705
112.95.240.189 698
113.142.9.125 683
183.62.126.7 683
119.147.6.94 677
121.14.95.213 646
113.142.9.124 642
113.142.9.126 609
121.14.77.217 585
113.142.8.15 481
77.232.66.20 408
119.147.6.207 364
119.147.6.209 359
119.147.14.6 351
121.14.95.97 332
124.115.2.119 332
119.147.14.68 328
121.14.95.94 325
124.115.2.120 322
119.147.18.178 320
222.73.75.252 299
222.73.75.245 290
222.73.74.235 287
118.123.232.11 276
58.60.12.86 273
58.60.12.59 268
58.251.58.191 267
58.60.12.166 266
98.255.41.41 259
58.60.12.165 241
125.39.52.166 238
124.115.10.254 237
58.251.150.81 235
58.60.12.58 232
58.60.12.93 221
58.60.12.89 216
58.61.33.12 205
124.115.10.252 192
89.151.116.53 189
74.55.84.162 155
211.43.152.61 132
174.129.218.229 113
127.0.0.1 110
173.13.167.169 109

Comments are closed.