File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -63,15 +63,15 @@ def parse_service_accept(self, m):
6363
6464
6565def validate_remote_host (remote_host ):
66- if re .match (r"^[\w. ]+(:[0-9]+ )?$" , 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
7171def validate_honeypot (remote_host ):
72- if re .match (r"^[\S ]+:[\S ]+@[\w.]+(: [0-9]+ )?$" , remote_host ):
72+ if re .match (r"^[^\: ]+:[^@ ]+@[^\:]+:( [0-9]{5} )?$" , remote_host ):
7373 return remote_host
74- raise argparse .ArgumentTypeError ('honeypot address must be in format username_password @hostname:port' )
74+ raise argparse .ArgumentTypeError ('honeypot address must be in format username:password @hostname:port' )
7575
7676
7777class Authenticator (BaseModule ):
You can’t perform that action at this time.
0 commit comments