!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux web25.us.cloudlogin.co 5.10.237-xeon-hst #1 SMP Mon May 5 15:10:04 UTC 2025 x86_64 

uid=233359(alpastrology) gid=888(tty) groups=888(tty),33(tape) 

Safe-mode: OFF (not secure)

/usr/share/doc/perl-CGI/examples/   drwxr-xr-x
Free 6182.04 GB of 6263.24 GB (98.7%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     file_upload.cgi (2.39 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/env perl -T

use strict;
use warnings;

use CGI;
use CGI::Carp qw/ fatalsToBrowser /;
use Template;

my $cgi           = CGI->new;
my $template_vars = {
    cgi_version => $CGI::VERSION,
};

# Process the form if there is a file name entered
if ( my $file = $cgi->param( 'filename' ) ) {

    die "filename passed as ARG" if $file =~ /ARG/;

    my $tmpfile  = $cgi->tmpFileName( $file );
    my $mimetype = $cgi->uploadInfo( $file )->{'Content-Type'} || '';

    @{$template_vars}{qw/file temp_file mimetype/}
        = ( $file,$tmpfile,$mimetype );

    my %wanted = map { $_ => 1 } $cgi->multi_param( 'count' );

    while ( <$file> ) {
        $template_vars->{lines}++               if $wanted{"count lines"};
        $template_vars->{words} += split(/\s+/) if $wanted{"count words"};
        $template_vars->{chars} += length       if $wanted{"count chars"};
    }
    close( $file );
}

print $cgi->header(
    -type    => 'text/html',
    -charset => 'utf-8',
);

my $tt = Template->new;
$tt->process( \*DATA,$template_vars ) or warn $tt->error;

__DATA__
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>File Upload Example</title>
    </head>
    <body>
        <b>Version</b> [% cgi_version %]
        <h1>File Upload Example</h1>
        <p>This example demonstrates how to prompt the remote user to select a remote file for uploading.</p>
        <p>Select the <cite>browser</cite> button to choose a text file to upload.</p>
        <p>When you press the submit button, this script will count the number of lines, words, and characters in the file.</p>
        <form method="post" action="file_upload" enctype="multipart/form-data">Enter the file to process:
            <input type="file" name="filename" size="45" /><br />
            <label><input type="checkbox" name="count" value="count lines" checked="checked" />count lines</label>
            <label><input type="checkbox" name="count" value="count words" checked="checked" />count words</label>
            <label><input type="checkbox" name="count" value="count chars" checked="checked" />count characters</label>
            <input type="reset"  name=".reset" />
            <input type="submit" name="submit" value="Process File" />
            <input type="hidden" name=".cgifields" value="count"  />
        </form>
        <hr />
        [% IF file.defined %]
            <h2>[% file %]</h2>
            <h3>[% temp_file %]</h3>
            <h4>MIME Type: <i>[% mime_type %]</i></h4>
            <b>Lines: </b>[% lines %]<br />
            <b>Words: </b>[% words %]<br />
            <b>Characters: </b>[% chars %]<br />
        [% END %]
    </body>
</html>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0113 ]--