php based vbulletin leech script

Discussion in 'PHP' started by Aatma, Nov 25, 2008.

  1. #1
    I have a php based leech script consisting of 3 files to leech from one forum to post on another.
    The code is similar to what I have posted below. Can someone please help me configure it to work?
    All I want to know where to enter or change username to leech from abc.com and post to another board xyz.com
    <?php
    function xtremelogin($username,$password){
    $post_fields =array(
    'vb_login_username' => $username,
    'vb_login_password' => $password,
    'do' => "login",
    's' => '',
    );
    $url = "http://abc.com/login.php";
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_POST, 4);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch,CURLOPT_COOKIEJAR,"cookie1.txt");
    $result= curl_exec ($ch);
    curl_close ($ch);
    }
    function xtremepost($subject,$message,$forumid){
    $ch3 = curl_init();
    curl_setopt($ch3,CURLOPT_URL,"http://xyz.com/newthread.php?do=newthread&f=" . $forumid);
    curl_setopt($ch3,CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch3,CURLOPT_CONNECTTIMEOUT,"120");
    curl_setopt ( $ch3, CURLOPT_HEADER, false );
    curl_setopt($ch3,CURLOPT_COOKIEFILE,"cookie1.txt");
    $souvik12345 = curl_exec($ch3);
    $error=curl_error($ch3);
    curl_close($ch3);
    preg_match('%name="securitytoken" value="(.*)"\ /\>%',$souvik12345,$security123);
    $post_fields123 =array(
    'subject' => $subject,
    'message' => nl2br($message),
    'wysiwyg' => 1,
    'iconid' => 0,
    'securitytoken' => $security123[1],
    'f' => $forumid,
    'do' => 'postthread',
    'posthash' => '8d8769e64433fd28ad72a4a86cb8d808',
    'loggedinuser' => '1',
    'sbutton' => 'Submit New Thread',
    'parseurl' => '1',
    );

    $ch2 = curl_init();
    curl_setopt($ch2,CURLOPT_URL,"http://xyz.com/newthread.php?do=newthread&f=" . $forumid);
    curl_setopt($ch2,CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch2, CURLOPT_POST, 4);
    curl_setopt($ch2, CURLOPT_POSTFIELDS, $post_fields123);
    curl_setopt($ch2,CURLOPT_CONNECTTIMEOUT,"120");
    curl_setopt ( $ch2, CURLOPT_HEADER, false );
    curl_setopt($ch2,CURLOPT_COOKIEFILE,"cookie1.txt");
    $souvik123 = curl_exec($ch2);
    $error=curl_error($ch2);
    curl_close($ch2);
    }
    ?>
     
    Aatma, Nov 25, 2008 IP
  2. Aatma

    Aatma Well-Known Member

    Messages:
    1,233
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    130
    #2
    so I guess this is tuff nut to crack
     
    Aatma, Dec 5, 2008 IP