From ee662ada095c04c3839d8dfdb5ae03c83418e85e Mon Sep 17 00:00:00 2001 From: billz Date: Sat, 21 Oct 2023 19:12:44 +0100 Subject: [PATCH] Update cmd_overrides + stripArtifacts regex --- config/vpn-providers.json | 3 ++- includes/provider.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/vpn-providers.json b/config/vpn-providers.json index b3a2296f..cfed0f73 100644 --- a/config/vpn-providers.json +++ b/config/vpn-providers.json @@ -7,7 +7,8 @@ "install_page": "https://www.expressvpn.com/support/vpn-setup/app-for-linux/", "cmd_overrides": { "countries": "list all", - "log": "diagnostics" + "log": "diagnostics", + "version": "-v" }, "regex": { "status": "\/not connected\/", diff --git a/includes/provider.php b/includes/provider.php index 2bb6bca7..8398c288 100755 --- a/includes/provider.php +++ b/includes/provider.php @@ -122,7 +122,7 @@ function saveProviderConfig($status, $binPath, $country, $id = null) */ function stripArtifacts($output, $pattern = null) { - $result = preg_replace('/[-\/\n\t\\\\'.$pattern.'|]/', '', $output); + $result = preg_replace('/[-\/\n\t\\\\'.$pattern.'|\[0m\[1;33;49m]/', '', $output); return $result; }