Random vbulltien php curl auto poster

wingchun3

Newbie
Joined
Nov 1, 2008
Messages
26
Reaction score
11
Heres a little php curl script that i made the other day that auto posts random messages across vbulltein forums


the idea of this php script is to random generate a thread number then tag on a generic post to that thread , saying something like, thanks for info, cool thats nice, that info helped me, just like random thank you messages etc etc

once you have then made hunderds or thousands of posts in a forum you can go back into the usr cp and add in your sig etc, of course linking into your site(s), or use something like the link in a simily in the posts , like mentioned here on the forums

edit the config variables at the top of the script

1: you will of course first need to sign up to a vbulltein forum

2: enter in your username and password


3: enter the forum url

4: look at the amount of threads in the forum and change the rand number generater to the max amount of threads ( also its good to set the lower number in the random number generater to a few thousand under the max amount so your not posting to threads that are years old)

5: then just point your browser to the script and it will randomly post to a forum you have entered in the config variables

6: in vbposter.php also change the curl path to cookies , 'C:xampphtdocscurlbotcookies.txt'); //cookies.txt, you will need to change this to your path where cookies are stored, notice the backward slashes are remove, you need to re enter them if you testing this on a windows box, or change this to somthing like /tmp in linux servers


LIB_parse.php
Code:
<?php


/***********************************************************************
$value = return_between($string, $start, $end, $type)                   
-------------------------------------------------------------           
DESCRIPTION:                                                            
        Returns a substring of $string delineated by $start and $end    
        The parse is not case sensitive, but the case of the parsed     
        string is not effected.                                         
INPUT:                                                                  
        $string         Input string to parse                           
        $start          Defines the beginning of the sub string         
        $end            Defines the end of the sub string               
        $type           INCL: include delineators in parsed string      
                        EXCL: exclude delineators in parsed string      
***********************************************************************/
function return_between($string, $start, $stop, $type)
    {
    $temp = split_string($string, $start, AFTER, $type);
    return split_string($temp, $stop, BEFORE, $type);
    }

?>
 
Last edited:
change these varabiles

$post_site = "http://forums.scumpoint.com"; // vb forum to target
$post_username = "spambot22"; // your vb forum id
$post_pass = "spammy333"; // your vb forum password
$ptopic = rand(1004799, 1084799); // post to random topic edit to min and max post counts
all 'C:xampphtdocscurlbotcookies.txt'); //cookies.txt instances

vbposter.php - rename to index.php or whatever

Code:
<?
# Initialization
include("LIB_parse.php");                       // parse library


set_time_limit(3600);                           // Don't let PHP timeout

// posting config options

$post_site = "http://forums.digitalpoint.com"; // vb forum to target
$post_username = "spambot22";                  // your vb forum id
$post_pass = "spammy333";                     // your vb forum password


$post_password = md5($post_pass);
//$message = "thanks+for+the+info+sounds+like+a+really+good+idea";


$messages = array(
"thanks+for+the+info+it+has+pointed+me+in+the+right+direction", 
"this+is+really+great+info+i+will+be+trying+something+similar", 
"i+was+really+having+problems+with+something+similar+to+this+thanks+for+the+info", 
"thanks+for+the+info+sounds+like+a+really+good+idea",
"i+have+similar+problems+myself"
);
$message = $messages[array_rand($messages, 1)];

$ptopic = rand(1004799, 1084799);  // post to random topic edit to min and max post counts

// end posting config options

// post to VBSITE
	$targetlogin = $post_site . "/login.php?do=login";
	$ch = curl_init();
         
	curl_setopt($ch, CURLOPT_COOKIEJAR, 'C:xampphtdocscurlbotcookies.txt'); //cookies.txt
	curl_setopt($ch, CURLOPT_COOKIEFILE, 'C:xampphtdocscurlbotcookies.txt'); //cookies.txt
	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_POST, 1);
         
// Hit the login page to authenticate
	curl_setopt($ch, CURLOPT_URL,$targetlogin);
	curl_setopt($ch, CURLOPT_POSTFIELDS, 'vb_login_username='.$post_username.'&vb_login_password=&s=&do=login&vb_login_md5password='.$post_password.'&vb_login_md5password_utf='.$post_password.'');

	curl_exec($ch);


sleep(2);



	$target = $post_site . "/newreply.php?do=newreply&noquote=1&p=" . $ptopic;
	$Ch = curl_init();
	curl_setopt ($Ch, CURLOPT_COOKIEJAR, 'C:xampphtdocscurlbotcookies.txt'); //cookies.txt
	curl_setopt ($Ch, CURLOPT_COOKIEFILE, 'C:xampphtdocscurlbotcookies.txt'); //cookies.txt
	curl_setopt ($Ch, CURLOPT_URL, $target);
	curl_setopt ($Ch, CURLOPT_HEADER, 0);
	curl_setopt ($Ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt ($Ch, CURLOPT_FOLLOWLOCATION, 1);
	//curl_close($Ch);
	//$result= curl_exec ($Ch);
	//curl_close ($Ch);
	//print $result;
	$gotPage = curl_exec ($Ch);


#parse the hidden tags form download page
$t_tag = return_between ( $string = $gotPage , $start ="<input type="hidden" name="t"", $end = " />", $type = EXCL );
#remove the "'s and "vaule=" text to reveal value
$t = str_replace(""", "", $t_tag);
$t = str_replace("value=", "", $t); 

$posthash_tag = return_between ( $string = $gotPage , $start ="<input type="hidden" name="posthash"", $end = " />", $type = EXCL );
$posthash = str_replace(""", "", $posthash_tag);
$posthash = str_replace("value=", "", $posthash); 

$poststarttime_tag = return_between ( $string = $gotPage , $start ="<input type="hidden" name="poststarttime"", $end = " />", $type = EXCL );
$poststarttime = str_replace(""", "", $poststarttime_tag);
$poststarttime = str_replace("value=", "", $poststarttime); 

$loggedinuser_tag = return_between ( $string = $gotPage , $start ="<input type="hidden" name="loggedinuser"", $end = " />", $type = EXCL );
$loggedinuser = str_replace(""", "", $loggedinuser_tag);
$loggedinuser = str_replace("value=", "", $loggedinuser); 



         
//   Now hit the posting page to post the event
	$ptarget = $post_site . "/newreply.php?do=newreply&noquote=1&p=" . $ptopic;
	$ch = curl_init();
	curl_setopt ($ch, CURLOPT_COOKIEJAR, 'C:xampphtdocscurlbotcookies.txt'); //cookies.txt
	curl_setopt ($ch, CURLOPT_COOKIEFILE, 'C:xampphtdocscurlbotcookies.txt'); //cookies.txt
	curl_setopt ($ch, CURLOPT_URL, $ptarget);
	curl_setopt ($ch, CURLOPT_POSTFIELDS, 'title=&message='.$message.'&wysiwyg=0&iconid=0&s=&do=postreply&t='.$t.'&p='.$ptopic.'&posthash='.$posthash.'&poststarttime='.$poststarttime.'&loggedinuser='.$loggedinuser.'&multiquoteempty=&sbutton=Submit+Reply&emailupdate=0&rating=0');
	curl_setopt ($ch, CURLOPT_HEADER, 0);
	curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
	//curl_exec($ch);
	$result= curl_exec ($ch);
	curl_close ($ch);
	print $result;




echo "<br> $post_site<br> username - $post_username , password - $post_pass , passmd5 - $post_password<br />";



?>
 
Last edited:
vbposter.php - with securitytoken in the forms


Code:
<?
# Initialization
include("LIB_parse.php");                       // parse library


set_time_limit(3600);                           // Don't let PHP timeout

// posting config options

$post_site = "http://other-vb-forum.com"; // vb forum to target
$post_username = "spambot222";                  // your vb forum id
$post_pass = "spampass321";                     // your vb forum password


$post_password = md5($post_pass);
//$message = "thanks+for+the+info+sounds+like+a+really+good+idea";


$messages = array(
"thanks+for+the+links+it+has+pointed+me+in+the+right+direction", 
"this+is+really+great+i+will+be+trying+it", 
"i+was+really+looking+for+something+similar+to+this", 
"thanks+for+the+links+looks+like+really+good+stuff",
"i+have+been+looking+for+this+for+ages"
);
$message = $messages[array_rand($messages, 1)];



// end posting config options

$ptopic = rand(27858, 427858);  // post to random topic edit to min and max post counts



// post to VBSITE
	$targetlogin = $post_site . "/login.php?do=login";
	$ch = curl_init();
	
             curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3');
	curl_setopt($ch, CURLOPT_COOKIEJAR, 'C:xampphtdocscurlbotcookies.txt'); //cookies.txt
	curl_setopt($ch, CURLOPT_COOKIEFILE, 'C:xampphtdocscurlbotcookies.txt'); //cookies.txt
	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($ch, CURLOPT_POST, 1);
         
// Hit the login page to authenticate
	curl_setopt($ch, CURLOPT_AUTOREFERER, true);
	curl_setopt($ch, CURLOPT_URL,$targetlogin);
	curl_setopt($ch, CURLOPT_POSTFIELDS, 'vb_login_username='.$post_username.'&vb_login_password=&s=&securitytoken=guest&do=login&vb_login_md5password='.$post_password.'&vb_login_md5password_utf='.$post_password.'');

	curl_exec($ch);


sleep(2);



	$target = $post_site . "/newreply.php?do=newreply&noquote=1&p=" . $ptopic;
	curl_setopt($ch, CURLOPT_POST, false);
	$gotPage = curl_exec ($ch);
	

#parse the hidden tags form download page

$securitytoken_tag = return_between ( $string = $gotPage , $start ="<input type="hidden" name="securitytoken"", $end = " />", $type = EXCL );
#remove the "'s and "vaule=" text to reveal value
$securitytoken = str_replace(""", "", $securitytoken_tag);
$securitytoken = str_replace("value=", "", $securitytoken); 


$t_tag = return_between ( $string = $gotPage , $start ="<input type="hidden" name="t"", $end = " />", $type = EXCL );
$t = str_replace(""", "", $t_tag);
$t = str_replace("value=", "", $t); 

$posthash_tag = return_between ( $string = $gotPage , $start ="<input type="hidden" name="posthash"", $end = " />", $type = EXCL );
$posthash = str_replace(""", "", $posthash_tag);
$posthash = str_replace("value=", "", $posthash); 

$poststarttime_tag = return_between ( $string = $gotPage , $start ="<input type="hidden" name="poststarttime"", $end = " />", $type = EXCL );
$poststarttime = str_replace(""", "", $poststarttime_tag);
$poststarttime = str_replace("value=", "", $poststarttime); 

$loggedinuser_tag = return_between ( $string = $gotPage , $start ="<input type="hidden" name="loggedinuser"", $end = " />", $type = EXCL );
$loggedinuser = str_replace(""", "", $loggedinuser_tag);
$loggedinuser = str_replace("value=", "", $loggedinuser); 



         
//   Now hit the posting page to post the event
	$ptarget = $post_site . "/newreply.php?do=newreply&noquote=1&p=" . $ptopic;
	curl_setopt ($ch, CURLOPT_URL, $ptarget);
	curl_setopt ($ch, CURLOPT_POSTFIELDS, 'title=&message='.$message.'&wysiwyg=0&iconid=0&s=&securitytoken='.$securitytoken.'&do=postreply&t='.$t.'&p='.$ptopic.'&posthash='.$posthash.'&poststarttime='.$poststarttime.'&loggedinuser='.$loggedinuser.'&multiquoteempty=&sbutton=Submit+Reply&emailupdate=0&rating=0');
	curl_setopt ($ch, CURLOPT_HEADER, 0);
	curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
	//curl_exec($ch);
	$result= curl_exec ($ch);
	curl_close ($ch);
	print $result;


echo "<br> $post_site<br> username - $post_username , password - $post_pass , passmd5 - $post_password<br />";



?>
 
This is some useful code, if you could combine this with a captcha killer it would make a killing
 
one way to use this kind of auto poster is to place a small 1 pixel frame at the bottom of a site you run, then when users hit your site, there automaticly posting to a random thread in a target forum without the even noing about it

or you could make like various different versions for various vb forums and just add a meta refresh to post to one forum, then move onto the next, then the next then back to beginning, leaving it running posting loads of random comments to threads

warning don't over do it tho, if you arget larger sites and are posting lots of follow ups to threads, the webmaster might notice all yur comments are the same

a good idea is to expand the message cmments array to alot more random words, so all you message posts look like real comments

if you traget smaller forums that are less popular and not montiored correctly you could get away with lots of posts in a short time period, then wait a few days then go in and change your sig to add some link to you site or something
 
nice, I personally dont mind the captcha too much but it would be cool if you added a search, auto singup, and email verifier.:D
 
This is some useful code, if you could combine this with a captcha killer it would make a killing

thanks seomanifest

i thought this would just be usefull for comment spamming, in effct if your commenting to already posted threads your less likely to be noticed

i did test the code on digatialpoint forums, posting to random threads , but there mods over there noticed me staright away and banned me forum 'just posting for the sake of posting' - i made around 50 posts and had the min post count set to zero, so i was posting to threads like from 2005 etc, which is a sure way to draw attension to yourself

a better option is to find the most recent posts, use that number as the max and just set the min to a few hunded under this so your just posting to recent topics

as for the capthca problem , if you simply go around vb forums a register lots of accounts your bypassing this, i no its not ideal, as a captcha slover, could expand this code to register and then post

simply going around the forums and regstering 5-10 accounts on each is a good idea for something like this , it of course does take alittle time but the more accounts you have the better

then make up say 5-10 pages calling random accounts to post to , your less likely to be noticed then
 
This line

Code:
$t_tag = return_between ( $string = $gotPage , $start ="<input type="hidden" name="t"", $end = " />", $type = EXCL );

contains T_STRING error....
 
nice, I personally dont mind the captcha too much but it would be cool if you added a search, auto singup, and email verifier.:D

i do not really no how to add a auto signup as you need to eneter a capthca on vb forums to sign up , you whould need a capthca slover for this

a serch could be easily added to this to search for say specfic topics then post to a target thread that macthes the serach string but the only problem then is you whoul end up posting to all the same topics

i thought it was much simpler just to generate randon thread ( most recent) and post comments to them, if you look a most forums poeple normaly just say random thing like thanks, good info etc, so using this kind of script that way whould not draw attension to yourself


a email verifer is really not needed in this kind of small script as all your doing is posting to random threads with the intension of going back in a few days/weeks and adding a sig link to draw traafic of search engines into your sites - of course make sure all the forums your targeting allow links in the sigs

in the message post you could simply add the simley link hack , so you make comments with a simley which has your link in it


this code is very very simple and could be modifed alot more, i was hoping poeple use it and help devlope it more in order to make it better, let me no if you use it, if you run into any problems with the forums fields that are filled out simply use the live header addon to firefox to debug the code to add any extra fields that other vb might use that you come across
 
This line

Code:
$t_tag = return_between ( $string = $gotPage , $start ="<input type="hidden" name="t"", $end = " />", $type = EXCL );

contains T_STRING error....

hold on i will just test this out , and see what the problem is

was that with the vbposter.php - with securitytoken or the one without

i think the problem is with LIB_parse.php

try removing the ?> from the end of it
 
Last edited:
the problem is with the code comment block here on the forum

it removes all backword slashes

$start ="<input type="hidden" name="securitytoken""

in these strings there should be back slahes before the all " inside the string the first and last " do not need back slahes but all the "'s inside the string need black shales to aviod parse errors

i will post the code up on rapidshare to download to aviod these problems, either add the black shashes or wait a minute and i will post the code for download on rapid share
 
Last edited:
wingchun3 thank you very much for this PHP code, i'm in the making
of a bot that logs to WPMU blog and turns on XML-RPC posting and
this will save me many hours. Thanks :)
 
can we pass my computers IP instead of the server's IP
for doing this task ?
is this possible ?
 
can we pass my computers IP instead of the server's IP
for doing this task ?
is this possible ?
install xampp on your computer
enable curl
open the php file, it uses your own computer IP
 
i made this script on xampp

you could just try using the curl headers to change your browser info, but if the forum is recording ip's or tracking them you might end up having all the same ips in posts

most of the time you should not run into problems, if your posting 100 comments to threads one after the other, like 30 secound gaps, the mods of the larger forums will spot what your doing right away

the best way to use this kind of script is to set up say 10-20 forums hit one forum, then move to the next, the next the next, the return to the first

also don't just have one account on the forum, have a hole bunch and randomize the posting to different accounts per forum

also make up so good random comments , thats the key, so you don't get spotted

also remeber to go into your admi cp and add a litlle comment to your sig, no link to start just a random plain text sig that looks ok, then once you have built up a good amount of posts log back in and add a link into your sig

or if you don't care about that, just try posting replys to threads with your links in them

what we rely need now is a good list of forums to target, and maybe this scrip modded to post to other forum types, ie phppbb, smf , ipb etc

i was thinking of moving all the code into a function to make it easyier to handle, so you can simply call the function in a page with the form url, user, pass and post count min and max details, this whould simplify the process and easly allow newer vb forums to be added

anyone who wants to help out let us no
 
Back
Top