403Webshell
Server IP : 208.122.213.31  /  Your IP : 216.73.216.185
Web Server : Apache
System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64
User : WHMCS_MIA_382 ( 1001)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/httpd/html/bukkake-mpegs.com/cgi-bin/tgps/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/httpd/html/bukkake-mpegs.com/cgi-bin/tgps/code.cgi
#!/usr/bin/perl
##############################
##  AutoGallery Pro v3.0.x  ##
######################################################
##  code.cgi - Display JPEG image with submit code  ##
######################################################


require 'common.pl';

eval("use GD;");

$HEADER = 0;


## Display the GD Not Available image
if( $@ )
{
    my @png =  (
                 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52, 
                 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x00, 0x17, 0x01, 0x03, 0x00, 0x00, 0x00, 0xd9, 0x53, 0x48, 
                 0xcb, 0x00, 0x00, 0x00, 0x06, 0x50, 0x4c, 0x54, 0x45, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x55, 
                 0xc2, 0xd3, 0x7e, 0x00, 0x00, 0x00, 0x72, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, 0x63, 0x60, 0x18, 
                 0x20, 0xc0, 0x3c, 0x8f, 0x51, 0x80, 0x83, 0xc1, 0x81, 0x41, 0xe0, 0x80, 0x80, 0x01, 0x90, 0xcb, 
                 0x12, 0xc8, 0x38, 0x81, 0x83, 0x61, 0x01, 0x03, 0x83, 0x83, 0x80, 0x00, 0x88, 0x2b, 0xc8, 0x38, 
                 0x79, 0x1e, 0xa3, 0x88, 0x9f, 0x81, 0xf3, 0x34, 0x81, 0x07, 0x60, 0x6e, 0x88, 0x07, 0xa3, 0x88, 
                 0xa3, 0x80, 0x43, 0xa4, 0x20, 0x50, 0x9a, 0xe5, 0x22, 0x88, 0xfb, 0xc5, 0x5f, 0xc0, 0xf9, 0xa2, 
                 0xe0, 0x07, 0xb0, 0x5e, 0x13, 0x0f, 0x46, 0xa1, 0x89, 0x02, 0x2e, 0x81, 0x82, 0x10, 0xa3, 0x4c, 
                 0x3c, 0x19, 0x85, 0x26, 0x0b, 0xb8, 0xdc, 0x14, 0x84, 0x58, 0x24, 0xdc, 0xc6, 0x28, 0xc8, 0x6b, 
                 0xf1, 0x38, 0xcc, 0xe2, 0x01, 0xfd, 0xfc, 0x07, 0x00, 0x62, 0x9a, 0x17, 0x0f, 0x03, 0x46, 0x42, 
                 0xa5, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
               );


    Header("Content-type: image/png\n\n");

    for( @png )
    {
        print chr($_);
    }

    exit;
}


$fonts = DirRead("$DDIR/fonts", 'ttf$');


## Image details
$image        = undef;
$have_ttf     = undef;
$image_width  = undef;
$image_height = undef;
$font_size    = 20;
$font_file    = $FONT_DIR . '/' . $fonts->[rand(@$fonts)];
$hex_ip       = IP2Hex($ENV{'REMOTE_ADDR'});
$angle        = 0;
$code_length  = $CODE_LENGTH;
$data         = {};

## Generate the submit code itself
for( 1..$code_length )
{
    $code .= int(rand(10));
}


## See if we are running in test mode
if( $ENV{'QUERY_STRING'} )
{
    $code      = 1234567890;
    $font_file = $FONT_DIR . '/' . $ENV{'QUERY_STRING'};
    DisplayTest();
    exit;
}


## Insert code into database
$data->{'IP_Address'} = $hex_ip;
$data->{'Code'}       = $code;
$data->{'Timestamp'}  = time;
DBReplace("$DDIR/dbs/codes", $hex_ip, $data);


## See if FreeType is available, and get code size
eval
{
    @bounds = GD::Image->stringFT(undef, $font_file, $font_size, $angle, 0, 0, $code);
};


## Set the image size
if( scalar(@bounds) )
{
    $have_ttf     = 1;   
    $image_height = $bounds[1] - $bounds[7] + 10;
    $image_width  = $bounds[2] + 10;
}
else
{
    $image_height = GD::Font->Giant->height + 10;
    $image_width  = GD::Font->Giant->width * length($code) + 10;
}


## Create a new image
$image = new GD::Image($image_width, $image_height);


## Allocate the colors for the image
$bg_color   = $image->colorAllocate(240, 240, 220);
$font_color = $image->colorAllocate(0, 0, 0);


## Fill the image with the background color
$image->fill(0, 0, $bg_color);


for( my $i = 4; $i < $image_height; $i += 15 )
{
    $image->line(0, $i, $image_width, $i, $font_color);
}


for( my $i = 2; $i < $image_width; $i += 15 )
{
    $image->line($i, 0, $i, $image_height, $font_color);
}



## Write the submit code onto the image
if( $have_ttf )
{
    $image->stringFT($font_color, $font_file, $font_size, $angle, 5-$bounds[6], $image_height-$bounds[1]-5, $code);
}
else
{
    $image->string(GD::Font->Giant,5,5,$code,$font_color);
}


## Display the image
Header("Content-type: image/jpeg\n\n");
print $image->jpeg;




sub DisplayTest
{
    ## Make sure the font file exists
    if( !-f $font_file )
    {
        Header("Content-type: text/html\n\n");
        print "The font file '$ENV{'QUERY_STRING'}' does not exist";
        return;
    }

    ## See if FreeType is available, and get code size
    eval
    {
        @bounds = GD::Image->stringFT(undef, $font_file, $font_size, $angle, 0, 0, $code);
    };


    ## Set the image size
    if( scalar(@bounds) )
    {
        $have_ttf     = 1;   
        $image_height = $bounds[1] - $bounds[7] + 10;
        $image_width  = $bounds[2] + 10;
    }
    else
    {
        Header("Content-type: text/html\n\n");
        print "GD was not compiled with FreeType support, and therefore cannot use true-type fonts";
        return;
    }


    ## Create a new image
    $image = new GD::Image($image_width, $image_height);


    ## Allocate the colors for the image
    $bg_color   = $image->colorAllocate(240, 240, 220);
    $font_color = $image->colorAllocate(0, 0, 0);


    ## Fill the image with the background color
    $image->fill(0, 0, $bg_color);


    ## Write the submit code onto the image
    $image->stringFT($font_color, $font_file, $font_size, $angle, 5-$bounds[6], $image_height-$bounds[1]-5, $code);


    ## Display the image
    Header("Content-type: image/jpeg\n\n");
    print $image->jpeg;
}

Youez - 2016 - github.com/yon3zu
LinuXploit