From 06c5619a152ef206f7fc77b9be7924eaa2cde2fa Mon Sep 17 00:00:00 2001 From: Mike Raineri Date: Thu, 26 Sep 2024 14:10:00 -0400 Subject: [PATCH] Corrected the regex pattern when trying to discover the local system's address when directly hosting firmware images Signed-off-by: Mike Raineri --- scripts/rf_update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rf_update.py b/scripts/rf_update.py index 3200370..dbc4b6d 100644 --- a/scripts/rf_update.py +++ b/scripts/rf_update.py @@ -149,7 +149,7 @@ def print_error_payload(response): # TODO: Find a better way of getting your own IP address # socket.gethostbyname( socket.gethostname() ) returns 127.0.0.1 on many systems # This will open a socket with the target, and pulls the address of the socket - groups = re.search("^(https?)://([^:]+)(:(\d+))?$", args.rhost) + groups = re.search("^(https?)://([^:]+)(:(\\d+))?$", args.rhost) s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) remote_port = groups.group(4) if remote_port is None: