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:
parent
91aba56195
commit
f0ab2a024a
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user