2026-01-04 16:06:22 +09:00
|
|
|
<?php
|
|
|
|
|
header('Content-Type: text/plain; charset=utf-8');
|
2026-01-04 16:18:39 +09:00
|
|
|
echo "=== Specialized Search in /home/webservice/sales_org ===\n";
|
2026-01-04 16:15:35 +09:00
|
|
|
|
2026-01-04 16:18:39 +09:00
|
|
|
$targetFile = '/home/webservice/sales_org/.env';
|
2026-01-04 16:16:29 +09:00
|
|
|
|
2026-01-04 16:18:39 +09:00
|
|
|
if (file_exists($targetFile)) {
|
|
|
|
|
echo "[EXISTS] Found .env in sales_org!\n";
|
|
|
|
|
if (is_readable($targetFile)) {
|
|
|
|
|
$content = file_get_contents($targetFile);
|
|
|
|
|
echo "--- Content (Masked) ---\n";
|
|
|
|
|
foreach (explode("\n", $content) as $line) {
|
|
|
|
|
if (stripos($line, 'DB_') !== false) {
|
|
|
|
|
if (stripos($line, 'PASS') !== false) echo explode('=', $line)[0] . "=********\n";
|
|
|
|
|
else echo $line . "\n";
|
2026-01-04 16:14:42 +09:00
|
|
|
}
|
2026-01-04 16:06:22 +09:00
|
|
|
}
|
2026-01-04 16:16:29 +09:00
|
|
|
} else {
|
2026-01-04 16:18:39 +09:00
|
|
|
echo "[ERROR] Found but Permission Denied for www-data. Current user: " . `whoami` . "\n";
|
2026-01-04 16:06:22 +09:00
|
|
|
}
|
2026-01-04 16:18:39 +09:00
|
|
|
} else {
|
|
|
|
|
echo "[NOT FOUND] $targetFile does not exist.\n";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
echo "\n=== Trying common PHP config files ===\n";
|
|
|
|
|
$configs = [
|
|
|
|
|
'/home/webservice/api/lib/mydb.php',
|
|
|
|
|
'/home/webservice/mng/lib/mydb.php',
|
|
|
|
|
'/home/webservice/script/pull_sales.sh'
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
foreach($configs as $c) {
|
|
|
|
|
if(file_exists($c)) echo "[FILE EXISTS] $c\n";
|
2026-01-04 16:06:22 +09:00
|
|
|
}
|