HTTPS SSH
TLS Optimal Unfuckery Pro Enterprise Edition (free trial) v0.1alpha-prerelease1

------------

https://wiki.archlinux.org/index.php/Haveged
https://lwn.net/Articles/525459/
http://security.stackexchange.com/questions/34523/is-it-appropriate-to-use-haveged-as-a-source-of-entropy-on-virtual-machines


Easiest way to use:

  - Copy all certificates and shit to a directory
  - toupee.py -d <directory>

If it gets confused you can use '-n <domainname>' (where domainname is really the cert CN)
To have it generate DH params use '-D <length>' (disabled by default for now)

To run in interactive mode (mostly broken for now) use '-i'

Output will go to $PWD/output



###################
    opts, args = getopt.getopt(sys.argv[1:], "hiD:R:n:f:d:v", ["help", "name=", "file=", "directory="])
except getopt.GetoptError as err:
    print str(err)
    sys.exit(2)

input_file = None
input_directory = None
cert_name = None
interactive = False
#dhparam_length = '4096'
dhparam_length = '0'

for o, a in opts:
    if o in ['-h', '--help']:
        print 'Halp'
        sys.exit()
    elif o in ['-f', '--file']:
        input_file = a
    elif o in ['-d', '--directory']:
        input_directory = a
    elif o in ['-n', '--name']:
        cert_name = a
    elif o in ['-i', '--interactive']:
        interactive = True
    elif o in ['-R', '--run-mode']:
        run_mode = int(a)
        RunMode(run_mode)
    elif o in ['-D', '--dhparam-length']:
        dhparam_length = a
    else:
        assert False, 'unhandled option'