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


Viewing file:     save.cgi (3.46 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Create, update or delete a scheduled mail

require './schedule-lib.pl';
&ReadParseMime();
if (!$in{'new'}) {
    $sched = &get_schedule($in{'id'});
    $cron = &find_cron_job($sched);
    }
else {
    $sched = { };
    }

if ($in{'delete'}) {
    # Just remove schedule
    &delete_schedule($sched);
    &cron::delete_cron_job($cron) if ($cron);
    }
else {
    # Validate and store inputs
    &error_setup($text{'save_err'});
    $in{'subject'} || &error($text{'save_esubject'});
    $sched->{'subject'} = $in{'subject'};
    $in{'mail'} =~ s/\r//g;
    if ($in{'mail'} =~ /\S/ && $in{'mail'} !~ /\n$/) {
        $in{'mail'} .= "\n";
        }
    $sched->{'mail'} = $in{'mail'};
    if ($config{'attach'}) {
        if ($in{'mail_def'}) {
            -r $in{'mailfile'} || &error($text{'save_emailfile'});
            $sched->{'mailfile'} = $in{'mailfile'};
            }
        else {
            $sched->{'mailfile'} = undef;
            }
        }
    if ($in{'to_def'}) {
        delete($sched->{'to'});
        }
    else {
        $in{'to'} || &error($text{'save_eto'});
        $sched->{'to'} = $in{'to'};
        }
    if ($mailbox::config{'edit_from'} == 1) {
        if ($in{'from_def'}) {
            delete($sched->{'from'});
            }
        else {
            $in{'from'} || &error($text{'save_efrom'});
            $sched->{'from'} = $in{'from'};
            }
        }
    $sched->{'cc'} = $in{'cc'};
    $sched->{'bcc'} = $in{'bcc'};
    $sched->{'is_html'} = $in{'is_html'} || undef;
    $sched->{'delete_after'} = $in{'delete_after'} || 0;
    $sched->{'enabled'} = $in{'enabled'};
    if ($in{'mode'} == 1) {
        # At time
        eval { $sched->{'at'} = timelocal(0, $in{'min'}, $in{'hour'},
                          $in{'day'}, $in{'month'}-1, 
                          $in{'year'}-1900) };
        $@ && &error($text{'save_eat'});
        }
    else {
        # Cron time
        delete($sched->{'at'});
        &cron::parse_times_input($sched, \%in);
        }

    # Create or update the schedule
    &save_schedule($sched);
    &cron::delete_cron_job($cron) if ($cron);
    if (!$sched->{'at'}) {
        $job = { "command" => "$cron_cmd $sched->{'id'}",
             "user" => $remote_user,
             "active" => 1,
             "special" => $sched->{'special'},
             "mins" => $sched->{'mins'},
             "hours" => $sched->{'hours'},
             "days" => $sched->{'days'},
             "months" => $sched->{'months'},
             "weekdays" => $sched->{'weekdays'} };
        &cron::create_cron_job($job);
        }

    if ($config{'upload'}) {

        # Add attached file(s)
        for(my $i=0; defined($in{"upload$i"}); $i++) {
            my @files = split(/\0/, $in{"upload$i"});
            my @fnames = split(/\0/, $in{"upload${i}_filename"});
            for my $f (0 .. $#fnames) {
                &create_schedule_file($sched, $files[$f], $fnames[$f] || "unknown");
                }
            }
        
        # Add server attached file
        if ($in{'upload1'}) {
            &create_schedule_file($sched, $in{'upload1'});
            }

        # Add pushed attachments
        for(my $i=0; defined($in{"attach$i"}); $i++) {
            my $id = "attach$i";
            my $name = $id . '_filename';
            &create_schedule_file($sched, $in{$id}, $in{$name}  || "unknown");
            }

        # Add pushed server files
        for(my $i=0; defined($in{"file$i"}); $i++) {
            my $id = "file$i";
            &create_schedule_file($sched, $in{$id});
            }

        # Remove deleted files
        my @files = &list_schedule_files($sched);
        foreach $d (split(/\0/, $in{'d'})) {
            ($file) = grep { $_->{'id'} eq $d } @files;
            &delete_schedule_file($sched, $file) if ($file);
            }
        }
    }

# If this is a one-off job, make sure a cron job exists to detect them
&create_atmode_job();

if ($in{'status'}) {
    &ui_print_header(undef, $text{'save_notice_title'}, "", undef, 0, 0, 0, undef);
    print text('save_notice', "$gconfig{'webprefix'}/@{[get_module_name()]}/edit.cgi?id=$sched->{'id'}");
    &ui_print_footer("", $text{'index_return'});
    } 
else {
    &redirect("");
    }


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