Skip to content

Commit 1218f0e

Browse files
fixed hostname regex
1 parent cfdc1c7 commit 1218f0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ssh_proxy_server/authentication.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ def parse_service_accept(self, m):
6363

6464

6565
def validate_remote_host(remote_host):
66-
if re.match(r"^[^\:]+(:[0-9]{5})?$", remote_host):
66+
if re.match(r"[^\:]+(:[0-9]{5})?", remote_host):
6767
return remote_host
6868
raise argparse.ArgumentTypeError('remot host must be in format hostname:port')
6969

7070

7171
def validate_honeypot(remote_host):
72-
if re.match(r"^[^\:]+:[^@]+@[^\:]+:([0-9]{5})?$", remote_host):
72+
if re.match(r"[^\:]+:[^@]+@[^\:]+(:[0-9]{5})?", remote_host):
7373
return remote_host
7474
raise argparse.ArgumentTypeError('honeypot address must be in format username:password@hostname:port')
7575

0 commit comments

Comments
 (0)