From 387da66fdd0551fadf693f45b31abe8f2703c13e Mon Sep 17 00:00:00 2001 From: Savvas Kechagias Date: Wed, 23 Oct 2024 09:54:54 +0200 Subject: [PATCH] Update villain_core.py Fixed invalid escape sequence syntax warnings --- Core/villain_core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/villain_core.py b/Core/villain_core.py index 4115288..581a527 100644 --- a/Core/villain_core.py +++ b/Core/villain_core.py @@ -2453,13 +2453,13 @@ def os_fingerprint(self, init_response, prompt_val, conn): # Check for Windows banners (no prompt symbols, but environment-specific clues) if re.search('Microsoft Corporation', init_response, re.IGNORECASE): # Identify shell type (PowerShell vs cmd.exe) - if re.search('powershell', init_response, re.IGNORECASE) or re.search('^PS\ [A-Z]{1}:', prompt_val.strip('\r\n\t ')): + if re.search('powershell', init_response, re.IGNORECASE) or re.search('^PS [A-Z]{1}:', prompt_val.strip('\r\n\t ')): return [True, 'Windows', 'powershell.exe'] return [True, 'Windows', 'cmd.exe'] # Check if Windows PowerShell from prompt value - if re.search('^PS\ [A-Z]{1}:', prompt_val.strip('\r\n\t ')): + if re.search('^PS [A-Z]{1}:', prompt_val.strip('\r\n\t ')): return [True, 'Windows', 'powershell.exe'] # Analyze based on shell prompts