ignore_user_abort(1);
set_time_limit(0);
$url = "http://site.com/";
$postfields = array("action" => "submit", "author" => "test", "email" => "mymail@gmail.com",
"comment_post_ID" => 14, "comment" => "Very Interesting post",
"url" => "http://myspamsite.com'",
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url."wp-comments-post.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
curl_setopt($ch, CURLOPT_USERAGENT, "User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Widows NT");
curl_setopt($ch, CURLOPT_REFERER, "http://google.com/");
curl_setopt($ch, CURLOPT_HEADER, 0);
$result = curl_exec($ch);
curl_close($ch);
?>
----
That's all. Of course, with this script isn't a lot of spaming, and just captcha can stoped it. These things are best done on a compiled language or python/perl.
Post written for educational purposes. The author assumes no liability for the use of the script.
Source: https://www.devbattles.com/en/sand/post-287-Make+spam+bot+for+WordPress
1 comment:
Wordpress cms are easier than others so developer and designer like to work on it. However, you need to contact WordPress development company to have the website that has the good interface.
Post a Comment