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 os
|
||||||
import signal
|
import signal
|
||||||
import argparse
|
import argparse
|
||||||
|
import socket
|
||||||
|
|
||||||
|
|
||||||
from flask import Flask, render_template, send_file, redirect, request, send_from_directory, url_for, abort
|
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
|
return args
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
args = parse_arguments()
|
args = parse_arguments()
|
||||||
|
|
||||||
|
@ -187,11 +190,13 @@ def main():
|
||||||
ssl_context = None
|
ssl_context = None
|
||||||
if args.ssl:
|
if args.ssl:
|
||||||
ssl_context = 'adhoc'
|
ssl_context = 'adhoc'
|
||||||
|
|
||||||
QR_link = f"http://{get_interface_ip(socket.AF_INET)}:{args.port}/"
|
QR_link = f"http://{get_interface_ip(socket.AF_INET)}:{args.port}/"
|
||||||
QR_encoding = pyqrcode.create(QR_link)
|
QR_encoding = pyqrcode.create(QR_link)
|
||||||
print(QR_encoding.terminal(quiet_zone=1))
|
print(QR_encoding.terminal(quiet_zone=1))
|
||||||
run_simple("0.0.0.0", int(args.port), app, ssl_context=ssl_context)
|
run_simple("0.0.0.0", int(args.port), app, ssl_context=ssl_context)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in New Issue