Quantcast
Channel: انجمن گروه آشیانه - آموزش امنیت و راه های مقابله با هک
Viewing all articles
Browse latest Browse all 19202

ثبت نام خودکار در سایت wordpress.com

$
0
0
به یه اسکریپتی برای ثبت نام خودکار نیاز داشتم که توی اینجا پیداش کردم ولی منتها کار نکرد. برای همین تغییر دادمش و درستش کردم و اسکریپت صحیح رو برای دوستانی که احیانا نیاز بهش دارند اینجا می ذارم. در ضمن نحوه راه اندازی کد هم از همون صفحه ببینید
سوالی بود در خدمتم
با تشکر

کد:

<?php
set_time_limit(0);
$names=file('sites.txt');
foreach($names as $randomname){
signup($randomname);
sleep(5);
}


function signup($randomname){
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL,'https://en.wordpress.com/signup/');
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6");
curl_setopt ($ch, CURLOPT_REFERER, 'http://wordpress.com/signup/?ref=bigassorangeonleft');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_MAXREDIRS, 3); //follow up to 3 redirections - avoids loops
$data = curl_exec ($ch);
flush();
//echo $data;exit;


$pattern='/<input type=\'hidden\' name=\'signup_form_id\' value=\'(.*?)\'/si';
preg_match($pattern,$data,$match);
$signup_form_id=$match[1];

$pattern='/<input type=\"hidden\" id=\"_signup_form\" name=\"_signup_form\" value=\"(.*?)\"/si';
preg_match($pattern,$data,$match);
$_signup_form=$match[1];


$pattern='/<input type=\"hidden\" id=\"bundle_id\" name=\"bundle_id\" value=\"(.*?)\"/si';
preg_match($pattern,$data,$match);
$bundle_id=$match[1];


$randomname=trim($randomname);
$randomname=strtolower($randomname);
$tld='.wordpress.com';
$blogname=$randomname;
$user_name=$randomname;
$password=makeRandomPassword();

//change this
$user_email=$randomname.'@yoursite.com';



$poststring="form_type=blog&stage=&signup_form_id=$signup_form_id&_signup_form=$_signup_form&blogname=$blogname&tld=$tld&bundle_id=$bundle_id&user_name=$user_name&pass1=$password&user_email=$user_email&language=1&tos=1&Submit=Create Blog&form_type=blog";
//echo $poststring;exit;
curl_setopt ($ch, CURLOPT_POST, 1);curl_setopt ($ch, CURLOPT_POSTFIELDS, $poststring);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_MAXREDIRS, 3); //follow up to 3 redirections - avoids loops
$data = curl_exec ($ch);
flush();
curl_close($ch);
if(stristr($data,'Now Check Your E-mail to Complete Registration')){echo "http://$blogname.wordpress.com||$blogname||$password";}
}



function makeRandomPassword() {
  $salt = "abchefghjkmnpqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  srand((double)microtime()*1000000);
      $i = 0;
      while ($i <= 6) {
            $num = rand() % 45;
            $tmp = substr($salt, $num, 1);
            $pass = $pass . $tmp;
            $i++;
      }
      return $pass;
}

?>


Viewing all articles
Browse latest Browse all 19202

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>