Habbo-images updated. (bypass anti ddos from habbo)

Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    G'nome sayin' Exonize is offline
    MemberRank
    May 2011 Join Date
    Czech RepublicLocation
    517Posts

    Re: Habbo-images updated. (bypass anti ddos from habbo)

    Quote Originally Posted by Boraida View Post
    Smart of you to use curl. I didn't like the code so I'd a quick modify.

    PHP Code:
    <?php

    define
    ('DS'DIRECTORY_SEPARATOR);

    // default settings
    $look = array (
        
    'figure' => 'hr-145-31.hd-180-1.ch-210-62.lg-285-64.sh-290-62',
        
    'size' => 'b',
        
    'direction' => '2',
        
    'head_direction' => '2',
        
    'gesture' => ''
    );

    // default map : ./avatars
    if (!is_dir($map './avatars')) {
        if (!
    mkdir($map0true)) {
            exit(
    'Can\'t make the folder chmod this folder');
        }
    }

    foreach (
    $look as $k => $v) {
        if (!empty(
    $part filter_input(INPUT_GET$k))) {
            
    $look[$k] = $part;
        }
    }

    $image_path $map DS md5(implode($look)) . '.png';

    if (!
    file_exists($image_path)) {
        
    $fp fopen($image_path'w+');

        
    $ch curl_init('https://www.habbo.nl/habbo-imaging/avatarimage?' http_build_query($look));
        
    curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse); 
        
    curl_setopt($chCURLOPT_FILE$fp);         
        
    curl_setopt($chCURLOPT_FOLLOWLOCATION1);
        
    curl_setopt($chCURLOPT_TIMEOUT1000);      
        
    curl_setopt($chCURLOPT_USERAGENT'Mozilla/5.0');
        
    curl_exec($ch);

        
    curl_close($ch);                              
        
    fclose($fp);  
    }

    $im imagecreatefrompng($image_path);

    header('Content-Type: image/png');
    imagepng($im);
    imagedestroy($im);
    Looks pretty but returns figures with white backgrounds.


  2. #17
    Proficient Member Boraida is offline
    MemberRank
    May 2011 Join Date
    The NetherlandsLocation
    161Posts

    Re: Habbo-images updated. (bypass anti ddos from habbo)

    Quote Originally Posted by Exonize View Post
    Looks pretty but returns figures with white backgrounds.

    Oh lol add
    PHP Code:
    imagesavealpha($imtrue); 
    below $im = ...


    Quote Originally Posted by Droppy View Post
    Well, instead of using server resources, why not just redirect to habbo page? If you can't, because most of your files are going through some local file, then in this local file instead of file_get_contents and redirects...

    It's just an alternative for those whom doesn't want to use server resources... I don't know if it's the best approach though.

    PHP Code:
    <?php
    function arrayToString($get)
    {
        
    $fields "";
        foreach(
    $get as $key=>$value) { 
            
    $fields .= $key.'='.$value.'&'
        }        
        return 
    rtrim($fields'&') . "&";
    }
    header("Location: http://www.habbo.com.br/habbo-imaging/avatarimage?" arrayToString($_GET));
    ?>
    It works? Yes, it does. Now, feel free to flame me all you want for this 1337 h4x approach.
    Why creating a function like that if there's already a function called: http-build-query
    Last edited by Boraida; 09-12-15 at 05:08 PM.



Page 2 of 2 FirstFirst 12

Advertisement