From 321fb3ec01284a53b276f71ad68b0fe24d1e506b Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Mon, 20 Apr 2020 00:19:09 +0300 Subject: [PATCH] Added help command --- rsa.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rsa.py b/rsa.py index d22032b..31377c5 100755 --- a/rsa.py +++ b/rsa.py @@ -91,6 +91,8 @@ def main(): printKey(cracked_key) if sys.argv[1] == "print": #rsa print printKey(readKeyFile(sys.argv[2])) + if sys.argv[1] == "help": + printHelp() #No command exit code exit(127) @@ -312,5 +314,14 @@ def crackKey2(keyName): return key_cracked else: continue +def printHelp(): + print("commands:") + print("rsa gen ") + print("rsa encrypt ") + print("rsa decrypt \"\" ") + print("rsa export ") + print("rsa crack ") + print("rsa print ") + if __name__ == "__main__": main() \ No newline at end of file