python dependency

This commit is contained in:
Devdatt Bhatt 2026-06-05 01:27:49 +00:00
parent 5d8c9d335a
commit 972dfdf561
2 changed files with 398 additions and 7 deletions

389
index.php Normal file
View File

@ -0,0 +1,389 @@
<?php
// Get the current IP address
$ip = $_SERVER['REMOTE_ADDR'] ?? '192.168.1.100';
// For demonstration purposes, we'll use a mock IP if running locally
if ($ip === '127.0.0.1' || $ip === '::1') {
$ip = '192.168.1.100';
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Neural Network Interface</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
color: #e0e0ff;
min-height: 100vh;
padding: 20px;
overflow-x: hidden;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
header {
text-align: center;
padding: 30px 0;
margin-bottom: 40px;
border-bottom: 1px solid rgba(100, 100, 255, 0.3);
position: relative;
}
h1 {
font-size: 3.5rem;
margin-bottom: 10px;
background: linear-gradient(to right, #00dbde, #fc00ff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 0 0 20px rgba(100, 100, 255, 0.3);
}
.subtitle {
font-size: 1.2rem;
opacity: 0.8;
max-width: 600px;
margin: 0 auto;
}
.dashboard {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 30px;
margin-bottom: 50px;
}
.card {
background: rgba(20, 20, 50, 0.7);
border-radius: 15px;
padding: 30px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
backdrop-filter: blur(10px);
border: 1px solid rgba(100, 100, 255, 0.2);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
.card:hover {
transform: translateY(-10px);
box-shadow: 0 15px 35px rgba(100, 100, 255, 0.3);
border-color: rgba(100, 100, 255, 0.5);
}
.card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 5px;
background: linear-gradient(to right, #00dbde, #fc00ff);
}
.card h2 {
font-size: 1.8rem;
margin-bottom: 20px;
display: flex;
align-items: center;
gap: 10px;
}
.card h2 i {
font-size: 1.5rem;
}
.btn {
display: inline-block;
background: linear-gradient(45deg, #00dbde, #fc00ff);
color: white;
padding: 15px 30px;
border-radius: 50px;
text-decoration: none;
font-weight: bold;
margin: 10px 5px;
transition: all 0.3s ease;
border: none;
cursor: pointer;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
text-align: center;
width: 100%;
max-width: 300px;
}
.btn:hover {
transform: scale(1.05);
box-shadow: 0 8px 20px rgba(100, 100, 255, 0.4);
}
.btn-secondary {
background: rgba(255, 255, 255, 0.1);
margin-top: 20px;
}
.btn-secondary:hover {
background: rgba(255, 255, 255, 0.2);
}
.share-section {
background: rgba(20, 20, 50, 0.7);
border-radius: 15px;
padding: 30px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
backdrop-filter: blur(10px);
border: 1px solid rgba(100, 100, 255, 0.2);
margin-top: 30px;
}
.share-section h2 {
font-size: 2rem;
margin-bottom: 20px;
text-align: center;
}
.credentials {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
margin-top: 20px;
}
.credential-card {
background: rgba(30, 30, 70, 0.6);
padding: 20px;
border-radius: 10px;
text-align: center;
border: 1px solid rgba(100, 100, 255, 0.2);
}
.credential-card h3 {
margin-bottom: 10px;
color: #00dbde;
}
.credential-card p {
font-size: 1.2rem;
font-weight: bold;
word-break: break-all;
}
.pulse {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { box-shadow: 0 0 0 0 rgba(0, 219, 222, 0.4); }
70% { box-shadow: 0 0 0 10px rgba(0, 219, 222, 0); }
100% { box-shadow: 0 0 0 0 rgba(0, 219, 222, 0); }
}
footer {
text-align: center;
padding: 30px 0;
margin-top: 40px;
border-top: 1px solid rgba(100, 100, 255, 0.3);
font-size: 0.9rem;
opacity: 0.7;
}
.path-display {
background: rgba(0, 0, 0, 0.3);
padding: 15px;
border-radius: 10px;
margin: 15px 0;
font-family: monospace;
text-align: center;
word-break: break-all;
font-size: 1.1rem;
}
.ip-info {
text-align: center;
margin: 15px 0;
font-size: 0.9rem;
opacity: 0.8;
}
.update-section {
background: rgba(20, 20, 50, 0.7);
border-radius: 15px;
padding: 30px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
backdrop-filter: blur(10px);
border: 1px solid rgba(100, 100, 255, 0.2);
margin-top: 30px;
}
.update-section h2 {
font-size: 2rem;
margin-bottom: 20px;
text-align: center;
}
.update-btn {
display: inline-block;
background: linear-gradient(45deg, #ff416c, #ff4b2b);
color: white;
padding: 15px 30px;
border-radius: 50px;
text-decoration: none;
font-weight: bold;
margin: 10px 5px;
transition: all 0.3s ease;
border: none;
cursor: pointer;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
text-align: center;
width: 100%;
max-width: 300px;
font-size: 1.1rem;
}
.update-btn:hover {
transform: scale(1.05);
box-shadow: 0 8px 20px rgba(255, 75, 43, 0.4);
}
.output {
background: rgba(0, 0, 0, 0.3);
padding: 20px;
border-radius: 10px;
margin-top: 20px;
font-family: monospace;
white-space: pre-wrap;
max-height: 300px;
overflow-y: auto;
display: none;
}
@media (max-width: 768px) {
.dashboard {
grid-template-columns: 1fr;
}
h1 {
font-size: 2.5rem;
}
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>Urmic.org </h1>
<p class="subtitle">Powred by ShreeBhattJi ( Devdatt Bhatt )</p>
</header>
<div class="dashboard">
<div class="card">
<h2>📥 Downloaded Content</h2>
<p>Access your downloaded files and media library</p>
<a class="btn pulse" id="downloadBtn">Access Library</a>
</div>
<div class="card">
<h2>🚀 Downloader</h2>
<p>Manage and schedule new downloads</p>
<a class="btn pulse" id="downloaderBtn">Open Downloader</a>
</div>
</div>
<div class="share-section">
<h2>🌐 Samba Share Credentials</h2>
<p>Network access information for shared resources</p>
<div class="ip-info">
<p>Current Windows IP Address: <span id="currentIp"><?php echo htmlspecialchars($ip); ?></span></p>
</div>
<div class="path-display" id="pathDisplay">
\\<?php echo htmlspecialchars($ip); ?>\download
</div>
<div class="credentials">
<div class="credential-card">
<h3>Username</h3>
<p>shreebhattji</p>
</div>
<div class="credential-card">
<h3>Password</h3>
<p>foreverstreamingpartner</p>
</div>
</div>
</div>
<div class="update-section">
<h2>🔄 Update yt-dlp</h2>
<p>Update yt-dlp to the latest version</p>
<button class="update-btn" id="updateBtn">Update yt-dlp</button>
<div class="output" id="output"></div>
</div>
<footer>
<p>Made with ❤️ from ShreeBhattji ( Devdatt Bhatt )</p>
</footer>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const downloadBtn = document.getElementById('downloadBtn');
const downloaderBtn = document.getElementById('downloaderBtn');
const currentIp = document.getElementById('currentIp');
const pathDisplay = document.getElementById('pathDisplay');
const updateBtn = document.getElementById('updateBtn');
const output = document.getElementById('output');
// Get current IP address from browser
const mockIp = window.location.hostname || '<?php echo htmlspecialchars($ip); ?>';
currentIp.textContent = mockIp;
pathDisplay.textContent = `\\\\${mockIp}\\download`;
// Navigation functions - removed alerts and added direct redirects
downloadBtn.addEventListener('click', function(e) {
e.preventDefault();
window.location.href = 'download';
});
downloaderBtn.addEventListener('click', function(e) {
e.preventDefault();
window.location.href = 'downloader';
});
// Update yt-dlp functionality
updateBtn.addEventListener('click', function() {
updateBtn.disabled = true;
updateBtn.textContent = 'Updating...';
output.style.display = 'block';
output.textContent = 'Starting yt-dlp update...\n';
// In a real implementation, this would make an AJAX call to a backend
// that executes the pip command. For this demo, we'll simulate the process.
setTimeout(() => {
output.textContent += 'Running: pip install yt-dlp --break-system-packages\n';
output.textContent += 'Collecting yt-dlp\n';
output.textContent += ' Downloading yt-dlp-2023.10.13-py3-none-any.whl (2.1 MB)\n';
output.textContent += 'Installing collected packages: yt-dlp\n';
output.textContent += 'Successfully installed yt-dlp-2023.10.13\n';
output.textContent += 'Update completed successfully!\n';
updateBtn.disabled = false;
updateBtn.textContent = 'Update yt-dlp';
}, 2000);
});
});
</script>
</body>
</html>

View File

@ -1,17 +1,17 @@
apt updtae;
apt update;
apt upgrade -y;
apt install php ffmpeg apache2 php-gd samba -y
apt install php ffmpeg apache2 php-gd samba python3-pip -y
rm -rf /var/www/html/*
mkdir -p /var/www/download /var/www/downloader /var/www/download/queue /var/www/download/ready
mkdir -p /var/www/html/download /var/www/html/downloader /var/www/html/download/queue /var/www/html/download/ready
cp -r downloader/* /var/www/downloader
cp -r downloader/* /var/www/html/downloader
# Create system user if it doesn't exist
sudo useradd -m -s /bin/bash shreebhattji
sudo smbpasswd -a shreebhattji
echo "foreverstreamingpartner" | sudo smbpasswd -s -a shreebhattji
sudo chmod 755 /var/www/download
sudo chmod 755 /var/www/html
# Add shreebhattji to www-data group to avoid read/write conflicts
sudo usermod -a -G www-data shreebhattji
@ -21,7 +21,7 @@ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.backup
cat << EOF | sudo tee -a /etc/samba/smb.conf
[download]
path = /var/www/download
path = /var/www/html/download
browseable = yes
writable = yes
guest ok = no
@ -53,3 +53,5 @@ StandardError=journal
[Install]
WantedBy=multi-user.target
EOF
pip install yt-dlp --break-system-packages