T.ME/BIBIL_0DAY
CasperSecurity


Server : Apache/2
System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User : gositeme ( 1004)
PHP Version : 8.2.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/gositeme/domains/soundstudiopro.com/private_html/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/soundstudiopro.com/private_html/utils/update_to_proxy.php
<?php
// Update database to use secure proxy URLs
require_once 'config/database.php';

echo "<h1>🔒 Update to Secure Proxy URLs</h1>";

$pdo = getDBConnection();
if (!$pdo) {
    echo "<p style='color: red;'>❌ Database connection failed!</p>";
    exit;
}

// Find tracks with API BOX URLs
$stmt = $pdo->prepare("SELECT * FROM music_tracks WHERE audio_url LIKE '%api.box%' AND status = 'complete' ORDER BY created_at DESC");
$stmt->execute();
$tracks = $stmt->fetchAll();

if (empty($tracks)) {
    echo "<p style='color: orange;'>⚠️ No tracks found with API BOX URLs</p>";
} else {
    echo "<p style='color: green;'>✅ Found " . count($tracks) . " track(s) to update:</p>";
    
    foreach ($tracks as $track) {
        echo "<div style='border: 1px solid #ccc; padding: 15px; margin: 10px 0; border-radius: 5px;'>";
        echo "<h3>" . htmlspecialchars($track['title']) . "</h3>";
        echo "<p><strong>Task ID:</strong> " . $track['task_id'] . "</p>";
        echo "<p><strong>Old URL:</strong> " . htmlspecialchars($track['audio_url']) . "</p>";
        
        // Create secure proxy URL
        $proxyUrl = '/audio_proxy.php?task_id=' . $track['task_id'];
        
        echo "<p><strong>New Proxy URL:</strong> " . htmlspecialchars($proxyUrl) . "</p>";
        
        // Update database
        $updateStmt = $pdo->prepare("UPDATE music_tracks SET audio_url = ? WHERE id = ?");
        $result = $updateStmt->execute([$proxyUrl, $track['id']]);
        
        if ($result) {
            echo "<p style='color: green;'>✅ Updated to secure proxy URL</p>";
            echo "<p><strong>Test Link:</strong> <a href='" . htmlspecialchars($proxyUrl) . "' target='_blank'>Play Audio</a></p>";
        } else {
            echo "<p style='color: red;'>❌ Failed to update database</p>";
        }
        
        echo "</div>";
    }
}

// Show all tracks after update
echo "<h2>🎵 All Tracks After Update:</h2>";
$stmt = $pdo->prepare("SELECT * FROM music_tracks WHERE status = 'complete' ORDER BY created_at DESC");
$stmt->execute();
$allTracks = $stmt->fetchAll();

if (empty($allTracks)) {
    echo "<p style='color: orange;'>⚠️ No complete tracks found</p>";
} else {
    echo "<p style='color: green;'>✅ Found " . count($allTracks) . " complete track(s):</p>";
    
    foreach ($allTracks as $track) {
        echo "<div style='border: 1px solid #ccc; padding: 15px; margin: 10px 0; border-radius: 5px;'>";
        echo "<h3>" . htmlspecialchars($track['title']) . "</h3>";
        echo "<p><strong>Status:</strong> " . $track['status'] . "</p>";
        echo "<p><strong>Audio URL:</strong> " . ($track['audio_url'] ? "<a href='" . htmlspecialchars($track['audio_url']) . "' target='_blank'>" . htmlspecialchars($track['audio_url']) . "</a>" : "None") . "</p>";
        echo "<p><strong>Created:</strong> " . $track['created_at'] . "</p>";
        echo "</div>";
    }
}

echo "<h2>🔧 Quick Actions:</h2>";
echo "<p><a href='/library.php' style='background: #667eea; color: white; padding: 0.5rem 1rem; text-decoration: none; border-radius: 5px; margin-right: 1rem;'>📚 Go to Library</a>";
echo "<a href='/create.php' style='background: #48bb78; color: white; padding: 0.5rem 1rem; text-decoration: none; border-radius: 5px; margin-right: 1rem;'>🎵 Create New Music</a>";
echo "<a href='/dashboard.php' style='background: #764ba2; color: white; padding: 0.5rem 1rem; text-decoration: none; border-radius: 5px;'>🏠 Back to Dashboard</a></p>";

echo "<h2>🔒 Security Benefits:</h2>";
echo "<ul>";
echo "<li>✅ API BOX URLs are hidden from clients</li>";
echo "<li>✅ Users can only access their own tracks</li>";
echo "<li>✅ Session-based authentication</li>";
echo "<li>✅ Secure audio streaming</li>";
echo "<li>✅ No exposure of your API supplier</li>";
echo "</ul>";
?> 

CasperSecurity Mini