use of raw strings for regex

This commit is contained in:
MrMatch246 2025-08-06 11:43:47 +02:00
parent 8bfedde7b3
commit ec2283ba45
1 changed files with 2 additions and 2 deletions

View File

@ -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<protocol>(tcp|udp))\/(?P<port>\d+)\/(?P<service>[\w\-]+)(\/(?P<secure>secure|insecure))?', forced_service)
match = re.search(r'(?P<protocol>(tcp|udp))/(?P<port>\d+)/(?P<service>[\w\-]+)(/(?P<secure>secure|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))