Thursday, June 08, 2006

Comment Spam - working example

Comment Spam is as old as the whole idea of blogging. In this article I will show you on an example, how to automatically put comments on WordPress blogs. On the bottom you will find a working script that does it.

The most common way of fighting the procedere of Comment Spam is putting the "rel=nofollow" parameter in <a> tag. It prevents search engines spiders from following such link. Ergo - spammers loose their motivation to spam. And most of them actually did. These days, comment spamming is nowhere near as popular as it used to be.

So why comment spam at all? Well - first: not all spiders follow the rule of not-following no-follow param ;-) Second: traffic. If you manage to create interesting comment (ideally - related to the content of the spammed post), and spam enough blogs... You can get some traffic.

Comment spamming WordPress blogs is easy as 1-2-3.
After reading this article all you will need is a server with PHP.

The script does the following things:

A - look for WP blogs in Yahoo
B - post a comment

A) The script has a basic list of 100 most popular words in english language. It takes 2 random words, then queries Yahoo for WP blogs containing those words. Normally spammers take Google results. But I don't wanna mess with my Biggest Friend.

B) Every post on WP has an ID. We don't really wanna be bothered with extracting it... we just take a random number between 10 and 30, and try to comment on post with that ID.

Just select the text below, save it as commenter.php, put it on the server and you can start your career as a comment spammer.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
<title>OnlineMarketingReport - SPAM 2.0 - Comment Spamming WordPress Blogs</title>
<style type="text/css">
body{background:#cccccc; text-align:center; margin:20px; font-family:arial; font-size:12px}
td{font-family:arial; font-size:12px}
<div style="margin:auto; background:white; border:1px solid black; width:400px; padding:10px">



print("Shall we <a href=\"?start\">BEGIN</a>?");

}else if(!isset($_POST["comment"])){



$header="GET /search?n=100&va_vt=any&p=".$key."".$num." HTTP/1.0\r\n";
$header.="Connection: close\r\n";

$return=explode("<a class=yschttl href=\"http://",$return);

}else $ind=5;


print("I have found <strong>".$count."</strong> blogs that contain those words: <strong>".str_replace("+"," </strong>or<strong> ",$key)."</strong><hr />");
print("<form action=\"\" method=\"post\">");
print("<table style=\"margin:auto\">");
print("<tr><td>name: </td><td><input type=\"text\" name=\"author\" /></td></tr>");
print("<tr><td>email: </td><td><input type=\"text\" name=\"email\" /></td></tr>");
print("<tr><td>url: </td><td><input type=\"text\" name=\"url\" /></td></tr>");
print("<tr><td>comment: </td><td><textarea name=\"comment\"></textarea></td></tr>");
print("<input type=\"hidden\" name=\"urls\" value=\"".$urls."\" />");
print("<input type=\"submit\" value=\"SPAM THEM!\" />");

}else if($_POST["author"]!="" and $_POST["email"]!="" and $_POST["url"]!="" and $_POST["comment"]!="" and $_POST["urls"]!=""){


print("If commens are not moderated,<br /> you can see your comments here: <br />\n<div style=\"text-align:left\"><ul>\n");

$header="POST /wp-comments-post.php HTTP/1.0\r\n";
$header.="Host: ".$urls[$ind]."\r\n";
$header.="Content-type: application/x-www-form-urlencoded\r\n";
$header.="Content-length: ".strlen($query)."\r\n";
$header.="Connection: close\r\n";

if(ereg(" 302 Found",$return) and ereg("Location: http://".$urls[$ind]."",$return)){
$spammed=explode("\r\nContent-type: ",$return);
$spammed=explode("Location: ",$spammed[0]);
print("<li><a href=\"".$spammed."\">".substr($spammed,0,50)."...</a></li>\n");
print("<br /><br /><a href=\"?start\">Do it again!</a>");

print("Why don't you just fill all fields? Hit browser's back button");



TAGS: , , ,

Social Bookmark Subscribe

The deal:

I had a dream... that my blog has backlinks from all possible top-level domains...

Collected baclinks

Not yet...

.aq, .aw, .ax, .az, .ba, .bb, .bd, .be, .bf, .bg, .bh, .bi, .bj, .bm, .bn, .bo, .br, .bs, .bt, .bv, .bw, .by, .bz, .ca, .cc, .cd, .cf, .cg, .ch, .ci, .ck, .cl, .cm, .cn, .co, .cr, .cu, .cv, .cx, .cy, .cz, .de, .dj, .dk, .dm, .do, .dz, .ec, .ee, .eg, .er, .es, .et, .eu, .fi, .fj, .fk, .fm, .fo, .fr, .ga, .gb, .gd, .ge, .gf, .gg, .gh, .gi, .gl, .gm, .gn, .gp, .gq, .gr, .gs, .gt, .gu, .gy, .hk, .hm, .hn, .hr, .ht, .hu, .id, .ie, .il, .im, .in, .io, .iq, .ir, .is, .it, .je, .jm, .jo, .jp, .ke, .kg, .kh, .ki, .km, .kn, .kr, .kw, .ky, .kz, .la, .lb, .lc, .li, .lk, .lr, .ls, .lt, .lu, .lv, .ly, .ma, .mc, .md, .mg, .mh, .mk, .ml, .mm, .mn, .mo, .mp, .mq, .mr, .ms, .mt, .mu, .mv, .mw, .mx, .my, .mz, .na, .nc, .ne, .nf, .ng, .ni, .nl, .no, .np, .nr, .nu, .nz, .om, .pa, .pe, .pf, .pg, .ph, .pk, .pl, .pm, .pn, .pr, .ps, .pt, .pw, .py, .qa, .re, .ro, .ru, .rw, .sa, .sb, .sc, .sd, .se, .sg, .sh, .si, .sj, .sk, .sl, .sm, .sn, .so, .sr, .st, .su, .sv, .sy, .sz, .tc, .td, .tf, .tg, .th, .tj, .tk, .tl, .tm, .tn, .to, .tp, .tr, .tt, .tv, .tw, .tz, .ua, .ug, .uk, .um, .us, .uy, .uz, .va, .vc, .ve, .vg, .vi, .vn, .vu, .wf, .ws, .ye, .yt, .yu, .za, .zm, .zw