!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:     LogCollection.php (4.93 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

declare(strict_types=1);

namespace 
Arcanedev\LogViewer\Entities;

use 
Arcanedev\LogViewer\Contracts\Utilities\Filesystem as FilesystemContract;
use 
Arcanedev\LogViewer\Exceptions\LogNotFoundException;
use 
Illuminate\Pagination\LengthAwarePaginator;
use 
Illuminate\Support\LazyCollection;

/**
 * Class     LogCollection
 *
 * @author   ARCANEDEV <arcanedev.maroc@gmail.com>
 */
class LogCollection extends LazyCollection
{
    
/* -----------------------------------------------------------------
     |  Properties
     | -----------------------------------------------------------------
     */

    /** @var \Arcanedev\LogViewer\Contracts\Utilities\Filesystem */
    
private $filesystem;

    
/* -----------------------------------------------------------------
     |  Constructor
     | -----------------------------------------------------------------
     */

    /**
     * LogCollection constructor.
     *
     * @param  mixed  $source
     */
    
public function __construct($source null)
    {
        
$this->setFilesystem(app(FilesystemContract::class));

        if (
is_null($source))
            
$source = function () {
                foreach(
$this->filesystem->dates(true) as $date => $path) {
                    yield 
$date => Log::make($date$path$this->filesystem->read($date));
                }
            };

        
parent::__construct($source);
    }

    
/* -----------------------------------------------------------------
     |  Getters & Setters
     | -----------------------------------------------------------------
     */

    /**
     * Set the filesystem instance.
     *
     * @param  \Arcanedev\LogViewer\Contracts\Utilities\Filesystem  $filesystem
     *
     * @return \Arcanedev\LogViewer\Entities\LogCollection
     */
    
public function setFilesystem(FilesystemContract $filesystem)
    {
        
$this->filesystem $filesystem;

        return 
$this;
    }

    
/* -----------------------------------------------------------------
     |  Main Methods
     | -----------------------------------------------------------------
     */

    /**
     * Get a log.
     *
     * @param  string      $date
     * @param  mixed|null  $default
     *
     * @return \Arcanedev\LogViewer\Entities\Log
     *
     * @throws \Arcanedev\LogViewer\Exceptions\LogNotFoundException
     */
    
public function get($date$default null)
    {
        if ( ! 
$this->has($date))
            throw 
LogNotFoundException::make($date);

        return 
parent::get($date$default);
    }

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

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

    
/**
     * Get a log (alias).
     *
     * @see get()
     *
     * @param  string  $date
     *
     * @return \Arcanedev\LogViewer\Entities\Log
     */
    
public function log($date)
    {
        return 
$this->get($date);
    }


    
/**
     * Get log entries.
     *
     * @param  string  $date
     * @param  string  $level
     *
     * @return \Arcanedev\LogViewer\Entities\LogEntryCollection
     */
    
public function entries($date$level 'all')
    {
        return 
$this->get($date)->entries($level);
    }

    
/**
     * Get logs statistics.
     *
     * @return array
     */
    
public function stats()
    {
        
$stats = [];

        foreach (
$this->all() as $date => $log) {
            
/** @var \Arcanedev\LogViewer\Entities\Log $log */
            
$stats[$date] = $log->stats();
        }

        return 
$stats;
    }

    
/**
     * List the log files (dates).
     *
     * @return array
     */
    
public function dates()
    {
        return 
$this->keys()->toArray();
    }

    
/**
     * Get entries total.
     *
     * @param  string  $level
     *
     * @return int
     */
    
public function total($level 'all')
    {
        return (int) 
$this->sum(function (Log $log) use ($level) {
            return 
$log->entries($level)->count();
        });
    }

    
/**
     * Get logs tree.
     *
     * @param  bool  $trans
     *
     * @return array
     */
    
public function tree($trans false)
    {
        
$tree = [];

        foreach (
$this->all() as $date => $log) {
            
/** @var \Arcanedev\LogViewer\Entities\Log $log */
            
$tree[$date] = $log->tree($trans);
        }

        return 
$tree;
    }

    
/**
     * Get logs menu.
     *
     * @param  bool  $trans
     *
     * @return array
     */
    
public function menu($trans true)
    {
        
$menu = [];

        foreach (
$this->all() as $date => $log) {
            
/** @var \Arcanedev\LogViewer\Entities\Log $log */
            
$menu[$date] = $log->menu($trans);
        }

        return 
$menu;
    }
}

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