Ignore:
Timestamp:
12/21/12 22:44:29 (12 years ago)
Author:
tmorgan
Message:

more documentation
added supported encodings listing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/bletchley-decode

    r20 r28  
    2828
    2929
    30 parser = argparse.ArgumentParser(description='A simple decoder script that is useful in shell scripts.')
    31 parser.add_argument('input_file', nargs='?', default=None,
    32                     help='File containing encrypted blobs to analyze, one per line. Omit to read from stdin.')
    33 parser.add_argument('-e', dest='encoding_chain', type=str, required=True,
    34                     help='Comma-separated sequence of encoding formats used to encode the token.')
     30parser = argparse.ArgumentParser(
     31    description='A simple decoder script that is useful in shell scripts.'
     32    ' For more information, see:  http://code.google.com/p/bletchley/wiki/Overview')
     33parser.add_argument(
     34    'input_file', nargs='?', default=None,
     35    help='File containing encrypted blobs to analyze, one per line.'
     36    ' Omit to read from stdin.')
     37parser.add_argument(
     38    '-e', dest='encoding_chain', type=str, required=True,
     39    help='Comma-separated sequence of encoding formats used to encode the token.'
     40    ' (Use "?" for a listing of supported encodings.)')
    3541options = parser.parse_args()
     42
     43if options.encoding_chain == '?':
     44    print('\n\t'.join(['Supported encodings:']+blobtools.supportedEncodings()))
     45    sys.exit(0)
    3646
    3747input_file = sys.stdin
Note: See TracChangeset for help on using the changeset viewer.