warlock-manager 2.2.6__tar.gz → 2.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/PKG-INFO +1 -1
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/pyproject.toml +1 -1
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/libs/cmd.py +2 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/libs/download.py +6 -2
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/libs/utils.py +1 -1
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/nexus/nexus.py +3 -3
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/services/base_service.py +5 -5
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager.egg-info/PKG-INFO +1 -1
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/LICENSE +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/README.md +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/setup.cfg +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/tests/test_app.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/tests/test_base_config.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/tests/test_base_service.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/tests/test_cli_config.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/tests/test_cli_formatter.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/tests/test_cmd.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/tests/test_config_key.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/tests/test_ini_config.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/tests/test_sensitive_data_filter.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/tests/test_socket_service.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/tests/test_unreal_config.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/tests/test_unreal_config_ark_spawn_entities.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/tests/test_unreal_save.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/tests/test_version.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/__init__.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/apps/__init__.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/apps/base_app.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/apps/manual_app.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/apps/steam_app.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/config/__init__.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/config/base_config.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/config/cli_config.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/config/config_key.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/config/ini_config.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/config/json_config.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/config/properties_config.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/config/unreal_config.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/formatters/__init__.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/formatters/cli_formatter.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/libs/__init__.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/libs/app.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/libs/app_runner.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/libs/cache.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/libs/firewall.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/libs/get_wan_ip.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/libs/java.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/libs/meta.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/libs/ports.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/libs/sensitive_data_filter.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/libs/tui.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/libs/version.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/mods/__init__.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/mods/base_mod.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/mods/warlock_nexus_mod.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/services/__init__.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/services/http_service.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/services/rcon_service.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/services/socket_service.py +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager.egg-info/SOURCES.txt +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager.egg-info/dependency_links.txt +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager.egg-info/requires.txt +0 -0
- {warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager.egg-info/top_level.txt +0 -0
|
@@ -329,6 +329,7 @@ class PipeCmd(Cmd):
|
|
|
329
329
|
logging.debug('Running piped command: %s' % ' '.join(self.cmd))
|
|
330
330
|
self.result = subprocess.Popen(
|
|
331
331
|
self.cmd,
|
|
332
|
+
cwd=self._cwd,
|
|
332
333
|
stdout=subprocess.PIPE,
|
|
333
334
|
stderr=subprocess.PIPE
|
|
334
335
|
)
|
|
@@ -360,6 +361,7 @@ class BackgroundCmd(Cmd):
|
|
|
360
361
|
logging.debug('Running background command: %s' % ' '.join(self.cmd))
|
|
361
362
|
self.result = subprocess.Popen(
|
|
362
363
|
self.cmd,
|
|
364
|
+
cwd=self._cwd,
|
|
363
365
|
stdout=subprocess.DEVNULL,
|
|
364
366
|
stderr=subprocess.DEVNULL
|
|
365
367
|
)
|
|
@@ -3,6 +3,10 @@ import requests
|
|
|
3
3
|
import json
|
|
4
4
|
from warlock_manager.libs import utils
|
|
5
5
|
from warlock_manager.libs import cache
|
|
6
|
+
from warlock_manager.libs.meta import get_meta
|
|
7
|
+
|
|
8
|
+
# "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
|
|
9
|
+
USER_AGENT = 'Warlock Manager/%s (warlock.nexus) <staff@bitsnbytes.dev>' % get_meta()['version']
|
|
6
10
|
|
|
7
11
|
|
|
8
12
|
def download_file(url: str, destination: str):
|
|
@@ -18,7 +22,7 @@ def download_file(url: str, destination: str):
|
|
|
18
22
|
# Ensure the target directory exists
|
|
19
23
|
utils.ensure_file_parent_exists(destination)
|
|
20
24
|
|
|
21
|
-
response = requests.get(url, stream=True)
|
|
25
|
+
response = requests.get(url, stream=True, headers={'User-Agent': USER_AGENT})
|
|
22
26
|
response.raise_for_status() # Check if the request was successful
|
|
23
27
|
|
|
24
28
|
with open(destination, 'wb') as f:
|
|
@@ -47,7 +51,7 @@ def download_json(url: str) -> dict:
|
|
|
47
51
|
if cached is not None:
|
|
48
52
|
return json.loads(cached)
|
|
49
53
|
|
|
50
|
-
response = requests.get(url)
|
|
54
|
+
response = requests.get(url, headers={'User-Agent': USER_AGENT, 'Accept': 'application/json'})
|
|
51
55
|
response.raise_for_status() # Check if the request was successful
|
|
52
56
|
data = response.json()
|
|
53
57
|
|
|
@@ -121,7 +121,7 @@ def makedirs(target_dir: str):
|
|
|
121
121
|
return
|
|
122
122
|
|
|
123
123
|
# Ensure the directory exists within the context of either this game or the game owner's home directory
|
|
124
|
-
if not (target_dir.startswith(
|
|
124
|
+
if not (target_dir.startswith(get_base_directory()) or target_dir.startswith(get_home_directory())):
|
|
125
125
|
raise Exception('Cannot create directory outside of game directory: %s' % target_dir)
|
|
126
126
|
|
|
127
127
|
# Iterate up until the parent directory exists.
|
|
@@ -8,7 +8,7 @@ import hashlib
|
|
|
8
8
|
import secrets
|
|
9
9
|
from warlock_manager.libs.cmd import Cmd
|
|
10
10
|
from warlock_manager.services.base_service import BaseService
|
|
11
|
-
from warlock_manager.libs.utils import
|
|
11
|
+
from warlock_manager.libs.utils import get_base_directory
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class Nexus:
|
|
@@ -34,7 +34,7 @@ class Nexus:
|
|
|
34
34
|
with open(self.email_file, 'r') as f:
|
|
35
35
|
self.email = f.read().strip()
|
|
36
36
|
|
|
37
|
-
manager_meta_path = os.path.join(
|
|
37
|
+
manager_meta_path = os.path.join(get_base_directory(), '.manage.json')
|
|
38
38
|
if os.path.exists(manager_meta_path):
|
|
39
39
|
with open(manager_meta_path, 'r') as f:
|
|
40
40
|
meta = json.load(f)
|
|
@@ -222,7 +222,7 @@ class Nexus:
|
|
|
222
222
|
# Only push stats for running services
|
|
223
223
|
return
|
|
224
224
|
|
|
225
|
-
last_checkin_file = os.path.join(
|
|
225
|
+
last_checkin_file = os.path.join(get_base_directory(), '.cache', '.%s.checkin' % service.service)
|
|
226
226
|
now = int(time.time())
|
|
227
227
|
if os.path.exists(last_checkin_file):
|
|
228
228
|
# Only push stats once every 15 minutes
|
|
@@ -1321,7 +1321,7 @@ class BaseService(ABC):
|
|
|
1321
1321
|
logging.info('Removed environment file for %s at %s' % (self.service, self._env_file))
|
|
1322
1322
|
|
|
1323
1323
|
target_dir = self.get_app_directory()
|
|
1324
|
-
app_dir = os.path.join(
|
|
1324
|
+
app_dir = os.path.join(utils.get_base_directory(), 'AppFiles')
|
|
1325
1325
|
if target_dir != app_dir and os.path.exists(target_dir):
|
|
1326
1326
|
# Only remove app directory if it's different than the game app.
|
|
1327
1327
|
# This is important because by default game instances share the same application base.
|
|
@@ -1379,7 +1379,7 @@ class BaseService(ABC):
|
|
|
1379
1379
|
|
|
1380
1380
|
:return:
|
|
1381
1381
|
"""
|
|
1382
|
-
base =
|
|
1382
|
+
base = utils.get_base_directory()
|
|
1383
1383
|
temp_store = os.path.join(base, '.save-%s' % self.service)
|
|
1384
1384
|
save_source = self.get_save_directory()
|
|
1385
1385
|
save_files = self.get_save_files()
|
|
@@ -1433,7 +1433,7 @@ class BaseService(ABC):
|
|
|
1433
1433
|
|
|
1434
1434
|
:return:
|
|
1435
1435
|
"""
|
|
1436
|
-
base =
|
|
1436
|
+
base = utils.get_base_directory()
|
|
1437
1437
|
temp_store = os.path.join(base, '.save-%s' % self.service)
|
|
1438
1438
|
target_dir = self.get_backup_directory()
|
|
1439
1439
|
base_name = self.service
|
|
@@ -1517,7 +1517,7 @@ class BaseService(ABC):
|
|
|
1517
1517
|
print('Game server is currently running, please stop it before restoring a backup!', file=sys.stderr)
|
|
1518
1518
|
return False
|
|
1519
1519
|
|
|
1520
|
-
base =
|
|
1520
|
+
base = utils.get_base_directory()
|
|
1521
1521
|
temp_store = os.path.join(base, '.restore-%s' % self.service)
|
|
1522
1522
|
save_dest = self.get_save_directory()
|
|
1523
1523
|
|
|
@@ -1567,7 +1567,7 @@ class BaseService(ABC):
|
|
|
1567
1567
|
|
|
1568
1568
|
:return:
|
|
1569
1569
|
"""
|
|
1570
|
-
base =
|
|
1570
|
+
base = utils.get_base_directory()
|
|
1571
1571
|
temp_store = os.path.join(base, '.restore-%s' % self.service)
|
|
1572
1572
|
|
|
1573
1573
|
# Cleanup
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{warlock_manager-2.2.6 → warlock_manager-2.2.7}/tests/test_unreal_config_ark_spawn_entities.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager/libs/sensitive_data_filter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{warlock_manager-2.2.6 → warlock_manager-2.2.7}/warlock_manager.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|