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


Viewing file:     system_info.pl (5.08 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |

use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
do 'webmin-lib.pl';
our ($module_var_directory, %gconfig, $hidden_announce_file, $module_name, %text);

our $webmin_announce_url = "https://announce.webmin.com/index.txt";
our $webmin_announce_cache = "$module_var_directory/announce-cache";
our $webmin_announce_cache_time = 24*60*60;

# list_system_info()
# If any, returns announcements to Webmin users
sub list_system_info
{
return ( ) if ($gconfig{'no_announce'});

# Can we use the cache?
my $rawcache = &read_file_contents($webmin_announce_cache);
my $cache = $rawcache ? &unserialise_variable($rawcache) : undef;
my @st = stat($webmin_announce_cache);
my @ann;
if (@st && $st[9] > time() - $webmin_announce_cache_time) {
    # Cache is new enough to use
    @ann = @$cache;
    }
else {
    # Fetch the index of announcements
    my ($host, $port, $page, $ssl) = &parse_http_url($webmin_announce_url);
    return ( ) if (!$host);
    my ($out, $err);
    &http_download($host, $port, $page, \$out, \$err,
               undef, $ssl, undef, undef, 5);

    if (!$err) {
        # Parse the announcements index file
        $out ||= "";
        foreach my $l (split(/\r?\n/, $out)) {
            $l =~ s/^#.*//;        # Skip comments and spaces
            $l =~ s/^\s+//;
            $l =~ s/\s+$//;
            next if (!$l);
            my ($ahost, $aport, $apage, $assl) =
                &parse_http_url($l, $host, $port, $page, $ssl);
            next if (!$ahost);    # Invalid URL??

            my $afile = &transname();
            &http_download($ahost, $aport, $apage, $afile, \$err,
                       undef, $assl, undef, undef, 5);
            last if ($err);
            my %a = ( 'file' => $l );
            &read_file($afile, \%a);
            &unlink_file($afile);
            push(@ann, \%a);
            }
        }
    if ($err && $cache) {
        # HTTP download failed somewhere, so fall back to the cache
        # and reset it's validity to prevent a failed retry storm
        @ann = @$cache;
        &execute_command("touch ".quotemeta($webmin_announce_cache));
        }
    elsif ($err) {
        # Cannot fetch, and no cache
        return ( );
        }
    else {
        # Write to the cache
        my $fh = "CACHE";
        &open_tempfile($fh, ">$webmin_announce_cache");
        &print_tempfile($fh, &serialise_variable(\@ann));
        &close_tempfile($fh);
        }
    }

# Is Virtualmin or Cloudmin pro installed?
my %vminfo = &get_module_info("virtual-server");
my $vmpro = %vminfo && $vminfo{'version'} !~ /gpl/;
my %cminfo = &get_module_info("server-manager");
my $cmpro = %cminfo && $cminfo{'version'} !~ /gpl/;
my $ver = &get_webmin_version();

# What type of user is this?
my $utype;
if (&foreign_check("virtual-server")) {
    &foreign_require("virtual-server");
    if (&virtual_server::reseller_admin()) {
        $utype = "reseller";
        }
    elsif (&virtual_server::extra_admin()) {
        $utype = "extra";
        }
    elsif (!&virtual_server::master_admin()) {
        $utype = "domain";
        }
    }
if (!$utype && &foreign_check("server-manager")) {
    &foreign_require("server-manager");
    if ($server_manager::access{'owner'}) {
        $utype = "owner";
        }
    }
$utype ||= "master";

# Now we have the announcement hash refs, turn them into messages
my %hide;
&read_file($hidden_announce_file, \%hide);
my @rv;
my $i = 0;
foreach my $a (@ann) {
    # Check if this announcement should be skipped
    next if ($hide{$a->{'file'}});
    next if ($a->{'skip_virtualmin_pro'} && $vmpro);
    next if ($a->{'skip_virtualmin_gpl'} && %vminfo && !$vmpro);
    next if ($a->{'skip_cloudmin_pro'} && $cmpro);
    next if ($a->{'skip_cloudmin_gpl'} && %cminfo && !$cmpro);
    next if ($a->{'skip_pro'} && ($vmpro || $cmpro));
    next if ($a->{'atleast_version'} && &compare_version_numbers($ver, '<', $a->{'atleast_version'}));
    next if ($a->{'atmost_version'} && &compare_version_numbers($ver, '>', $a->{'atmost_version'}));
    next if ($a->{'user_types'} && $a->{'user_types'} !~ /\Q$utype\E/);
    next if ($a->{'beta'} && !$gconfig{'beta_announce'});
    next if ($a->{'depends'} && !&foreign_check($a->{'depends'}));
    next if ($a->{'installed'} &&
         &foreign_installed($a->{'installed'}, 1) != 2);
    
    (my $id = $a->{'file'}) =~ s/\.//;
    my $info = { 'id' => "announce_".$id,
             'open' => 1,
             'desc' => $a->{'title'},
           };
    my $hide = &ui_link_button(
        &get_webprefix()."/$module_name/hide.cgi?id=".&urlize($a->{'file'}),
        $text{'announce_hide'});
    if ($a->{'type'} eq 'warning') {
        # A warning message
        $info->{'type'} = 'warning';
        $info->{'level'} = $a->{'level'} || 'info';
        $info->{'warning'} = &html_escape($a->{'message'})."<p>\n";
        for(my $b=0; defined($a->{'link'.$b}); $b++) {
            my $link = $a->{'link'.$b};
            $link = &get_webprefix().$link
                if (&get_webprefix() && $link =~ /^\//);
            $info->{'warning'} .= &ui_link_button(
                $link, $a->{'desc'.$b}, "_new")."\n";
            }
        $info->{'warning'} .= $hide;
        }
    elsif ($a->{'type'} eq 'message') {
        # A message possibly with some buttons
        $info->{'type'} = 'html';
        $info->{'level'} = $a->{'level'};
        $info->{'html'} = &html_escape($a->{'message'})."<p>\n";
        for(my $b=0; defined($a->{'link'.$b}); $b++) {
            my $link = $a->{'link'.$b};
            $link = &get_webprefix().$link
                if (&get_webprefix() && $link =~ /^\//);
            $info->{'html'} .= &ui_link_button(
                $link, $a->{'desc'.$b}, "_new")."\n";
            }
        $info->{'html'} .= $hide;
        }
    else {
        # Unknown type??
        next;
        }
    push(@rv, $info);
    }
return @rv;
}

:: 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.0042 ]--