Fix docker-compose.yaml / Update parser with str_starts_with instead of strpos
This commit is contained in:
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user