From ec2283ba45853804ae9d0172ee51a659ace063bf Mon Sep 17 00:00:00 2001 From: MrMatch246 Date: Wed, 6 Aug 2025 11:43:47 +0200 Subject: [PATCH] use of raw strings for regex --- autorecon/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autorecon/main.py b/autorecon/main.py index 5de2cdf..64c767e 100644 --- a/autorecon/main.py +++ b/autorecon/main.py @@ -518,7 +518,7 @@ async def scan_target(target): forced_services = [x.strip().lower() for x in config['force_services']] for forced_service in forced_services: - match = re.search('(?P(tcp|udp))\/(?P\d+)\/(?P[\w\-]+)(\/(?Psecure|insecure))?', forced_service) + match = re.search(r'(?P(tcp|udp))/(?P\d+)/(?P[\w\-]+)(/(?Psecure|insecure))?', forced_service) if match: protocol = match.group('protocol') if config['proxychains'] and protocol == 'udp': @@ -1266,7 +1266,7 @@ async def run(): mode = 'udp' port = port.split('U:')[1] - match = re.search('^([0-9]+)\-([0-9]+)$', port) + match = re.search(r'^([0-9]+)-([0-9]+)$', port) if match: num1 = int(match.group(1)) num2 = int(match.group(2))