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 session_start(); class CCCAM{ private $ConfigFile = "/var/etc/CCcam.cfg"..

Decoded Output download

<?php 
session_start(); 
class CCCAM{ 
 
    private $ConfigFile   =  "/var/etc/CCcam.cfg"; # path your cccam.cfg in vps multics 
    public  $Username; 
    public  $ExpireDate; 
    public  $UserIp; 
    public  $Errors; 
    public function __construct($user,$expi,$ip , $pass = null){ 
        $this->Username     = $user ; 
        $this->ExpireDate   = $expi ; 
        $this->UserIp       = $ip ; 
 
 
        if($pass !== null){ 
            $this->Password = $pass ; 
        } 
    } 
 
    public function init(){ 
 
        $this->AddUsername(); 
    } 
 
    private function AddUsername(){ 
        $fp        = fopen($this->ConfigFile, 'a'); 
        $addF      =  "F: ".$this->Username. " " .$this->Password. " " . "{reshare=0; dcwmintime=150ms;name=".$this->UserIp."; enddate=" .$this->ExpireDate." }
"; 
        $insertmcs = fwrite($fp,$addF); 
        fclose($fp); 
        return $insertmcs ; 
    } 
 
 
} 
 
 
$UserIp     = $_SERVER['REMOTE_ADDR']; 
$ExpireDate = date('Y-m-d', strtotime("+1 day")); 
$file_path = '/var/etc/CCcam.cfg' ; # path your cccam.cfg vps multics 
 
 
 
    function generateRandomString($length = 10) { 
        $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; 
        $charactersLength = strlen($characters); 
        $randomString = ''; 
        for ($i = 0; $i < $length; $i++) { 
            $randomString .= $characters[rand(0, $charactersLength - 1)]; 
        } 
        return $randomString; 
    } 
 
 
    if( isset($_GET['generate'])){ 
 
        if(isset($_GET['user']) && $_GET['user'] !== null){ 
 
            $username = $_GET['user']; 
 
        }else { 
            $username = generateRandomString(10) ; 
 
 
        } 
 
        if(isset($_GET['pass']) && $_GET['pass'] !== null){ 
 
            $password = $_GET['pass'] ; 
        } else { 
            $password = null ; 
        } 
 
        if(isset($_GET['expiry_date']) && $_GET['expiry_date'] !== null){ 
            $ExpireDate = $_GET['expiry_date'] ; 
        } 
 
        if ($username !== null){ 
            $_SESSION['ip']     = $_SERVER['REMOTE_ADDR']; 
 
 
 
                if(isset($_GET['ip_address'])) { 
                    $UserIp = $_GET['ip_address'] ; 
                } 
 
                $cccam = new CCCAM($username,$ExpireDate,$UserIp,$password); 
 
                $cccam->init(); 
                exit(); 
 
 
        } 
 
 
 
 
    } 
 
 
    if( isset($_GET['edit_file'])){ 
 
 
        if(isset($_GET['user']) && $_GET['user'] !== null && isset($_GET['pass']) && $_GET['pass'] !== null){ 
 
            $username = $_GET['user']; 
 
            if(isset($_GET['new_user']) && $_GET['new_user'] !== null){ 
                $new_user = $_GET['new_user'] ; 
            } else { 
                $new_user = $username ; 
            } 
 
            $password = $_GET['pass'] ; 
 
            if(isset($_GET['expiry_date']) && $_GET['expiry_date'] !== null) { 
                $ExpireDate = $_GET['expiry_date']; 
            } 
 
            if(isset($_GET['ip_address'])) { 
                $UserIp = $_GET['ip_address'] ; 
            } 
 
            $replacement_content = 
 
                 "F: ".$new_user. " " .$password. " " . "{reshare=0; dcwmintime=150ms;name=".$UserIp."; enddate=" .$ExpireDate." }
"; 
 
             $_SESSION['username_edit'] = " ".$username." " ; 
 
 
             $_SESSION['replaced_content'] = $replacement_content ; 
 
 
             if(isset($_GET['blocked_status'])){ 
 
                 if($_GET['blocked_status'] === 'blocked'){ 
 
                     $_SESSION['replaced_content'] =     "/F: ".$new_user. " " .$password. " " . "{reshare=0; dcwmintime=150ms;name=".$UserIp."; enddate=" .$ExpireDate." }
";' #blocked'; 
 
                 } else { 
 
                     $_SESSION['replaced_content'] =     "F: ".$new_user. " " .$password. " " . "{reshare=0; dcwmintime=150ms;name=".$UserIp."; enddate=" .$ExpireDate." }
";' #unblocked'; 
 
                 } 
 
             } 
 
 
                file_put_contents($file_path, implode('', 
           array_map(function($data) { 
               return stristr($data,$_SESSION['username_edit']) ? $_SESSION['replaced_content'] : $data; 
           }, file($file_path)) 
             )); 
 
 
 
 
 
 
        } 
 
 
 
 
 
 
 
 
 
    } 
 
 
    if( isset($_GET['delete_file'])){ 
 
 
 
        if(isset($_GET['user']) && $_GET['user'] !== null && isset($_GET['pass']) && $_GET['pass'] !== null){ 
 
            $username = $_GET['user']; 
 
 
            $password = $_GET['pass'] ; 
 
 
 
            $replacement_content = 
 
'' ; 
            $_SESSION['username_edit'] = " ".$username." " ; 
            $_SESSION['replaced_content'] = $replacement_content ; 
 
            file_put_contents($file_path, implode('', 
                array_map(function($data) { 
                    return stristr($data,$_SESSION['username_edit']) ? $_SESSION['replaced_content'] : $data; 
                }, file($file_path)) 
            )); 
 
 
 
 
 
 
        } 
 
 
 
 
 
 
 
 
 
    } 
 
 
 
 
 
 
?> 

Did this file decode correctly?

Original Code

<?php
session_start();
class CCCAM{

    private $ConfigFile   =  "/var/etc/CCcam.cfg"; # path your cccam.cfg in vps multics
    public  $Username;
    public  $ExpireDate;
    public  $UserIp;
    public  $Errors;
    public function __construct($user,$expi,$ip , $pass = null){
        $this->Username     = $user ;
        $this->ExpireDate   = $expi ;
        $this->UserIp       = $ip ;


        if($pass !== null){
            $this->Password = $pass ;
        }
    }

    public function init(){

        $this->AddUsername();
    }

    private function AddUsername(){
        $fp        = fopen($this->ConfigFile, 'a');
        $addF      =  "F: ".$this->Username. " " .$this->Password. " " . "{reshare=0; dcwmintime=150ms;name=".$this->UserIp."; enddate=" .$this->ExpireDate." }\n";
        $insertmcs = fwrite($fp,$addF);
        fclose($fp);
        return $insertmcs ;
    }


}


$UserIp     = $_SERVER['REMOTE_ADDR'];
$ExpireDate = date('Y-m-d', strtotime("+1 day"));
$file_path = '/var/etc/CCcam.cfg' ; # path your cccam.cfg vps multics



    function generateRandomString($length = 10) {
        $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
        $charactersLength = strlen($characters);
        $randomString = '';
        for ($i = 0; $i < $length; $i++) {
            $randomString .= $characters[rand(0, $charactersLength - 1)];
        }
        return $randomString;
    }


    if( isset($_GET['generate'])){

        if(isset($_GET['user']) && $_GET['user'] !== null){

            $username = $_GET['user'];

        }else {
            $username = generateRandomString(10) ;


        }

        if(isset($_GET['pass']) && $_GET['pass'] !== null){

            $password = $_GET['pass'] ;
        } else {
            $password = null ;
        }

        if(isset($_GET['expiry_date']) && $_GET['expiry_date'] !== null){
            $ExpireDate = $_GET['expiry_date'] ;
        }

        if ($username !== null){
            $_SESSION['ip']     = $_SERVER['REMOTE_ADDR'];



                if(isset($_GET['ip_address'])) {
                    $UserIp = $_GET['ip_address'] ;
                }

                $cccam = new CCCAM($username,$ExpireDate,$UserIp,$password);

                $cccam->init();
                exit();


        }




    }


    if( isset($_GET['edit_file'])){


        if(isset($_GET['user']) && $_GET['user'] !== null && isset($_GET['pass']) && $_GET['pass'] !== null){

            $username = $_GET['user'];

            if(isset($_GET['new_user']) && $_GET['new_user'] !== null){
                $new_user = $_GET['new_user'] ;
            } else {
                $new_user = $username ;
            }

            $password = $_GET['pass'] ;

            if(isset($_GET['expiry_date']) && $_GET['expiry_date'] !== null) {
                $ExpireDate = $_GET['expiry_date'];
            }

            if(isset($_GET['ip_address'])) {
                $UserIp = $_GET['ip_address'] ;
            }

            $replacement_content =

                 "F: ".$new_user. " " .$password. " " . "{reshare=0; dcwmintime=150ms;name=".$UserIp."; enddate=" .$ExpireDate." }\n";

             $_SESSION['username_edit'] = " ".$username." " ;


             $_SESSION['replaced_content'] = $replacement_content ;


             if(isset($_GET['blocked_status'])){

                 if($_GET['blocked_status'] === 'blocked'){

                     $_SESSION['replaced_content'] =     "/F: ".$new_user. " " .$password. " " . "{reshare=0; dcwmintime=150ms;name=".$UserIp."; enddate=" .$ExpireDate." }\n";' #blocked';

                 } else {

                     $_SESSION['replaced_content'] =     "F: ".$new_user. " " .$password. " " . "{reshare=0; dcwmintime=150ms;name=".$UserIp."; enddate=" .$ExpireDate." }\n";' #unblocked';

                 }

             }


                file_put_contents($file_path, implode('',
           array_map(function($data) {
               return stristr($data,$_SESSION['username_edit']) ? $_SESSION['replaced_content'] : $data;
           }, file($file_path))
             ));






        }









    }


    if( isset($_GET['delete_file'])){



        if(isset($_GET['user']) && $_GET['user'] !== null && isset($_GET['pass']) && $_GET['pass'] !== null){

            $username = $_GET['user'];


            $password = $_GET['pass'] ;



            $replacement_content =

'' ;
            $_SESSION['username_edit'] = " ".$username." " ;
            $_SESSION['replaced_content'] = $replacement_content ;

            file_put_contents($file_path, implode('',
                array_map(function($data) {
                    return stristr($data,$_SESSION['username_edit']) ? $_SESSION['replaced_content'] : $data;
                }, file($file_path))
            ));






        }









    }






?>

Function Calls

session_start 1

Variables

None

Stats

MD5 589cfead3416915664cfb17c923c6cc2
Eval Count 0
Decode Time 86 ms