mirror of https://github.com/sc0tfree/updog.git
Merge branch 'master' of https://github.com/kush5683/updog
This commit is contained in:
commit
73462e2f99
|
@ -1,6 +1,7 @@
|
|||
import os
|
||||
import signal
|
||||
import argparse
|
||||
import socket
|
||||
|
||||
|
||||
from flask import Flask, render_template, send_file, redirect, request, send_from_directory, url_for, abort
|
||||
|
@ -53,6 +54,8 @@ def parse_arguments():
|
|||
return args
|
||||
|
||||
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_arguments()
|
||||
|
||||
|
@ -187,11 +190,13 @@ def main():
|
|||
ssl_context = None
|
||||
if args.ssl:
|
||||
ssl_context = 'adhoc'
|
||||
|
||||
QR_link = f"http://{get_interface_ip(socket.AF_INET)}:{args.port}/"
|
||||
QR_encoding = pyqrcode.create(QR_link)
|
||||
print(QR_encoding.terminal(quiet_zone=1))
|
||||
run_simple("0.0.0.0", int(args.port), app, ssl_context=ssl_context)
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Reference in New Issue