!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: nginx/1.24.0. PHP/7.3.32 

uname -a: Linux ip-172-31-28-255.ec2.internal 6.1.159-181.297.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC
Mon Dec 22 22:31:59 UTC 2025 x86_64
 

 

Safe-mode: OFF (not secure)

/www/wwwroot/itce.co.in/itce.co.in/data/classes/security/   drwxr-xr-x
Free 30.73 GB of 49.93 GB (61.56%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

class SecurityPluginGoogle extends SecurityPlugin {

    
/**
     * @constructor
     */
    
function __construct()
    {
        
parent::__construct();
        
// client id
        
$this->appId GetGlobalData("GoogleClientId""");
    }

    public function 
getUserInfo$id_token )
    {
        global 
$cCharset;

//        require_once getabspath('plugins/google-api-php-client/vendor/autoload.php');
//        $client = new Google_Client( array( 'client_id' => $this->appId ) );
//        $payload = $client->verifyIdToken($id_token);

        
$payload $this->verifyIdToken$id_token );

        if( 
$payload["error"] )
            
$this->error "Google security plugin: "
                
.$payload["error"]." ".$payload["error_description"];

        if( !
$payload || $payload["error"] )
            return array();

        
//    save token in cookies
        
setProjectCookie'google_token'$id_tokentime() + 30 1440 60true );

        
$ret = array(
                
"id" => "go".$payload["sub"],
                
"name" => runner_convert_encoding$payload["name"], $cCharset'UTF-8' ),
                
"email" => $payload["email"],
                
"raw" => $payload
            
);

        if( 
$payload["picture"] ) {
            
$picResult runner_http_request$payload["picture"], array(), "GET", array(), false );
            if( 
$picResult["content"] )
                
$ret["picture"] = $picResult["content"];
        }

        return 
$ret;
    }

    public function 
verifyIdToken$id_token ) {
        
$certPath getabspath('include/cacert.pem');

        
$headers = array();
        
$headers["User-Agent"] = "PHPRunner app";
        
$headers["Accept-Charset"] = "utf-8";

        
$params = array( "id_token" => $id_token );


        
$url "https://oauth2.googleapis.com/tokeninfo";

        
$response runner_http_requestprepareUrl$url$params ),
            array(),
            
"GET",
            
$headers,
            
$certPath);

        if( 
$response["error"] ) {
            
$this->error $response["error"];
            return 
false;
        }

        
$payload my_json_decode$response["content"] );
        if( !
$payload ) {
            
// payload is not valid JSON
            
$this->error $response["content"];
            return 
false;
        }
        
$domain GetGlobalData("GoogleDomain""");
        if( 
$domain ) {
            if( 
$payload["hd"] != $domain ) {
                
$this->error str_replace"%s"$domainmlang_message'GOOGLE_DOMAIN' ));
                return 
false;
            }
        }

        return 
$payload;
    }

    public function 
getJSSettings()
    {
        return array(
            
"isGoogleSignIn" => true,
            
"GoogleClientId" => $this->appId
        
);
    }

    public function 
onLogout()
    {
        
setProjectCookie'google_token'""time() - 1true );
    }

    public function 
savedToken()
    {
        return 
$_COOKIE'google_token' ];
    }
}
?>

:: 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 KaizenLouie | C99Shell Github | Generation time: 0.0024 ]--