Skip to content

Commit

Permalink
Corrected the regex pattern when trying to discover the local system'…
Browse files Browse the repository at this point in the history
…s address when directly hosting firmware images

Signed-off-by: Mike Raineri <[email protected]>
  • Loading branch information
mraineri committed Sep 26, 2024
1 parent cc4d28d commit 06c5619
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/rf_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 06c5619

Please sign in to comment.