Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
Updated formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dikayx committed Sep 11, 2024
1 parent 5a4e112 commit e9be6db
Showing 1 changed file with 12 additions and 34 deletions.
46 changes: 12 additions & 34 deletions start.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,21 @@
parser = argparse.ArgumentParser(description="Check if your website is spoofy")

# General options
parser.add_argument(
"-d", "--debug", action="store_true", default=False, help="Enable debug mode"
)
parser.add_argument(
"-b",
"--bind",
default="127.0.0.1",
type=str,
help="Specify the bind address (default: 127.0.0.1)",
)
parser.add_argument(
"-p", "--port", default=8080, type=int, help="Specify the port (default: 8080)"
)
parser.add_argument("-d", "--debug", action="store_true", default=False,
help="Enable debug mode")
parser.add_argument("-b", "--bind", default="127.0.0.1", type=str,
help="Specify the bind address (default: 127.0.0.1)")
parser.add_argument("-p", "--port", default=8080, type=int,
help="Specify the port (default: 8080)")

# SSL options
parser.add_argument(
"-a",
"--adhoc",
action="store_true",
default=False,
help="Enable SSL adhoc mode (for development only)",
)
parser.add_argument(
"-c", "--cert", default=None, type=str, help="Specify the SSL certificate"
)
parser.add_argument(
"-k", "--key", default=None, type=str, help="Specify the SSL key"
)
parser.add_argument("-a", "--adhoc", action="store_true", default=False,
help="Enable SSL adhoc mode (for development only)")
parser.add_argument("-c", "--cert", default=None, type=str, help="Specify the SSL certificate")
parser.add_argument("-k", "--key", default=None, type=str, help="Specify the SSL key")

args = parser.parse_args()
ssl_context = (
"adhoc"
if args.adhoc
else (args.cert, args.key) if args.cert and args.key else None
)
ssl_context = 'adhoc' if args.adhoc else (args.cert, args.key) if args.cert and args.key else None

web_app = app.create_app()
web_app.run(
debug=args.debug, host=args.bind, port=args.port, ssl_context=ssl_context
)
web_app.run(debug=args.debug, host=args.bind, port=args.port, ssl_context=ssl_context)

0 comments on commit e9be6db

Please sign in to comment.