From 40a43ed86d6b63a89a00bf5a5778f1699871ddbd Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sun, 15 May 2022 03:57:03 -0400 Subject: [PATCH] Added generated password limit of 840 characters (to avoid recursion limit) --- bin/sshyp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/sshyp b/bin/sshyp index 4752f33..89d003c 100755 --- a/bin/sshyp +++ b/bin/sshyp @@ -88,6 +88,9 @@ def pass_gen(): __gen = _pass_gen_function(__complexity, __length) return __gen _length = int(input('How many characters should be in the password? ')) + if _length > 840: + _length = 800 + print('\n\u001b[38;5;208mPassword length has been limited to the maximum of 840 characters.\u001b[0m\n') _complexity = str(input('Should the password be simple (for compatibility) or complex (for security)? (s/C) ')) _gen = _pass_gen_function(_complexity, _length) return _gen