<reponame>t4skforce/PenTestingUnit
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from app import flaskrun
import optparse

def get_params(default_config_folder="./config", default_host="0.0.0.0", default_port="80"):
    parser = optparse.OptionParser()
    parser.add_option("-H", "--host", help="Hostname of the Flask app [default %s]" % default_host, default=default_host)
    parser.add_option("-P", "--port", help="Port for the Flask app [default %s]" % default_port, default=default_port)
    parser.add_option("-c", "--config", help="Config folder of the Flask app [default %s]" % default_config_folder, default=default_config_folder, dest="config_folder")
    parser.add_option("-s", "--ssl", action="store_true", dest="ssl", help="enable SSL")
    parser.add_option("-d", "--debug",action="store_true", dest="debug", help=optparse.SUPPRESS_HELP)
    parser.add_option("-t", "--trace",action="store_true", dest="trace", help=optparse.SUPPRESS_HELP)
    parser.add_option('-v', action="count", dest='verbosity', default=1)
    options, _ = parser.parse_args()
    return options

if __name__ == '__main__':
    """ Parameterized launch of flask server """
    flaskrun(get_params())

#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from app import flaskrun
import optparse

def get_params(default_config_folder="./config", default_host="0.0.0.0", default_port="80"):
    parser = optparse.OptionParser()
    parser.add_option("-H", "--host", help="Hostname of the Flask app [default %s]" % default_host, default=default_host)
    parser.add_option("-P", "--port", help="Port for the Flask app [default %s]" % default_port, default=default_port)
    parser.add_option("-c", "--config", help="Config folder of the Flask app [default %s]" % default_config_folder, default=default_config_folder, dest="config_folder")
    parser.add_option("-s", "--ssl", action="store_true", dest="ssl", help="enable SSL")
    parser.add_option("-d", "--debug",action="store_true", dest="debug", help=optparse.SUPPRESS_HELP)
    parser.add_option("-t", "--trace",action="store_true", dest="trace", help=optparse.SUPPRESS_HELP)
    parser.add_option('-v', action="count", dest='verbosity', default=1)
    options, _ = parser.parse_args()
    return options

if __name__ == '__main__':
    """ Parameterized launch of flask server """
    flaskrun(get_params())
#!/usr/bin/env python2 # -*- coding: utf-8 -*- Parameterized launch of flask server