35 lines
1.1 KiB
PHP
35 lines
1.1 KiB
PHP
<?php
|
|
header('Content-Type: text/plain; charset=utf-8');
|
|
echo "=== Specialized Search in /home/webservice/sales_org ===\n";
|
|
|
|
$targetFile = '/home/webservice/sales_org/.env';
|
|
|
|
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";
|
|
}
|
|
}
|
|
} else {
|
|
echo "[ERROR] Found but Permission Denied for www-data. Current user: " . `whoami` . "\n";
|
|
}
|
|
} 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";
|
|
}
|