/
config.py.example
68 lines (58 loc) · 2.75 KB
/
config.py.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
"""
This file is part of the GetWVKeys project (https://github.com/GetWVKeys/getwvkeys)
Copyright (C) 2022-2024 Notaghost, Puyodead1 and GetWVKeys contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
import logging
import os
import pathlib
import time
from dotenv import load_dotenv
IS_DEVELOPMENT = bool(os.environ.get("DEVELOPMENT", False))
IS_STAGING = bool(os.environ.get("STAGING", False))
load_dotenv(".env.dev" if IS_DEVELOPMENT else ".env.staging" if IS_STAGING else ".env")
SECRET_KEY = os.environ["SECRET_KEY"] # generate secret offline with os.urandom(16).hex()
OAUTH2_CLIENT_ID = os.environ["OAUTH2_CLIENT_ID"] # Discord OAuth Client ID
OAUTH2_CLIENT_SECRET = os.environ["OAUTH2_CLIENT_SECRET"] # Discord OAuth Client Secret
OAUTH2_REDIRECT_URL = os.environ["OAUTH2_REDIRECT_URL"] # Discord OAuth Callback URL
SQLALCHEMY_DATABASE_URI = os.environ["SQLALCHEMY_DATABASE_URI"] # Database connection URI
REDIS_URI = os.environ.get("REDIS_URI", None) # Redis connection URI
API_HOST = "0.0.0.0"
API_PORT = int(os.environ.get("API_PORT", 8080))
API_URL = os.environ.get("API_URL", "https://getwvkeys.cc")
MAX_SESSIONS = 60
PROXY = {}
DEFAULT_CDMS = [] # list of build infos to use in key rotation
APPENDERS = [] # passwords for dumping keys, deprecated in favor of flags
GUILD_ID = "" # Discord Guild ID
VERIFIED_ROLE_ID = "" # Discord Verified role ID
ELITE_ROLE_ID = "" # Discord Elite role ID
LOGIN_DISABLED = False
CONSOLE_LOG_LEVEL = logging.DEBUG
FILE_LOG_LEVEL = logging.DEBUG
LOG_FORMAT = "[%(asctime)s] [%(name)s] [%(funcName)s:%(lineno)d] %(levelname)s: %(message)s"
LOG_DATE_FORMAT = "%I:%M:%S"
WVK_LOG_FILE_PATH = pathlib.Path(os.getcwd(), "logs", f"GWVK_{time.strftime('%Y-%m-%d')}.log")
DEFAULT_BLACKLISTED_URLS = [
# using regex to match a url
{
"url": ".*my\.awesome\.site.com.*",
"partial": True,
},
# matching an exact url
{
"url": "https://example.com/some_awesome_page_to_block",
"partial": False,
},
]
EXTERNAL_API_BUILD_INFOS = [{"buildinfo": "my_awesome_custom_buildinfo", "url": "http://myamazingcdmapi.com", "token": "myS3cR$t"}]
# List of CDMs that should use the blacklist, these are considered to be GetWVKeys System CDMs.
SYSTEM_CDMS = []