One Hat Cyber Team
Your IP:
216.73.216.176
Server IP:
198.54.114.155
Server:
Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
5.6.40
Create File
|
Create Folder
Execute
Dir :
~
/
proc
/
self
/
root
/
proc
/
thread-self
/
cwd
/
View File Name :
Console.tar
TinkerCommand.php 0000644 00000010674 15107350774 0010031 0 ustar 00 <?php namespace Laravel\Tinker\Console; use Illuminate\Console\Command; use Illuminate\Support\Env; use Laravel\Tinker\ClassAliasAutoloader; use Psy\Configuration; use Psy\Shell; use Psy\VersionUpdater\Checker; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; class TinkerCommand extends Command { /** * Artisan commands to include in the tinker shell. * * @var array */ protected $commandWhitelist = [ 'clear-compiled', 'down', 'env', 'inspire', 'migrate', 'migrate:install', 'optimize', 'up', ]; /** * The console command name. * * @var string */ protected $name = 'tinker'; /** * The console command description. * * @var string */ protected $description = 'Interact with your application'; /** * Execute the console command. * * @return int */ public function handle() { $this->getApplication()->setCatchExceptions(false); $config = Configuration::fromInput($this->input); $config->setUpdateCheck(Checker::NEVER); $config->getPresenter()->addCasters( $this->getCasters() ); if ($this->option('execute')) { $config->setRawOutput(true); } $shell = new Shell($config); $shell->addCommands($this->getCommands()); $shell->setIncludes($this->argument('include')); $path = Env::get('COMPOSER_VENDOR_DIR', $this->getLaravel()->basePath().DIRECTORY_SEPARATOR.'vendor'); $path .= '/composer/autoload_classmap.php'; $config = $this->getLaravel()->make('config'); $loader = ClassAliasAutoloader::register( $shell, $path, $config->get('tinker.alias', []), $config->get('tinker.dont_alias', []) ); if ($code = $this->option('execute')) { try { $shell->setOutput($this->output); $shell->execute($code); } finally { $loader->unregister(); } return 0; } try { return $shell->run(); } finally { $loader->unregister(); } } /** * Get artisan commands to pass through to PsySH. * * @return array */ protected function getCommands() { $commands = []; foreach ($this->getApplication()->all() as $name => $command) { if (in_array($name, $this->commandWhitelist)) { $commands[] = $command; } } $config = $this->getLaravel()->make('config'); foreach ($config->get('tinker.commands', []) as $command) { $commands[] = $this->getApplication()->add( $this->getLaravel()->make($command) ); } return $commands; } /** * Get an array of Laravel tailored casters. * * @return array */ protected function getCasters() { $casters = [ 'Illuminate\Support\Collection' => 'Laravel\Tinker\TinkerCaster::castCollection', 'Illuminate\Support\HtmlString' => 'Laravel\Tinker\TinkerCaster::castHtmlString', 'Illuminate\Support\Stringable' => 'Laravel\Tinker\TinkerCaster::castStringable', ]; if (class_exists('Illuminate\Database\Eloquent\Model')) { $casters['Illuminate\Database\Eloquent\Model'] = 'Laravel\Tinker\TinkerCaster::castModel'; } if (class_exists('Illuminate\Process\ProcessResult')) { $casters['Illuminate\Process\ProcessResult'] = 'Laravel\Tinker\TinkerCaster::castProcessResult'; } if (class_exists('Illuminate\Foundation\Application')) { $casters['Illuminate\Foundation\Application'] = 'Laravel\Tinker\TinkerCaster::castApplication'; } $config = $this->getLaravel()->make('config'); return array_merge($casters, (array) $config->get('tinker.casters', [])); } /** * Get the console command arguments. * * @return array */ protected function getArguments() { return [ ['include', InputArgument::IS_ARRAY, 'Include file(s) before starting tinker'], ]; } /** * Get the console command options. * * @return array */ protected function getOptions() { return [ ['execute', null, InputOption::VALUE_OPTIONAL, 'Execute the given code using Tinker'], ]; } } JWTGenerateSecretCommand.php 0000644 00000006140 15111000053 0012024 0 ustar 00 <?php /* * This file is part of jwt-auth. * * (c) Sean Tymon <tymon148@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Tymon\JWTAuth\Console; use Illuminate\Console\Command; use Illuminate\Support\Str; class JWTGenerateSecretCommand extends Command { /** * The console command signature. * * @var string */ protected $signature = 'jwt:secret {--s|show : Display the key instead of modifying files.} {--always-no : Skip generating key if it already exists.} {--f|force : Skip confirmation when overwriting an existing key.}'; /** * The console command description. * * @var string */ protected $description = 'Set the JWTAuth secret key used to sign the tokens'; /** * Execute the console command. * * @return void */ public function handle() { $key = Str::random(64); if ($this->option('show')) { $this->comment($key); return; } if (file_exists($path = $this->envPath()) === false) { return $this->displayKey($key); } if (Str::contains(file_get_contents($path), 'JWT_SECRET') === false) { // create new entry file_put_contents($path, PHP_EOL."JWT_SECRET=$key".PHP_EOL, FILE_APPEND); } else { if ($this->option('always-no')) { $this->comment('Secret key already exists. Skipping...'); return; } if ($this->isConfirmed() === false) { $this->comment('Phew... No changes were made to your secret key.'); return; } // update existing entry file_put_contents($path, str_replace( 'JWT_SECRET='.$this->laravel['config']['jwt.secret'], 'JWT_SECRET='.$key, file_get_contents($path) )); } $this->displayKey($key); } /** * Display the key. * * @param string $key * @return void */ protected function displayKey($key) { $this->laravel['config']['jwt.secret'] = $key; $this->info("jwt-auth secret [$key] set successfully."); } /** * Check if the modification is confirmed. * * @return bool */ protected function isConfirmed() { return $this->option('force') ? true : $this->confirm( 'This will invalidate all existing tokens. Are you sure you want to override the secret key?' ); } /** * Get the .env file path. * * @return string */ protected function envPath() { if (method_exists($this->laravel, 'environmentFilePath')) { return $this->laravel->environmentFilePath(); } // check if laravel version Less than 5.4.17 if (version_compare($this->laravel->version(), '5.4.17', '<')) { return $this->laravel->basePath().DIRECTORY_SEPARATOR.'.env'; } return $this->laravel->basePath('.env'); } } PublishCommand.php 0000644 00000002767 15111172722 0010175 0 ustar 00 <?php namespace Laravel\Sail\Console; use Illuminate\Console\Command; class PublishCommand extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'sail:publish'; /** * The console command description. * * @var string */ protected $description = 'Publish the Laravel Sail Docker files'; /** * Execute the console command. * * @return void */ public function handle() { $this->call('vendor:publish', ['--tag' => 'sail-docker']); $this->call('vendor:publish', ['--tag' => 'sail-database']); file_put_contents( $this->laravel->basePath('docker-compose.yml'), str_replace( [ './vendor/laravel/sail/runtimes/8.3', './vendor/laravel/sail/runtimes/8.2', './vendor/laravel/sail/runtimes/8.1', './vendor/laravel/sail/runtimes/8.0', './vendor/laravel/sail/database/mysql', './vendor/laravel/sail/database/pgsql' ], [ './docker/8.3', './docker/8.2', './docker/8.1', './docker/8.0', './docker/mysql', './docker/pgsql' ], file_get_contents($this->laravel->basePath('docker-compose.yml')) ) ); } } Concerns/InteractsWithDockerComposeServices.php 0000644 00000022367 15111172722 0016012 0 ustar 00 <?php namespace Laravel\Sail\Console\Concerns; use Symfony\Component\Process\Process; use Symfony\Component\Yaml\Yaml; trait InteractsWithDockerComposeServices { /** * The available services that may be installed. * * @var array<string> */ protected $services = [ 'mysql', 'pgsql', 'mariadb', 'redis', 'memcached', 'meilisearch', 'minio', 'mailpit', 'selenium', 'soketi', ]; /** * The default services used when the user chooses non-interactive mode. * * @var string[] */ protected $defaultServices = ['mysql', 'redis', 'selenium', 'mailpit']; /** * Gather the desired Sail services using an interactive prompt. * * @return array */ protected function gatherServicesInteractively() { if (function_exists('\Laravel\Prompts\multiselect')) { return \Laravel\Prompts\multiselect( label: 'Which services would you like to install?', options: $this->services, default: ['mysql'], ); } return $this->choice('Which services would you like to install?', $this->services, 0, null, true); } /** * Build the Docker Compose file. * * @param array $services * @return void */ protected function buildDockerCompose(array $services) { $composePath = base_path('docker-compose.yml'); $compose = file_exists($composePath) ? Yaml::parseFile($composePath) : Yaml::parse(file_get_contents(__DIR__ . '/../../../stubs/docker-compose.stub')); // Adds the new services as dependencies of the laravel.test service... if (! array_key_exists('laravel.test', $compose['services'])) { $this->warn('Couldn\'t find the laravel.test service. Make sure you add ['.implode(',', $services).'] to the depends_on config.'); } else { $compose['services']['laravel.test']['depends_on'] = collect($compose['services']['laravel.test']['depends_on'] ?? []) ->merge($services) ->unique() ->values() ->all(); } // Add the services to the docker-compose.yml... collect($services) ->filter(function ($service) use ($compose) { return ! array_key_exists($service, $compose['services'] ?? []); })->each(function ($service) use (&$compose) { $compose['services'][$service] = Yaml::parseFile(__DIR__ . "/../../../stubs/{$service}.stub")[$service]; }); // Merge volumes... collect($services) ->filter(function ($service) { return in_array($service, ['mysql', 'pgsql', 'mariadb', 'redis', 'meilisearch', 'minio']); })->filter(function ($service) use ($compose) { return ! array_key_exists($service, $compose['volumes'] ?? []); })->each(function ($service) use (&$compose) { $compose['volumes']["sail-{$service}"] = ['driver' => 'local']; }); // If the list of volumes is empty, we can remove it... if (empty($compose['volumes'])) { unset($compose['volumes']); } // Replace Selenium with ARM base container on Apple Silicon... if (in_array('selenium', $services) && in_array(php_uname('m'), ['arm64', 'aarch64'])) { $compose['services']['selenium']['image'] = 'seleniarm/standalone-chromium'; } file_put_contents($this->laravel->basePath('docker-compose.yml'), Yaml::dump($compose, Yaml::DUMP_OBJECT_AS_MAP)); } /** * Replace the Host environment variables in the app's .env file. * * @param array $services * @return void */ protected function replaceEnvVariables(array $services) { $environment = file_get_contents($this->laravel->basePath('.env')); if (in_array('pgsql', $services)) { $environment = str_replace('DB_CONNECTION=mysql', "DB_CONNECTION=pgsql", $environment); $environment = str_replace('DB_HOST=127.0.0.1', "DB_HOST=pgsql", $environment); $environment = str_replace('DB_PORT=3306', "DB_PORT=5432", $environment); } elseif (in_array('mariadb', $services)) { $environment = str_replace('DB_HOST=127.0.0.1', "DB_HOST=mariadb", $environment); } else { $environment = str_replace('DB_HOST=127.0.0.1', "DB_HOST=mysql", $environment); } $environment = str_replace('DB_USERNAME=root', "DB_USERNAME=sail", $environment); $environment = preg_replace("/DB_PASSWORD=(.*)/", "DB_PASSWORD=password", $environment); if (in_array('memcached', $services)) { $environment = str_replace('MEMCACHED_HOST=127.0.0.1', 'MEMCACHED_HOST=memcached', $environment); } if (in_array('redis', $services)) { $environment = str_replace('REDIS_HOST=127.0.0.1', 'REDIS_HOST=redis', $environment); } if (in_array('meilisearch', $services)) { $environment .= "\nSCOUT_DRIVER=meilisearch"; $environment .= "\nMEILISEARCH_HOST=http://meilisearch:7700\n"; $environment .= "\nMEILISEARCH_NO_ANALYTICS=false\n"; } if (in_array('soketi', $services)) { $environment = preg_replace("/^BROADCAST_DRIVER=(.*)/m", "BROADCAST_DRIVER=pusher", $environment); $environment = preg_replace("/^PUSHER_APP_ID=(.*)/m", "PUSHER_APP_ID=app-id", $environment); $environment = preg_replace("/^PUSHER_APP_KEY=(.*)/m", "PUSHER_APP_KEY=app-key", $environment); $environment = preg_replace("/^PUSHER_APP_SECRET=(.*)/m", "PUSHER_APP_SECRET=app-secret", $environment); $environment = preg_replace("/^PUSHER_HOST=(.*)/m", "PUSHER_HOST=soketi", $environment); $environment = preg_replace("/^PUSHER_PORT=(.*)/m", "PUSHER_PORT=6001", $environment); $environment = preg_replace("/^PUSHER_SCHEME=(.*)/m", "PUSHER_SCHEME=http", $environment); $environment = preg_replace("/^VITE_PUSHER_HOST=(.*)/m", "VITE_PUSHER_HOST=localhost", $environment); } if (in_array('mailpit', $services)) { $environment = preg_replace("/^MAIL_HOST=(.*)/m", "MAIL_HOST=mailpit", $environment); } file_put_contents($this->laravel->basePath('.env'), $environment); } /** * Configure PHPUnit to use the dedicated testing database. * * @return void */ protected function configurePhpUnit() { if (! file_exists($path = $this->laravel->basePath('phpunit.xml'))) { $path = $this->laravel->basePath('phpunit.xml.dist'); } $phpunit = file_get_contents($path); $phpunit = preg_replace('/^.*DB_CONNECTION.*\n/m', '', $phpunit); $phpunit = str_replace('<!-- <env name="DB_DATABASE" value=":memory:"/> -->', '<env name="DB_DATABASE" value="testing"/>', $phpunit); file_put_contents($this->laravel->basePath('phpunit.xml'), $phpunit); } /** * Install the devcontainer.json configuration file. * * @return void */ protected function installDevContainer() { if (! is_dir($this->laravel->basePath('.devcontainer'))) { mkdir($this->laravel->basePath('.devcontainer'), 0755, true); } file_put_contents( $this->laravel->basePath('.devcontainer/devcontainer.json'), file_get_contents(__DIR__.'/../../../stubs/devcontainer.stub') ); $environment = file_get_contents($this->laravel->basePath('.env')); $environment .= "\nWWWGROUP=1000"; $environment .= "\nWWWUSER=1000\n"; file_put_contents($this->laravel->basePath('.env'), $environment); } /** * Prepare the installation by pulling and building any necessary images. * * @param array $services * @return void */ protected function prepareInstallation($services) { // Ensure docker is installed... if ($this->runCommands(['docker info > /dev/null 2>&1']) !== 0) { return; } if (count($services) > 0) { $status = $this->runCommands([ './vendor/bin/sail pull '.implode(' ', $services), ]); if ($status === 0) { $this->info('Sail images installed successfully.'); } } $status = $this->runCommands([ './vendor/bin/sail build', ]); if ($status === 0) { $this->info('Sail build successful.'); } } /** * Run the given commands. * * @param array $commands * @return int */ protected function runCommands($commands) { $process = Process::fromShellCommandline(implode(' && ', $commands), null, null, null, null); if ('\\' !== DIRECTORY_SEPARATOR && file_exists('/dev/tty') && is_readable('/dev/tty')) { try { $process->setTty(true); } catch (\RuntimeException $e) { $this->output->writeln(' <bg=yellow;fg=black> WARN </> '.$e->getMessage().PHP_EOL); } } return $process->run(function ($type, $line) { $this->output->write(' '.$line); }); } } InstallCommand.php 0000644 00000003226 15111172722 0010164 0 ustar 00 <?php namespace Laravel\Sail\Console; use Illuminate\Console\Command; use RuntimeException; use Symfony\Component\Process\Process; class InstallCommand extends Command { use Concerns\InteractsWithDockerComposeServices; /** * The name and signature of the console command. * * @var string */ protected $signature = 'sail:install {--with= : The services that should be included in the installation} {--devcontainer : Create a .devcontainer configuration directory}'; /** * The console command description. * * @var string */ protected $description = 'Install Laravel Sail\'s default Docker Compose file'; /** * Execute the console command. * * @return int|null */ public function handle() { if ($this->option('with')) { $services = $this->option('with') == 'none' ? [] : explode(',', $this->option('with')); } elseif ($this->option('no-interaction')) { $services = $this->defaultServices; } else { $services = $this->gatherServicesInteractively(); } if ($invalidServices = array_diff($services, $this->services)) { $this->error('Invalid services ['.implode(',', $invalidServices).'].'); return 1; } $this->buildDockerCompose($services); $this->replaceEnvVariables($services); $this->configurePhpUnit(); if ($this->option('devcontainer')) { $this->installDevContainer(); } $this->info('Sail scaffolding installed successfully.'); $this->prepareInstallation($services); } } AddCommand.php 0000644 00000002727 15111172722 0007253 0 ustar 00 <?php namespace Laravel\Sail\Console; use Illuminate\Console\Command; use Laravel\Sail\Console\Concerns\InteractsWithDockerComposeServices; class AddCommand extends Command { use InteractsWithDockerComposeServices; /** * The name and signature of the console command. * * @var string */ protected $signature = 'sail:add {services? : The services that should be added} '; /** * The console command description. * * @var string */ protected $description = 'Add a service to an existing Sail installation'; /** * Execute the console command. * * @return int|null */ public function handle() { if ($this->argument('services')) { $services = $this->argument('services') == 'none' ? [] : explode(',', $this->argument('services')); } elseif ($this->option('no-interaction')) { $services = $this->defaultServices; } else { $services = $this->gatherServicesInteractively(); } if ($invalidServices = array_diff($services, $this->services)) { $this->error('Invalid services ['.implode(',', $invalidServices).'].'); return 1; } $this->buildDockerCompose($services); $this->replaceEnvVariables($services); $this->configurePhpUnit(); $this->info('Additional Sail services installed successfully.'); $this->prepareInstallation($services); } } error_log 0000644 00000002602 15111241200 0006444 0 ustar 00 [18-Nov-2025 14:07:04 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Foundation\Console\Kernel" not found in /home/fluxyjvi/public_html/project/app/Console/Kernel.php:8 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Console/Kernel.php on line 8 [18-Nov-2025 22:56:12 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Foundation\Console\Kernel" not found in /home/fluxyjvi/public_html/project/app/Console/Kernel.php:8 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Console/Kernel.php on line 8 [18-Nov-2025 23:34:01 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Foundation\Console\Kernel" not found in /home/fluxyjvi/public_html/project/app/Console/Kernel.php:8 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Console/Kernel.php on line 8 [19-Nov-2025 06:33:42 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Foundation\Console\Kernel" not found in /home/fluxyjvi/public_html/project/app/Console/Kernel.php:8 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Console/Kernel.php on line 8 [22-Nov-2025 04:40:04 UTC] PHP Fatal error: Uncaught Error: Class "Illuminate\Foundation\Console\Kernel" not found in /home/fluxyjvi/public_html/project/app/Console/Kernel.php:8 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/app/Console/Kernel.php on line 8 Kernel.php 0000644 00000001251 15111241200 0006457 0 ustar 00 <?php namespace App\Console; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; class Kernel extends ConsoleKernel { /** * Define the application's command schedule. * * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return void */ protected function schedule(Schedule $schedule) { // $schedule->command('inspire')->hourly(); } /** * Register the commands for the application. * * @return void */ protected function commands() { $this->load(__DIR__.'/Commands'); require base_path('routes/console.php'); } }