From 0fdd5c5fbae91d950fca12da611ca48e1453ed3c Mon Sep 17 00:00:00 2001 From: Andrea Pavone Date: Tue, 12 Nov 2024 19:06:49 +0100 Subject: [PATCH] Fix docker-compose.yaml / Update parser with str_starts_with instead of strpos --- app/Services/StealerParser.php | 8 ++++---- docker-compose.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Services/StealerParser.php b/app/Services/StealerParser.php index 19ed416..6e4e67f 100644 --- a/app/Services/StealerParser.php +++ b/app/Services/StealerParser.php @@ -23,16 +23,16 @@ class StealerParser $current = []; foreach ($lines as $line) { - if (strpos($line, 'URL:') === 0) { + if (str_starts_with($line, 'URL:')) { if (!empty($current)) { $credentials[] = $current; } $current = ['url' => trim(substr($line, 4))]; - } elseif (strpos($line, 'Username:') === 0) { + } elseif (str_starts_with($line, 'Username:')) { $current['username'] = trim(substr($line, 9)); - } elseif (strpos($line, 'Password:') === 0) { + } elseif (str_starts_with($line, 'Password:')) { $current['password'] = trim(substr($line, 9)); - } elseif (strpos($line, 'Application:') === 0) { + } elseif (str_starts_with($line, 'Application:')) { $current['application'] = trim(substr($line, 12)); } } diff --git a/docker-compose.yaml b/docker-compose.yaml index 1a5c73f..626c78c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -5,7 +5,7 @@ services: context: . dockerfile: Dockerfile ports: - - "8000:8080" + - "8000:80" environment: - APP_ENV=production - DB_CONNECTION=sqlite