diff --git a/pwncat/__main__.py b/pwncat/__main__.py index 38e1827..fb1d753 100644 --- a/pwncat/__main__.py +++ b/pwncat/__main__.py @@ -143,12 +143,15 @@ def main(): if args.connection_string: m = connect.Command.CONNECTION_PATTERN.match(args.connection_string) - protocol = m.group("protocol").removesuffix("://") + protocol = m.group("protocol") user = m.group("user") password = m.group("password") host = m.group("host") port = m.group("port") + if protocol is not None: + protocol = protocol.removesuffix("://") + if host is not None and host == "": host = None