!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/it-man.ztu.edu.ua/src/vendor/symfony/process/Pipes/   drwxr-xr-x
Free 116.83 GB of 200.55 GB (58.26%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     WindowsPipes.php (5.32 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Process\Pipes;

use 
Symfony\Component\Process\Process;
use 
Symfony\Component\Process\Exception\RuntimeException;

/**
 * WindowsPipes implementation uses temporary files as handles.
 *
 * @see https://bugs.php.net/bug.php?id=51800
 * @see https://bugs.php.net/bug.php?id=65650
 *
 * @author Romain Neutron <imprec@gmail.com>
 *
 * @internal
 */
class WindowsPipes extends AbstractPipes
{
    
/** @var array */
    
private $files = array();
    
/** @var array */
    
private $fileHandles = array();
    
/** @var array */
    
private $readBytes = array(
        
Process::STDOUT => 0,
        
Process::STDERR => 0,
    );
    
/** @var bool */
    
private $disableOutput;

    public function 
__construct($disableOutput$input)
    {
        
$this->disableOutput = (bool) $disableOutput;

        if (!
$this->disableOutput) {
            
// Fix for PHP bug #51800: reading from STDOUT pipe hangs forever on Windows if the output is too big.
            // Workaround for this problem is to use temporary files instead of pipes on Windows platform.
            //
            // @see https://bugs.php.net/bug.php?id=51800
            
$pipes = array(
                
Process::STDOUT => Process::OUT,
                
Process::STDERR => Process::ERR,
            );
            
$tmpDir sys_get_temp_dir();
            if (!@
fopen($file $tmpDir.'\\sf_proc_00.check''wb')) {
                throw new 
RuntimeException('A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable');
            }
            @
unlink($file);
            for (
$i 0;; ++$i) {
                foreach (
$pipes as $pipe => $name) {
                    
$file sprintf('%s\\sf_proc_%02X.%s'$tmpDir$i$name);
                    if (
file_exists($file) && !@unlink($file)) {
                        continue 
2;
                    }
                    
$h = @fopen($file'xb');
                    if (!
$h || !$this->fileHandles[$pipe] = fopen($file'rb')) {
                        continue 
2;
                    }
                    if (isset(
$this->files[$pipe])) {
                        @
unlink($this->files[$pipe]);
                    }
                    
$this->files[$pipe] = $file;
                }
                break;
            }
        }

        
parent::__construct($input);
    }

    public function 
__destruct()
    {
        
$this->close();
        
$this->removeFiles();
    }

    
/**
     * {@inheritdoc}
     */
    
public function getDescriptors()
    {
        if (
$this->disableOutput) {
            
$nullstream fopen('NUL''c');

            return array(
                array(
'pipe''r'),
                
$nullstream,
                
$nullstream,
            );
        }

        
// We're not using pipe on Windows platform as it hangs (https://bugs.php.net/bug.php?id=51800)
        // We're not using file handles as it can produce corrupted output https://bugs.php.net/bug.php?id=65650
        // So we redirect output within the commandline and pass the nul device to the process
        
return array(
            array(
'pipe''r'),
            array(
'file''NUL''w'),
            array(
'file''NUL''w'),
        );
    }

    
/**
     * {@inheritdoc}
     */
    
public function getFiles()
    {
        return 
$this->files;
    }

    
/**
     * {@inheritdoc}
     */
    
public function readAndWrite($blocking$close false)
    {
        
$this->unblock();
        
$w $this->write();
        
$read $r $e = array();

        if (
$blocking) {
            if (
$w) {
                @
stream_select($r$w$e0Process::TIMEOUT_PRECISION 1E6);
            } elseif (
$this->fileHandles) {
                
usleep(Process::TIMEOUT_PRECISION 1E6);
            }
        }
        foreach (
$this->fileHandles as $type => $fileHandle) {
            
$data stream_get_contents($fileHandle, -1$this->readBytes[$type]);

            if (isset(
$data[0])) {
                
$this->readBytes[$type] += strlen($data);
                
$read[$type] = $data;
            }
            if (
$close) {
                
fclose($fileHandle);
                unset(
$this->fileHandles[$type]);
            }
        }

        return 
$read;
    }

    
/**
     * {@inheritdoc}
     */
    
public function areOpen()
    {
        return 
$this->pipes && $this->fileHandles;
    }

    
/**
     * {@inheritdoc}
     */
    
public function close()
    {
        
parent::close();
        foreach (
$this->fileHandles as $handle) {
            
fclose($handle);
        }
        
$this->fileHandles = array();
    }

    
/**
     * Creates a new WindowsPipes instance.
     *
     * @param Process $process The process
     * @param $input
     *
     * @return WindowsPipes
     */
    
public static function create(Process $process$input)
    {
        return new static(
$process->isOutputDisabled(), $input);
    }

    
/**
     * Removes temporary files.
     */
    
private function removeFiles()
    {
        foreach (
$this->files as $filename) {
            if (
file_exists($filename)) {
                @
unlink($filename);
            }
        }
        
$this->files = array();
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0096 ]--