add file writing when using --out
This commit is contained in:
@@ -29,7 +29,12 @@ if __name__ == "__main__":
|
|||||||
t = ''.join([x for x in open(args.FILE, "r").read().lower() if x.isalpha()])
|
t = ''.join([x for x in open(args.FILE, "r").read().lower() if x.isalpha()])
|
||||||
|
|
||||||
if(args.encrypt != None):
|
if(args.encrypt != None):
|
||||||
print(encrypt(args.encrypt, t))
|
out = encrypt(args.encrypt, t)
|
||||||
|
|
||||||
if(args.decrypt != None):
|
if(args.decrypt != None):
|
||||||
print(decrypt(args.decrypt, t))
|
out = decrypt(args.decrypt, t)
|
||||||
|
|
||||||
|
if(args.out != None):
|
||||||
|
open(args.out, "w").write(out)
|
||||||
|
else:
|
||||||
|
print(out)
|
||||||
|
|||||||
Reference in New Issue
Block a user