!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/usermin/chfn/   drwxr-xr-x
Free 25.65 GB of 117.98 GB (21.75%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     linux-lib.pl (2.13 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# linux-lib.pl
# Functions for changing user details on linux

# change_details(realname, office, ophone, hphone, shell)
sub change_details
{
foreach $a (@_) {
    $a =~ s/\\//g;
    $a =~ s/'//g;
    }

local @ruser = getpwnam($remote_user);
local @uinfo = split(/,/, $ruser[6]);

if (has_command('usermod')) {
    my $realname = quotemeta($_[0]);
    my $officeroom = quotemeta($_[1]);
    my $ophone = quotemeta($_[2]);
    my $hphone = quotemeta($_[3]);
    my @udata = ($realname, $officeroom, $ophone, $hphone);
    my $udata = join(',', @udata);
    $udata =~ s/[,]+$//g;
    $udata =~ s/\\ / /g;
    
    # Change user details
    my $cmd = "usermod -c \"$udata\" ".quotemeta($remote_user);
    my $out = `$cmd 2>&1`;
    return $out if ($?);

    # Change shell
    if ($ruser[8] ne $_[4]) {
        my $nshell = quotemeta($_[4]);
        if (grep( /^$_[4]$/, &shells_available() )) {
            my $cmd = "usermod -s $nshell ".quotemeta($remote_user);
            my $out = `$cmd 2>&1`;
            return $? ? $out : undef;
            }
        }
} else {

    # What version of chfn are we running?
    local $out = `chfn -v 2>&1`;
    local $cmd;
    if ($out =~ /pwdutils/i || ($out =~ /-r/ && $out =~ /-w/ && $out =~ /-h/)) {
        # Change details using chfn from pwdutils syntax
        $cmd = "chfn -f ".quotemeta($_[0]);
        $cmd .= " -r ".quotemeta($_[1]) if ($_[1] || $uinfo[1]);
        $cmd .= " -w ".quotemeta($_[2]) if ($_[2] || $uinfo[2]);
        $cmd .= " -h ".quotemeta($_[3]) if ($_[3] || $uinfo[3]);
        $cmd .= " ".quotemeta($remote_user);
        }
    else {
        # Change details using chfn from util-linux syntax
        $cmd = "chfn -f ".quotemeta($_[0]);
        $cmd .= " -o ".quotemeta($_[1]) if ($_[1] || $uinfo[1]);
        $cmd .= " -p ".quotemeta($_[2]) if ($_[2] || $uinfo[2]);
        $cmd .= " -h ".quotemeta($_[3]) if ($_[3] || $uinfo[3]);
        $cmd .= " ".quotemeta($remote_user);
        }
    local $out = `$cmd 2>&1`;
    return $out if ($?);

    # Change shell
    if ($ruser[8] ne $_[4]) {
        $cmd = "chsh -s ".quotemeta($_[4])." ".quotemeta($remote_user);
        $out = `$cmd 2>&1`;
        return $? ? $out : undef;
        }
    }
return undef;
}

sub shells_available
{
my @shellslist;
open(my $shells, "</etc/shells");
while(<$shells>) {
    s/\r|\n//g;
    s/^\s*#.*$//;
    push(@shellslist, $_) if (/\S/);
    }
close($shells);
return @shellslist;
}

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.0044 ]--