CasperSecurity

Current Path : /var/www/finance.uiet.co.in/UietFinance/vendor/maennchen/zipstream-php/test/
Upload File :
Current File : /var/www/finance.uiet.co.in/UietFinance/vendor/maennchen/zipstream-php/test/Tempfile.php

<?php

declare(strict_types=1);

namespace ZipStream\Test;

trait Tempfile
{
    protected string|null $tempfile;

    /**
     * @var resource
     */
    protected $tempfileStream;

    protected function setUp(): void
    {
        [$tempfile, $tempfileStream] = $this->getTmpFileStream();

        $this->tempfile = $tempfile;
        $this->tempfileStream = $tempfileStream;
    }

    protected function tearDown(): void
    {
        unlink($this->tempfile);
        if (is_resource($this->tempfileStream)) {
            fclose($this->tempfileStream);
        }

        $this->tempfile = null;
        $this->tempfileStream = null;
    }

    protected function getTmpFileStream(): array
    {
        $tmp = tempnam(sys_get_temp_dir(), 'zipstreamtest');
        $stream = fopen($tmp, 'wb+');

        return [$tmp, $stream];
    }
}
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY