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