Add zero-length password option to keyfile tool

This commit is contained in:
nolash
2021-06-09 15:17:19 +02:00
parent 54baa5fab1
commit a0d1b7dec6
3 changed files with 6 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ logg = logging.getLogger()
argparser = argparse.ArgumentParser()
argparser.add_argument('-d', type=str, help='decrypt file')
argparser.add_argument('-z', action='store_true', help='zero-length password')
argparser.add_argument('-k', type=str, help='load key from file')
argparser.add_argument('-v', action='store_true', help='be verbose')
args = argparser.parse_args()
@@ -43,6 +44,8 @@ def main():
global pk_hex
passphrase = os.environ.get('PASSPHRASE')
if args.z:
passphrase = ''
r = None
if mode == 'decrypt':
if passphrase == None: