1
0
mirror of https://github.com/calebstewart/pwncat.git synced 2024-11-24 01:25:37 +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:
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