Add Two-Factor Authentication (2FA) support and key management features
- Implemented 2FA management in admin panel with enable/disable options. - Added QR code display for 2FA setup and input for TOTP codes in login and pickup forms. - Introduced key management section for generating, loading, and clearing RSA key pairs. - Enhanced file upload and sharing functionality with optional 2FA. - Added buttons for switching between development and production modes in admin panel. - Updated API documentation to reflect new 2FA and key management features.
This commit is contained in:
@@ -2,19 +2,29 @@ import os
|
||||
import subprocess
|
||||
import time
|
||||
import sys
|
||||
import platform
|
||||
|
||||
APP_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../app.py"))
|
||||
|
||||
def start_prod():
|
||||
env = os.environ.copy()
|
||||
env["PRODUCTION"] = "true"
|
||||
return subprocess.Popen(
|
||||
["python3", APP_PATH],
|
||||
env=env,
|
||||
preexec_fn=os.setsid,
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL
|
||||
)
|
||||
|
||||
if platform.system() == "Windows":
|
||||
return subprocess.Popen(
|
||||
["python", APP_PATH],
|
||||
env=env,
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL
|
||||
)
|
||||
else:
|
||||
return subprocess.Popen(
|
||||
["python3", APP_PATH],
|
||||
env=env,
|
||||
preexec_fn=os.setsid,
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL
|
||||
)
|
||||
|
||||
def main():
|
||||
print("[*] Starting PacCrypt in PRODUCTION mode with Waitress...")
|
||||
|
||||
Reference in New Issue
Block a user