Fix docker-compose.yaml / Update parser with str_starts_with instead of strpos

This commit is contained in:
2024-11-12 19:06:49 +01:00
parent 850d48b07e
commit 0fdd5c5fba
2 changed files with 5 additions and 5 deletions

View File

@ -23,16 +23,16 @@ class StealerParser
$current = []; $current = [];
foreach ($lines as $line) { foreach ($lines as $line) {
if (strpos($line, 'URL:') === 0) { if (str_starts_with($line, 'URL:')) {
if (!empty($current)) { if (!empty($current)) {
$credentials[] = $current; $credentials[] = $current;
} }
$current = ['url' => trim(substr($line, 4))]; $current = ['url' => trim(substr($line, 4))];
} elseif (strpos($line, 'Username:') === 0) { } elseif (str_starts_with($line, 'Username:')) {
$current['username'] = trim(substr($line, 9)); $current['username'] = trim(substr($line, 9));
} elseif (strpos($line, 'Password:') === 0) { } elseif (str_starts_with($line, 'Password:')) {
$current['password'] = trim(substr($line, 9)); $current['password'] = trim(substr($line, 9));
} elseif (strpos($line, 'Application:') === 0) { } elseif (str_starts_with($line, 'Application:')) {
$current['application'] = trim(substr($line, 12)); $current['application'] = trim(substr($line, 12));
} }
} }

View File

@ -5,7 +5,7 @@ services:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
ports: ports:
- "8000:8080" - "8000:80"
environment: environment:
- APP_ENV=production - APP_ENV=production
- DB_CONNECTION=sqlite - DB_CONNECTION=sqlite