diff --git a/monkey/common/network/network_utils.py b/monkey/common/network/network_utils.py index e99d0cf2b..eaa2bc195 100644 --- a/monkey/common/network/network_utils.py +++ b/monkey/common/network/network_utils.py @@ -16,5 +16,5 @@ def get_host_from_network_location(network_location: str) -> str: def remove_port(url): parsed = urlparse(url) with_port = f'{parsed.scheme}://{parsed.netloc}' - without_port = re.sub(':[0-9]+(?=$|\/)', '', with_port) + without_port = re.sub(':[0-9]+(?=$|/)', '', with_port) return without_port diff --git a/monkey/infection_monkey/exploit/web_rce.py b/monkey/infection_monkey/exploit/web_rce.py index c5563ef72..069cbcada 100644 --- a/monkey/infection_monkey/exploit/web_rce.py +++ b/monkey/infection_monkey/exploit/web_rce.py @@ -235,7 +235,7 @@ class WebRCE(HostExploiter): resp = self.exploit(url, GET_ARCH_LINUX) if resp: # Pulls architecture string - arch = re.search('(?<=Architecture:)\s+(\w+)', resp) + arch = re.search(r'(?<=Architecture:)\s+(\w+)', resp) try: arch = arch.group(1) except AttributeError: