All pastes #792433 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-11-21 12:09 UTC
rendered paste body
<?
/***********************************************************************/
/*                                                                     */
/*  This file is created by deZender                                   */
/*                                                                     */
/*  deZender (Decoder for Zend Encoder/SafeGuard):                     */
/*    Version:      0.9.5.1                                            */
/*    Author:       qinvent.com                                        */
/*    Release on:   2007.6.11                                          */
/*                                                                     */
/***********************************************************************/


  function parsestring (${'go'}, ${'mu'}, ${'lpc'})
  {
    if (${'mu'} != '')
    {
      ${'bigd'} = strpos (${'go'}, ${'mu'});
      if (${'bigd'} === false)
      {
        return false;
      }

      ${'bigd'} += strlen (${'mu'});
      ${'go'} = substr (${'go'}, ${'bigd'});
    }

    if (${'lpc'} != '')
    {
      ${'bigd'} = strpos (${'go'}, ${'lpc'});
      if (${'bigd'} === false)
      {
        return false;
      }

      ${'go'} = substr (${'go'}, 0, ${'bigd'});
    }

    return ${'go'};
  }

  function gethtml (${'"_"'})
  {
    ${'go'} = 'GET ' . ${'"_"'} . ' HTTP/1.1';
    ${'go'} .= 'Host: rapidshare.com';
    ${'go'} .= '';
    ${'bdc'} = socket_create (AF_INET, SOCK_STREAM, SOL_TCP);
    socket_connect (${'bdc'}, '80.239.151.10', 80);
    socket_write (${'bdc'}, ${'go'}, strlen (${'go'}));
    ${'syn'} = '';
    while (${'haet'} = socket_read (${'bdc'}, 2048, PHP_BINARY_READ) != false)
    {
      ${'syn'} .= ${'haet'};
    }

    socket_close (${'bdc'});
    return ${'syn'};
  }

  function fixurl ()
  {
    global $url;
    if (substr (${'"_"'}, 0, 7) == '/files/')
    {
      return '';
    }

    if (substr (${'"_"'}, 0, 7) == 'http://')
    {
      ${'"_"'} = substr (${'"_"'}, 7);
    }

    if (substr (${'"_"'}, 0, 4) == 'www.')
    {
      ${'"_"'} = substr (${'"_"'}, 4);
    }

    if (substr (${'"_"'}, -5) == '.html')
    {
      ${'"_"'} = substr (${'"_"'}, 0, -5);
    }

    if (substr (${'"_"'}, -4) == '.php')
    {
      return 'Failed: PHP files not allowed!';
    }

    if (substr (${'"_"'}, -5) == '.php2')
    {
      return 'Failed: PHP files not allowed!';
    }

    if (substr (${'"_"'}, -5) == '.php3')
    {
      return 'Failed: PHP files not allowed!';
    }

    if (substr (${'"_"'}, -5) == '.php4')
    {
      return 'Failed: PHP files not allowed!';
    }

    if (substr (${'"_"'}, -5) == '.php5')
    {
      return 'Failed: PHP files not allowed!';
    }

    if (substr (${'"_"'}, -3) == '.pl')
    {
      return 'Failed: Perl files not allowed!';
    }

    if (substr (${'"_"'}, -3) == '.py')
    {
      return 'Failed: Python files not allowed!';
    }

    if (substr (${'"_"'}, -4) == '.asp')
    {
      return 'Failed: ASP files not allowed!';
    }

    if (substr (${'"_"'}, -6) == '.shtml')
    {
      return 'Failed: SHTML files not allowed!';
    }

    if (substr (${'"_"'}, 0, 11) == 'rapidshare.')
    {
      ${'"_"'} = substr (${'"_"'}, 11);
    }

    if (substr (${'"_"'}, 0, 3) == 'com')
    {
      ${'"_"'} = substr (${'"_"'}, 3);
      return null;
    }

    if (substr (${'"_"'}, 0, 2) == 'de')
    {
      return 'Fail: We do not currently support .de links.';
    }

    return 'Fail: Bad URL.';
  }

  function getcookies (${'yic'})
  {
    global $cookies;
    ${'usr'} = 1;
  }

  function displaymsg (${'go'})
  {
  }

  function getfile (${'"_"'}, ${'ef'}, ${'ehlf'}, ${'yic'})
  {
    global $cookies;
    global $debug;
    global $acc;
    ${'xdsh'} = date ('U');
    if (!(mysql_connect (mysql_host, mysql_user, mysql_password)))
    {
      exit (mysql_error ());
    }

    if (!(mysql_select_db (mysql_db)))
    {
      exit (mysql_error ());
    }

    ${'apc'} = '1';
    if (!(${'emtoy'} = mysql_query ('SELECT *FROM `band` ORDER BY `band`.`bw` ASC')))
    {
      exit (mysql_error ());
    }

    while (${'fu'} = mysql_fetch_array (${'emtoy'}))
    {
      ${'aelc'}[${'apc'}] = ${'fu'}['bw'];
      $F[${'apc'}] = ${'fu'}['prem'];
      ++${'apc'};
    }

    ${'go'} = 'GET ' . ${'"_"'} . ' HTTP/1.1';
    ${'go'} .= 'Host: ' . ${'ef'} . '.rapidshare.com';
    ${'ackeqt'} = perday;
    if (perday < ${'aelc'}[1])
    {
      exit ('<center>All accounts have used alloted daily bandwidth - Please try again later</center>');
    }

    ${'go'} .= 'Cookie: user=' . $F['1'] . '';
    ${'wdlol'} = $F[1];
    ${'go'} .= '';
    ${'bdc'} = socket_create (AF_INET, SOCK_STREAM, SOL_TCP);
    if (!(socket_connect (${'bdc'}, @gethostbyname ('' . ${'ef'} . '.rapidshare.com'), 80)))
    {
      exit ('Problem with RapidShare Mirror - Please try again');
    }

    socket_write (${'bdc'}, ${'go'}, strlen (${'go'}));
    ${'paum'} = socket_read (${'bdc'}, 2048, PHP_BINARY_READ);
    if (${'paum'} == '')
    {
      exit ('Bad Header');
    }

    ${'vuap'} = parsestring (${'paum'}, 'Content-Length: ', '');
    if (!((!(${'vuap'} == '') AND !(${'vuap'} == 0))))
    {
      exit ('Bad Content');
    }

    if (parsestring (${'paum'}, 'Set-Cookie: ', ';') == 'user=')
    {
      exit ('bad account');
    }

    ${'uope'} = explode ('', ${'paum'});
    foreach (${'uope'} as ${'baehlf'} => ${'ywoean'})
    {
      header (${'ywoean'});
    }

    ${'ulcea'} = explode ('Content-Length: ', ${'paum'});
    ${'s5s'} = ${'aelc'}[1] + ${'ulcea'}[1];
    if (!(${'aeib6'} = mysql_query ('UPDATE `band` SET bw=\'' . ${'s5s'} . '\' WHERE prem=\'' . ${'wdlol'} . '\'')))
    {
      exit (mysql_error ());
    }

    while (${'haet'} = @socket_read (${'bdc'}, 10000, PHP_BINARY_READ) != false)
    {
      echo ${'haet'};
    }

    exit ('');
  }

  include 'config.php';
  $debug = false;
  $ch = curl_init ('http://www.livehybrid.com/rs/license.php?license=' . license_code . '&ip=' . $_SERVER['SERVER_ADDR'] . '');
  ob_start ();
  curl_exec ($ch);
  curl_close ($ch);
  $result = ob_get_contents ();
  ob_end_clean ();
  if (!($result == 'correct'))
  {
    echo "nulled";
  }

  $debug = false;
  $url = $_POST['url'];
  $error = fixurl ();
  if ($error != '')
  {
    echo $error;
    exit ();
  }

  $file = parsestring ($url, '/files/', '');
  $num = parsestring ($file, '', '/');
  $name = trim (parsestring ($file, '/', ''));
  $data = gethtml ($url);
  $error = parsestring ($data, '>alert("', '")</');
  if ($error != '')
  {
    exit ('Failed -  ' . strip_tags ($error) . '');
  }

  $dl = parsestring ($data, 'http://rs', '.');
  if ($dl == false)
  {
    $dl = parsestring ($data, 'http://dl', '.');
  }

  if ($dl == false)
  {
    $dl = parsestring ($data, 'http://ul', '.');
  }

  if ($dl == false)
  {
    exit ('Unexpected Data from RapidShare');
  }

  getcookies ('');
  $count = count ($cookies) - 1;
  $mrr = 'tl';
  $mirrors = array ('gc', 'l34', 'tl', 'cg2', 'cg', 'tl2', 'l3', 'l32', 'l33', 'tg');
  $cook = rand (0, count ($cookies));
  $path = 'files/' . $num . '/' . $name;
  for ($i = 1; $i < 5; ++$i)
  {
    $data = getfile ('/files/' . $num . '/dl/' . $name, 'rs' . $dl . $mrr, $cook, $path);
    if ($data == 'bad account')
    {
      $cook = rand (0, count ($cookies) - 1);
      continue;
    }
  }

  exit ('Unknown Error');
?>