Jump to content

What can I do to shorten this script


BRADERY

Recommended Posts

<?PHP
/////////////////////////////////////////////////////////
///////////// SCRIPT SETTINGS ///////////////////////////
/////////////////////////////////////////////////////////
$iLoginsFile = "logins.txt"; // filename where account logins are stored.
$iListID = ""; // IDs TO LIST
$iListID2 = "";
$iListID3 = "";
$iListID4 = "";
$iListID5 = "";
$iListID6 = "";
$iListID7 = "";
$iListID8 = "";
$iListID9 = "";
$iListID10 = "";
$iListID11 = "";
$iListID12 = "";
$iListID13 = "";
$iListID14 = "";
$iListID15 = "";
$iListID16 = "";
$iListID17 = "";
$iListID18 = "";
$iListID19 = "";
$iListID20 = "";
$iListID21 = "";
$iListID22 = "";
$iListID23 = "";
$iListID24 = "";
$iListID25 = "";
$iListID26 = "";
$iListID27 = "";
$iListID28 = "";
$iListID29 = "";
$iListID30 = "";
$iListID31 = "";
$iListID32 = "";
$iListID33 = "";
$iListID34 = "";
$iListID35 = "";
$iBounty = 100000000;
/////////////////////////////////////////////////////////
///////each account on its own line /////////////////////
///////email pass seperated by only a space /////////////
/////////////////////////////////////////////////////////
echo "::: STARTING PROGRAM, GRABBING ACCOUNTS :::\n";
$iLogins = file($iLoginsFile, FILE_SKIP_EMPTY_LINES);
if(!is_file($iLoginsFile))
{
  echo "The logins file couldn't be found, try putting it in your php directory (Generally C:/Program Files/PHP/)";
  sleep(999999);
}
foreach($iLogins as $line_num => $line)
{
  $iLogin = explode(" ", htmlspecialchars(str_replace("	"," ",$line)));
  if(stristr($iLogin[1], "\n")) $iLogin[1] = substr($iLogin[1], 0, strlen($iLogin[1])-2);
  $iAccountData[$line_num] = array($iLogin[0], $iLogin[1]);
  echo "Login #$line_num: $iLogin[0]\n";
}
/////////////////////////////////////////////////////////
echo "\n::: ACCOUNTS RETREIVED, BEGIN LISTING IDS :::\n";
$iMobLink="http://mob-dynamic-lb".rand(1,5).".mobsters0".rand(1,9).".com/mob/";
for($i=0; $i!=count($iAccountData); $i++)
{
  echo "\n::: ".strtoupper($iAccountData[$i][0])." :::\n";
  if($iAccountData[$i][1] != "" && stristr($iAccountData[$i][0], "@") && stristr($iAccountData[$i][0], "."))
  {
    list($iStore[0],$iStore[1],$iStore[2],$iStore[3]) = iAuthorize($iAccountData[$i], $iMobLink);
    if($iStore[2] > 1 && strlen($iStore[3]) == 40)
    {
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "1: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID2."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "2: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID3."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "3: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID4."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "4: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
  $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID5."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "5: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
  $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID6."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "6: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID7."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "7: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID8."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "8: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID9."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "9: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID10."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "10: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID11."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "11: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID12."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "12: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID13."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "13: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID14."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "14: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID15."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "15: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID16."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "16: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID17."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "17: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID18."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "18: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID19."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "19: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID20."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "20: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID21."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "21: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID22."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "22: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID23."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "23: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID24."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "24: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID25."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "25: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID26."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "26: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID27."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "27: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID28."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "28: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID29."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "29: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID30."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "30: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID31."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "31: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID32."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "32: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID33."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "33: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID34."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "34: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
      $iReward = file_get_contents($iMobLink."add_hit_list?user_id=".$iStore[2]."&target_id=".$iListID35."&bounty=".$iBounty."&auth_key=".$iStore[3]);
      xml_parse_into_struct($iP=xml_parser_create(), $iReward, $iS, $iX);xml_parser_free($iP);
  echo "35: ".strip_tags(str_replace("<br>","\n",$iS[$iX['MESSAGE'][0]]['value']))."\n";
}
    else echo "Account Skipped: wrong password/email combo, or a login error...\n";
  }
  else echo "Account Skipped: invalid email or blank password...\n";
}
echo "\n::: PROGRAM FINISHED, YOU CAN CLOSE THIS AT ANY TIME :::";
sleep(10000);

/////////////////////////////////////////////////////////
//////////// SCRIPT FUNCTIONS ///////////////////////////
/////////////////////////////////////////////////////////

function iAuthorize($iHeader, $iGameLink)
{
  curl_setopt($ch = curl_init(), CURLOPT_HEADER, 0);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_URL, "http://www.myspace.com/");
  curl_setopt($ch, CURLOPT_COOKIEJAR, "iAuthKeyCookie.txt");
  curl_setopt($ch, CURLOPT_COOKIEFILE, "iAuthKeyCookie.txt");
  curl_setopt($ch, CURLOPT_REFERER, "http://www.myspace.com/");
  curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4 (.NET CLR 3.5.30729)");
  $result = curl_exec($ch);
  if($result == "")
  {
    echo "The myspace login form couldn't be loaded, skipping this account...\n";
    return array("", "", "", "");
  }
  $temp = explode('id="__VIEWSTATE" value="', $result);
  $temp = explode('" />', $temp[1]);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_URL, "https://secure.myspace.com/index.cfm?fuseaction=login.process");
  curl_setopt($ch, CURLOPT_POSTFIELDS, "__VIEWSTATE=".urlencode($temp[0])."&NextPage=&ctl00%24ctl00%24cpMain%24cpMain%24LoginBox%24Email_Textbox=".urlencode($iHeader[0])."&ctl00%24ctl00%24cpMain%24cpMain%24LoginBox%24Password_Textbox=".urlencode($iHeader[1])."&ctl00%24ctl00%24cpMain%24cpMain%24LoginBox%24SingleSignOnHash=&ctl00%24ctl00%24cpMain%24cpMain%24LoginBox%24SingleSignOnRequestUri=&ctl00%24ctl00%24cpMain%24cpMain%24LoginBox%24nexturl=&ctl00%24ctl00%24cpMain%24cpMain%24LoginBox%24apikey=&ctl00%24ctl00%24cpMain%24cpMain%24LoginBox%24ContainerPage=&ctl00%24ctl00%24cpMain%24cpMain%24LoginBox%24SMSVerifiedCookieToken=&dlb=Log+In");
  $result = curl_exec($ch);
  if(stristr($result, "captcha.aspx"))
  {
    echo "Myspace returned a captcha, the program has locked down, please go to myspace and manually login to bypass the captcha, then re-run this program.";
    sleep(10000);
  }
  curl_setopt($ch, CURLOPT_URL, "http://profile.myspace.com/Modules/Applications/Pages/Canvas.aspx?appId=104283");
  $temp = explode('MySpace.ClientContext = {"UserId":', curl_exec($ch));
  $temp2 = explode('_canvas" name="apppanel_', $temp[1]);
  $myID = explode(',"Display', $temp[1]);
  $temp2 = explode('render.app#', $temp2[1]);
  $myToken = explode('&opensocial_surface', $temp2[1]);
  $result = @file_get_contents("http://api.msappspace.com/proxy/relay.proxy?opensocial_authtype=SIGNED&opensocial_token=".$myToken[0]."&opensocial_url=".urlencode($iGameLink)."refresh_stat%3Fuser_id%3D".$myID[0]);
  if($result == "") echo "There was an error logging into the account...";
  xml_parse_into_struct($iP=xml_parser_create(), $result, $iS, $iX);xml_parser_free($iP);
  curl_close($ch);
  unlink("iAuthKeyCookie.txt");
  return array($iHeader[0], $iHeader[1], $myID[0], $iS[$iX['AUTH_KEY'][0]]['value']);
}
?>

 

Instead of having all of the $iListIDs is there a way I can put the different ids in a text file and it can read the text file and put the IDs where they go.. like the logins.txt?

 

Thanks

Link to comment
Share on other sites

if its a different ID you would do something like:

 

<?php

$iListID = "Hello";

$totalIDs = 10;

$uniqueID = 0

      for($totalIDs; $totalIDs>=0; $totalIDs-=1){

 

          echo $iListID.$totalIDs.'= "'.$uniqueID.'"';

  echo "<br>";

          $uniqueID +=1;

}

?>

Link to comment
Share on other sites

Well, then you'll need:

 

<?php

$iListID = "Hello";

$totalIDs = 10;

      for($totalIDs; $totalIDs>=0; $totalIDs-=1){

          if($totalIDs == X){

                $uniqueID = Whatever it should be;

          }

          echo $iListID.$totalIDs.'= "'.$uniqueID.'"';

          echo "<br>";

?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.