Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php class DieViolentlyTest extends PHPUnit_Framework_TestCase { public function tes..

Decoded Output download

<?php

class DieViolentlyTest extends PHPUnit_Framework_TestCase
{
    public function testExtensionIsLoaded()
    {
        $this->assertTrue(extension_loaded('blast'),
            "Seems like you don't have blast extension loaded
" .
            "Look in the README.md how to compile and install it"
        );
    }

    public function testExtensionContainsDieViolentlyFunction()
    {
        $this->assertContains('die_violently', get_extension_funcs('blast'));
    }

    public function testExtensionContainsDieViolentlyAfterFunction()
    {
        $this->assertContains('die_violently_after', get_extension_funcs('blast'));
    }

    public function testItWillRaiseSegmentationFault()
    {
        $descriptors = [
            0 => ['pipe', 'r'],
            1 => ['pipe', 'w'],
            2 => ['pipe', 'w'],
        ];
        $cwd = __DIR__ . '/../examples';
        $process = proc_open('php die_violently.php', $descriptors, $pipes, $cwd);
        $stdout = stream_get_contents($pipes[1]);
        $stderr = stream_get_contents($pipes[2]);
        fclose($pipes[1]);
        fclose($pipes[2]);
        $status = proc_get_status($process);
        $this->assertNotEquals(0, $status['exitcode']);
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

class DieViolentlyTest extends PHPUnit_Framework_TestCase
{
    public function testExtensionIsLoaded()
    {
        $this->assertTrue(extension_loaded('blast'),
            "Seems like you don't have blast extension loaded\n" .
            "Look in the README.md how to compile and install it"
        );
    }

    public function testExtensionContainsDieViolentlyFunction()
    {
        $this->assertContains('die_violently', get_extension_funcs('blast'));
    }

    public function testExtensionContainsDieViolentlyAfterFunction()
    {
        $this->assertContains('die_violently_after', get_extension_funcs('blast'));
    }

    public function testItWillRaiseSegmentationFault()
    {
        $descriptors = [
            0 => ['pipe', 'r'],
            1 => ['pipe', 'w'],
            2 => ['pipe', 'w'],
        ];
        $cwd = __DIR__ . '/../examples';
        $process = proc_open('php die_violently.php', $descriptors, $pipes, $cwd);
        $stdout = stream_get_contents($pipes[1]);
        $stderr = stream_get_contents($pipes[2]);
        fclose($pipes[1]);
        fclose($pipes[2]);
        $status = proc_get_status($process);
        $this->assertNotEquals(0, $status['exitcode']);
    }
}

Function Calls

None

Variables

None

Stats

MD5 905a6dc5c680e19d608e40441a6f10c5
Eval Count 0
Decode Time 103 ms