PHP WebShell

Текущая директория: /var/www/bitcardoApp/Old folder

Просмотр файла: send_tsol.php

<?php
define('BITGO_ACCESS_TOKEN', 'v2x198765d1835237bc0185b86b4833a8660d4bd02ab75b396f341276a184cf1e9d');
define('BITGO_API_BASE_URL', 'http://127.0.0.1:3080/api/v2'); // testnet
define('WALLET_PASSPHRASE', 'u5has4ifnClVE7OsyC8f69isYBRYfv9Q'); // Primary wallet

$recipient = 'EvRc5zRQXyDBbnSq83aJddbhidynNug3mz9VwZ2M373Z'; // Secondary wallet
$amount = 2.0 * 1000000000; // sending 0.01 SOL

$walletId = '681d8368afccf75f3c069786905f016b'; // Primary wallet

$data = [
    'address' => $recipient,
    'amount' => $amount,
    'walletPassphrase' => WALLET_PASSPHRASE,
    'type' => 'transfer' // ✅ this is required for Solana
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, BITGO_API_BASE_URL . "/tsol/wallet/$walletId/sendcoins");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Authorization: Bearer ' . BITGO_ACCESS_TOKEN
]);

$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

echo "HTTP $httpCode\n";
echo "Response:\n$response\n";

Выполнить команду


Для локальной разработки. Не используйте в интернете!