[REL] Furni Rip Script [REL]

Chrobens

Member
Sep 17, 2015
28
2
DCR Furniture Ripper
This is going to be a short post, I noticed a PHP script posted somewhere on the webs that was out-dated and did not work as of 2016, but this works and will read the Habbo furnidata.txt and rip all of the furni from dcr/hof_furni from Habbo.
This can be used for ripping the whole furniture library, or for when you notice a new furniture range premier on Habbo.

YOU MUST HAVE INSTALLED PHP
Run this using the PHP command line, if you do not know how to do this then ask someone for help as this is not a help thread, this is intended for people who are able to use initiative and know how to run PHP from command line.

Upon executing the script, the script will create a directory at C:/furni and place all .swf furniture here.

This is just a small, quick release.. Your hate will be ignored.
Some of you smart techies out there could develop this script to build a .txt file and have it use the values from the Habbo.com furnidata file and create your own SQL queries to execute to add the furniture into your database and catalogue.

HOWEVER
I will have a complete set of SWFs as of 05/12/2016 so if you wish to have patience I will be releasing that, the Habbo SWF will be cracked and I will have a list of the changed packet headers etc... You can then move over to these SWFs after updating your emulator to fit the Habbo SWF.

In the very near future I hope to take on Mango Emulator and Implement HabboEncryption V2 and update it to the SWF build I will be releasing (PRODUCTION-201611291003-338511768) and then complete its missing features.

ALSO
Yes this is only to rip the furnidata and furniture, but getting the Habbo swf, clothing and other gamedata files is really not a challenge, this thread is here solely because the furniture files are endless and are the biggest chunk of ripping.
Code:
<?php //Execute this command in Command Prompt with PHP.[/SIZE][/CENTER]
if (!defined('STDIN'))
  {
      echo 'Please run it as a cmd ({path to your php}/php.exe {path to badges.php} -f)';
      exit;
  }

  define('BASE', 'https://images.habbogroup.com/dcr/hof_furni');

  $furnidata = get_remote_data('https://habbo.com/gamedata/furnidata/furnidata.txt');

  if (!file_exists('C:/furni')) {
    mkdir('C:/furni', 0777, true);
      echo "\n --------------> Created directory at C:/furni to copy furniture to. \n";

    sleep(3);

    $fp = fopen("C:/furni/furnidata.txt", "w");
      fwrite($fp, $furnidata);
      fclose($fp);
    echo "\n --------------> Furnidata.txt copied to C:/Furni directory \n";

    sleep(3);
  }

  $pos = 0;
  while ($pos = strpos($furnidata, '["', $pos +1))
  {
      $pos1 = strpos($furnidata, '"]', $pos);
      $rule = substr($furnidata, $pos, ($pos1 -$pos));

      $rule = explode(',', $rule);

      $revision = str_replace('"', '', $rule[3]);
      $furni = current(explode('*', str_replace('"', '', $rule[2])));

      if (file_exists('C:/furni/'.$furni.'.swf'))
      {
          echo 'furni exists: '.$furni."\r\n";
          continue;
      }

      echo 'Download furni: '.$furni.' '.$revision."\r\n";
      if (!@copy(BASE.'/'.$revision.'/'.$furni.'.swf', 'C:/furni/'.$furni.'.swf'))
      {
          echo 'Error downloading: '.$furni."\r\n";
      }

  }









  function get_remote_data($url, $post_paramtrs = false) {
    $c = curl_init();
    curl_setopt($c, CURLOPT_URL, $url);
    curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
    if ($post_paramtrs) {
        curl_setopt($c, CURLOPT_POST, TRUE);
        curl_setopt($c, CURLOPT_POSTFIELDS, "var1=bla&" . $post_paramtrs);
    } curl_setopt($c, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($c, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:33.0) Gecko/20100101 Firefox/33.0");
    curl_setopt($c, CURLOPT_COOKIE, 'CookieName1=Value;');
    curl_setopt($c, CURLOPT_MAXREDIRS, 10);
    $follow_allowed = ( ini_get('open_basedir') || ini_get('safe_mode')) ? false : true;
    if ($follow_allowed) {
        curl_setopt($c, CURLOPT_FOLLOWLOCATION, 1);
    }curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 9);
    curl_setopt($c, CURLOPT_REFERER, $url);
    curl_setopt($c, CURLOPT_TIMEOUT, 60);
    curl_setopt($c, CURLOPT_AUTOREFERER, true);
    curl_setopt($c, CURLOPT_ENCODING, 'gzip,deflate');
    $data = curl_exec($c);
    $status = curl_getinfo($c);
    curl_close($c);
    preg_match('/(http(|s)):\/\/(.*?)\/(.*\/|)/si', $status['url'], $link);
    $data = preg_replace('/(src|href|action)=(\'|\")((?!(http|https|javascript:|\/\/|\/)).*?)(\'|\")/si', '$1=$2' . $link[0] . '$3$4$5', $data);
    $data = preg_replace('/(src|href|action)=(\'|\")((?!(http|https|javascript:|\/\/)).*?)(\'|\")/si', '$1=$2' . $link[1] . '://' . $link[3] . '$3$4$5', $data);
    if ($status['http_code'] == 200) {
        return $data;
    } elseif ($status['http_code'] == 301 || $status['http_code'] == 302) {
        if (!$follow_allowed) {
            if (empty($redirURL)) {
                if (!empty($status['redirect_url'])) {
                    $redirURL = $status['redirect_url'];
                }
            } if (empty($redirURL)) {
                preg_match('/(Location:|URI:)(.*?)(\r|\n)/si', $data, $m);
                if (!empty($m[2])) {
                    $redirURL = $m[2];
                }
            } if (empty($redirURL)) {
                preg_match('/href\=\"(.*?)\"(.*?)here\<\/a\>/si', $data, $m);
                if (!empty($m[1])) {
                    $redirURL = $m[1];
                }
            } if (!empty($redirURL)) {
                $t = debug_backtrace();
                return call_user_func($t[0]["function"], trim($redirURL), $post_paramtrs);
            }
        }
    } return "ERRORCODE22 with $url!!<br/>Last status codes<b/>:" . json_encode($status) . "<br/><br/>Last data got<br/>:$data";
}
?>





P.S Sorry about the presentation of this post, it was 03:31 when I posted this, lmao.
P.P.S There's like 500,000 furniture items so you may aswell wait for my release of the current 05/12/2016 SWFS just keep this script handy for the future :up:

 
Last edited:

Users who are viewing this thread

Top