1
0
mirror of https://github.com/calebstewart/pwncat.git synced 2024-11-27 19:04:15 +01:00

Fixed case when protocol was None

This commit is contained in:
Caleb Stewart 2021-06-07 16:22:06 -04:00
parent 91aba56195
commit f0ab2a024a

View File

@ -143,12 +143,15 @@ def main():
if args.connection_string: if args.connection_string:
m = connect.Command.CONNECTION_PATTERN.match(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") user = m.group("user")
password = m.group("password") password = m.group("password")
host = m.group("host") host = m.group("host")
port = m.group("port") port = m.group("port")
if protocol is not None:
protocol = protocol.removesuffix("://")
if host is not None and host == "": if host is not None and host == "":
host = None host = None