404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.16.130.151: ~ $
#!/bin/bash

# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2018 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENSE.TXT

eval 'if [ -x /usr/local/cpanel/3rdparty/bin/perl ]; then exec /usr/local/cpanel/3rdparty/bin/perl -x -- $0 ${1+"$@"}; else exec /usr/bin/perl -x $0 ${1+"$@"}; fi;'
if 0;

#!/usr/bin/perl


#BEGIN { unshift @INC, '/scripts'; }
BEGIN { unshift @INC, '/usr/local/cpanel', '/scripts'; }

my $pckg_name = 'Cpanel';
use strict;
use warnings;

eval "use " .$pckg_name . "::Config::Users          ();";
if ($@){
    $pckg_name = 'cPScript';
    eval "use " .$pckg_name . "::Config::Users       ();";
}

#eval "use " .$pckg_name . "::Config::Users         ();";
eval "use  " .$pckg_name . "::DB::Map              ();";
eval "use  " .$pckg_name . "::DB                   ();";

use Data::Dumper;

my @old = ();
my @new = ();
my @copy_new = ();

my $noSystemUsers = ($#ARGV >= 0 && $ARGV[0] eq "--nosys");
if ($noSystemUsers) {
    shift @ARGV;
}

my $numArgs = $#ARGV + 1;

if($numArgs>0){
    foreach my $mb (@ARGV) {
        if($mb>0){
            my $uname_1 = getpwuid($mb);
            @new = get_map_list_user_($uname_1);

            foreach my $item (@new){
                my $fnd = 0;
                foreach my $item2 (@old){
                    if (($$item[0] eq $$item2[0]) && ($$item[1] eq $$item2[1])){
                        $fnd = 1;
                        last;
                    } 
                }
                if($fnd==0){
                    push @old, $item;
                } 
            }
        }
    }

    foreach my $item (@old){
        print $$item[0], " ", $$item[1], " ", $$item[2], "\n";
    }

} else {

    @new = get_map_list_();
    @copy_new = map { [@$_] } @new;

    my @del_list = ();
    my @del_list2 = ();

    my $i=0;
    my $j=0;
    foreach my $item (@new){
        $j=0;
        my $del = 0;
        foreach my $item2 (@old){
            if (($$item[0] eq $$item2[0]) && ($$item[1] eq $$item2[1])){
                push @del_list, $j;
                $del = 1;
            } 
            $j++;
        }
        if($del==1){
            push @del_list2, $i;
        } 
        $i++;
    }

    foreach my $item (@del_list){
        delete $old[$item];
    }
    foreach my $item (@del_list2){
        delete $new[$item];
    }
    @old = grep {$_} @old;
    @new = grep {$_} @new;

    my $cnt_old = @old;
    my $cnt_new = @new;

    if($cnt_old>0 || $cnt_new>0){
        foreach my $item (@copy_new){
            print $$item[0], " ", $$item[1], " ", $$item[2], "\n";
        }
    }
}

sub get_map_list_ {
    my @arr = ();
    my @users =Cpanel::Config::Users::getcpusers();
    foreach my $user (@users) {
        my $user_map1 = Cpanel::DB::get_map ( {'cpuser' => $user} );
        my $name="";
        my $uid= -1;
        my $dummy;
        ($name, $dummy, $uid, $dummy, $dummy, $dummy, $dummy, $dummy, $dummy) = getpwnam($user);
        if ($uid>=0 && !$noSystemUsers){
                push @arr, [ $user, $user, "$uid" ];
        }

        if ($uid>=0 && exists($$user_map1{'stash'}{'MYSQL'}{'dbusers'})){
            for my $key (keys %{$$user_map1{'stash'}{'MYSQL'}{'dbusers'}}) { 
                push @arr, [ $key, $user, "$uid" ];
            }
        }
    }
    return @arr;
}

sub get_map_list_user_ {
    my @arr = ();
    my $user = shift;
    my $user_map1 = Cpanel::DB::get_map ( {'cpuser' => $user} );
    my $name = "";
    my $uid = -1;
    my $dummy;
    ($name, $dummy, $uid, $dummy, $dummy, $dummy, $dummy, $dummy, $dummy) = getpwnam($user);
    if ($uid>=0 && !$noSystemUsers){
        push @arr, [ $user, $user, "$uid" ];
    }

    if ($uid>=0 && exists($$user_map1{'stash'}{'MYSQL'}{'dbusers'})){
        for my $key (keys %{$$user_map1{'stash'}{'MYSQL'}{'dbusers'}}) { 
        push @arr, [ $key, $user, "$uid" ];
    }
    }
    return @arr;
}

Filemanager

Name Type Size Permission Actions
Activate.ps1 File 8.82 KB 0644
activate File 1.65 KB 0644
activate.csh File 913 B 0644
activate.fish File 2.14 KB 0644
alembic File 229 B 0755
chardetect File 237 B 0755
cl_sysctl File 4.51 KB 0755
clcpapi File 3.64 KB 0755
coverage File 231 B 0755
coverage-3.11 File 231 B 0755
coverage3 File 231 B 0755
cpanel-dbmapping File 3.83 KB 0755
da_suid_caller.py File 686 B 0644
detect-requirements File 238 B 0755
dodgy File 224 B 0755
epylint File 235 B 0755
f2py File 232 B 0755
f2py3 File 232 B 0755
f2py3.11 File 232 B 0755
flake8 File 230 B 0755
futurize File 231 B 0755
get_gprof File 1.84 KB 0755
get_objgraph File 1.63 KB 0755
isort File 225 B 0755
isort-identify-imports File 259 B 0755
jsonschema File 229 B 0755
lvestats_config_reader.py File 1.12 KB 0644
mako-render File 229 B 0755
normalizer File 260 B 0755
pasteurize File 233 B 0755
pip File 237 B 0755
pip3 File 237 B 0755
pip3.11 File 237 B 0755
plesk_suid_caller.py File 905 B 0644
prospector File 229 B 0755
py.test File 237 B 0755
pycodestyle File 228 B 0755
pydocstyle File 229 B 0755
pyflakes File 227 B 0755
pylint File 233 B 0755
pylint-config File 249 B 0755
pyreverse File 239 B 0755
pysemver File 225 B 0755
pytest File 237 B 0755
python File 15.59 KB 0755
python3 File 15.59 KB 0755
python3.11 File 15.59 KB 0755
raven File 235 B 0755
symilar File 235 B 0755
tap File 223 B 0755
tappy File 223 B 0755
undill File 603 B 0755
virtualenv File 254 B 0755