mirror of
https://github.com/Cronocide/wifipumpkin3.git
synced 2025-01-22 19:37:18 +00:00
fixed set restport by default 1337
This commit is contained in:
parent
c8e5fe2c40
commit
26a3754b16
@ -23,6 +23,7 @@ All notable changes to this project will be documented in this file.
|
||||
- fixed hide error object of type QProcess on WorkProcess class #93
|
||||
- fixed settings dhcp for allow to change dhcp configuration
|
||||
- fixed error when execute from github actions
|
||||
- fixed set restport by default 1337
|
||||
|
||||
## [Released]
|
||||
|
||||
|
@ -132,3 +132,4 @@ EXTENSIONS="blueprints.restapi:init_app", "ext.database:init_app", "ext.auth:ini
|
||||
USERNAME=wp3admin
|
||||
PASSWORD=admin
|
||||
public_id=""
|
||||
port=1337
|
@ -53,6 +53,7 @@ def parser_args_func(parse_args, config):
|
||||
config.set_one("ap_mode", "restapi", True)
|
||||
config.set("rest_api_settings", "PASSWORD", parse_args.password)
|
||||
config.set("rest_api_settings", "USERNAME", parse_args.username)
|
||||
config.set("rest_api_settings", "port", parse_args.restport)
|
||||
server_restapi = RestControllerAPI("wp3API", config)
|
||||
thead = threading.Thread(target=server_restapi.run)
|
||||
thead.setDaemon(True)
|
||||
|
@ -23,8 +23,9 @@ class RestControllerAPI(object):
|
||||
def __init__(self, name, config):
|
||||
self.conf = config
|
||||
self.app = Flask(name)
|
||||
self.port_rest = self.conf.get("rest_api_settings", "port")
|
||||
configuration.init_app(self.app, self.conf)
|
||||
configuration.load_extensions(self.app)
|
||||
|
||||
def run(self):
|
||||
self.app.run(debug=False)
|
||||
self.app.run(debug=False, port=self.port_rest)
|
||||
|
Loading…
Reference in New Issue
Block a user