[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: prober.php
<?php chdir(dirname(__FILE__)); require '../vendor/autoload.php'; // require_once '../Google/Cloud/Firestore/V1beta1/FirestoreClient.php'; // require_once '../Google/Cloud/Spanner/V1/SpannerClient.php'; $firestore_probes = require './firestore_probes.php'; $spanner_probes = require './spanner_probes.php'; require './stackdriver_util.php'; $_OAUTH_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; $_FIRESTORE_TARGET = 'firestore.googleapis.com:443'; $_SPANNER_TARGET = 'spanner.googleapis.com:443'; use Google\Auth\ApplicationDefaultCredentials; use Google\Cloud\Firestore\V1beta1\FirestoreGrpcClient; use Google\Cloud\Spanner\V1\SpannerGrpcClient; function getArgs(){ $options = getopt('',['api:','extension:']); return $options; } /* function secureAuthorizedChannel($credentials, $request, $target, $kwargs){ $metadata_plugin = $transport_grpc->AuthMetadataPlugin($credentials, $request); $ssl_credentials = Grpc\ChannelCredentials::createSsl(); $composit_credentials = $grpc->composite_channel_credentials($ssl_credentials, $google_auth_credentials); return $grpc_gcp->secure_channel($target, $composit_credentials, $kwargs); } function getStubChannel($target){ $res = $auth->default([$_OAUTH_SCOPE]); $cred = $res[0]; return secureAuthorizedChannel($cred, Request(), $target); }*/ function executeProbes($api){ global $_OAUTH_SCOPE; global $_SPANNER_TARGET; global $_FIRESTORE_TARGET; global $spanner_probes; global $firestore_probes; $util = new StackdriverUtil($api); $auth = Google\Auth\ApplicationDefaultCredentials::getCredentials($_OAUTH_SCOPE); $opts = [ 'credentials' => Grpc\ChannelCredentials::createSsl(), 'update_metadata' => $auth->getUpdateMetadataFunc(), ]; if($api == 'spanner'){ $client = new SpannerGrpcClient($_SPANNER_TARGET, $opts); $probe_functions = $spanner_probes; } else if($api == 'firestore'){ $client = new FirestoreGrpcClient($_FIRESTORE_TARGET, $opts); $probe_functions = $firestore_probes; } else{ echo 'grpc not implemented for '.$api; exit(1); } $total = sizeof($probe_functions); $success = 0; $metrics = []; # Execute all probes for given api foreach ($probe_functions as $probe_name => $probe_function) { try{ $probe_function($client, $metrics); $success++; } catch(Exception $e){ $util->reportError($e); } } if($success == $total){ $util->setSuccess(True); } $util->addMetrics($metrics); $util->outputMetrics(); if($success != $total){ # TODO: exit system exit(1); } } function main(){ $args = getArgs(); executeProbes($args['api']); } main();
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium320.web-hosting.com
Server IP: 66.29.153.54
PHP Version: 8.2.29
Server Software: LiteSpeed
System: Linux premium320.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.85 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: aoneqssk
User ID (UID): 1285
Group ID (GID): 1290
Script Owner UID: 1285
Current Dir Owner: 1285