Added help command
This commit is contained in:
parent
23b421ee1f
commit
321fb3ec01
11
rsa.py
11
rsa.py
@ -91,6 +91,8 @@ def main():
|
||||
printKey(cracked_key)
|
||||
if sys.argv[1] == "print": #rsa print <key>
|
||||
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 <keysize> <keyname>")
|
||||
print("rsa encrypt <message> <key> <signer>")
|
||||
print("rsa decrypt \"<cipher>\" <key>")
|
||||
print("rsa export <key>")
|
||||
print("rsa crack <key>")
|
||||
print("rsa print <key>")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Reference in New Issue
Block a user