!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/usr/share/webmin/at/   drwxr-xr-x
Free 28.64 GB of 117.98 GB (24.28%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     at-lib.pl (2.89 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# at-lib.pl
# Functions for listing and creating at jobs

use strict;
use warnings "once";
no warnings "redefine";
our (%text, %config); 
our $remote_user;

BEGIN { push(@INC, ".."); };
use WebminCore;
&init_config();
our %access = &get_module_acl();

do "$config{'at_style'}-lib.pl";

# wrap_lines(text, width)
# Given a multi-line string, return an array of lines wrapped to
# the given width
sub wrap_lines
{
my @rv;
my $w = $_[1];
foreach my $rest (split(/\n/, $_[0])) {
    if ($rest =~ /\S/) {
        while(length($rest) > $w) {
            push(@rv, substr($rest, 0, $w));
            $rest = substr($rest, $w);
            }
        push(@rv, $rest);
        }
    else {
        # Empty line .. keep as it is
        push(@rv, $rest);
        }
    }
return @rv;
}

# can_edit_user(&access, user)
sub can_edit_user
{
my %umap;
map { $umap{$_}++; } split(/\s+/, $_[0]->{'users'});
if ($_[0]->{'mode'} == 1 && !$umap{$_[1]} ||
    $_[0]->{'mode'} == 2 && $umap{$_[1]}) { return 0; }
elsif ($_[0]->{'mode'} == 3) {
    return $remote_user eq $_[1];
    }
else {
    return 1;
    }
}

# list_allowed()
# Returns a list of all users in the cron allow file
sub list_allowed
{
local $_;
my @rv;
no strict "subs";
&open_readfile(ALLOW, $config{allow_file});
while(<ALLOW>) {
    next if (/^\s*#/);
    chop; push(@rv, $_) if (/\S/);
    }
close(ALLOW);
use strict "subs";
return @rv;
}


# list_denied()
# Return a list of users from the cron deny file
sub list_denied
{
local $_;
my @rv;
no strict "subs";
&open_readfile(DENY, $config{deny_file});
while(<DENY>) {
    next if (/^\s*#/);
    chop; push(@rv, $_) if (/\S/);
    }
close(DENY);
use strict "subs";
return @rv;
}


# save_allowed(user, user, ...)
# Save the list of allowed users
sub save_allowed
{
&lock_file($config{allow_file});
if (@_) {
    local($_);
    no strict "subs";
    &open_tempfile(ALLOW, ">$config{allow_file}");
    foreach my $u (@_) {
        &print_tempfile(ALLOW, $u,"\n");
        }
    &close_tempfile(ALLOW);
    use strict "subs";
    chmod(0444, $config{allow_file});
    }
else {
    &unlink_file($config{allow_file});
    }
&unlock_file($config{allow_file});
}


# save_denied(user, user, ...)
# Save the list of denied users
sub save_denied
{
&lock_file($config{deny_file});
if (@_ || !-r $config{'allow_file'}) {
    no strict "subs";
    &open_tempfile(DENY, ">$config{deny_file}");
    foreach my $u (@_) {
        &print_tempfile(DENY, $u,"\n");
        }
    &close_tempfile(DENY);
    use strict "subs";
    chmod(0444, $config{deny_file});
    }
else {
    &unlink_file($config{deny_file});
    }
&unlock_file($config{deny_file});
}

# can_use_at(user)
# Returns 1 if some user is allowed to use At jobs, based on the allow
# any deny files.
sub can_use_at
{
my ($user) = @_;
my (@allow, @deny, @denied);
if (!$config{'allow_file'}) {
    return 1;    # not supported by OS
    }
elsif (@allow = &list_allowed()) {
    return &indexof($user, @allow) >= 0;    # check allowed list
    }
elsif (@deny = &list_denied()) {
    return &indexof($user, @denied) < 0;    # check denied list
    }
else {
    return 1;    # if neither exists, fall back to allowing all
    }
}

1;


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0038 ]--