From ea5a9195beca6488901a0331a575e60a3d74bc53 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sun, 6 Sep 2020 06:09:12 +0300 Subject: [PATCH] Check number of args in 'gen' command interface --- rsa.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rsa.py b/rsa.py index 39d75e7..1371468 100644 --- a/rsa.py +++ b/rsa.py @@ -29,7 +29,7 @@ ID=6 def main(): print("hesham-rsa version ", VERSION) if len(sys.argv) > 1: - if sys.argv[1] == "gen": ##rsa gen + if sys.argv[1] == "gen" and len(sys.argv) == 4: ##rsa gen keyFileName = sys.argv[3] key = generateKeys(keyFileName, int(sys.argv[2])) print("e: ", key[E])