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-analyze

    r13 r28  
    2929
    3030
    31 parser = argparse.ArgumentParser(description='Analyzes samples of encrypted data in an attempt to decode samples to binary and identify patterns useful in cryptanalysis.')
     31parser = argparse.ArgumentParser(
     32    description='Analyzes samples of encrypted data in an attempt to decode'
     33    ' samples to binary and identify patterns useful in cryptanalysis.'
     34    ' For more information, see:  http://code.google.com/p/bletchley/wiki/Overview')
    3235parser.add_argument('input_file', nargs='?', default=None,
    33                     help='File containing encrypted blobs to analyze, one per line. Omit to read from stdin.')
     36                    help='File containing encrypted blobs to analyze, one per'
     37                    ' line. Omit to read from stdin.')
    3438parser.add_argument('-e', dest='encoding_chain', type=str, default=None,
    35                     help='Comma-separated sequence of formats used to encode the tokens, beginning with the last one applied. (default: auto-detect)')
     39                    help='Comma-separated sequence of formats used to encode'
     40                    ' the tokens, beginning with the last one applied. '
     41                    '(default: auto-detect. Use "?" for a listing of supported encodings.)')
    3642parser.add_argument('-b', dest='block_size', type=int, default=8,
    3743                    help='The block size displayed and used in highlighting (default: 8)')
     
    4450options = parser.parse_args()
    4551
     52if options.encoding_chain == '?':
     53    print('\n\t'.join(['Supported encodings:']+blobtools.supportedEncodings()))
     54    sys.exit(0)
     55
    4656input_file = sys.stdin
    4757if options.input_file is not None:
    4858    input_file = file(options.input_file, 'rb')
    49 
    5059
    5160blobs = input_file.read().rstrip('\n').replace('\r', '').split('\n')
Note: See TracChangeset for help on using the changeset viewer.