summaryrefslogtreecommitdiff
path: root/agent/apps/target_gz.py
diff options
context:
space:
mode:
authorshihaoyue <[email protected]>2024-09-20 09:07:10 +0800
committershihaoyue <[email protected]>2024-09-20 09:07:10 +0800
commit5d07e2a4e2f5e93c9f4699c49cbcb52c38aebbee (patch)
tree8f756f0c014cdfc87412224d9569f1e21bb5ff19 /agent/apps/target_gz.py
parent78575c5a7322693359d35c4f3d6e9d9698c5188e (diff)
# 重大更新 自动化任务,极其不稳定
Diffstat (limited to 'agent/apps/target_gz.py')
-rw-r--r--agent/apps/target_gz.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/agent/apps/target_gz.py b/agent/apps/target_gz.py
index d3287d8..19bd912 100644
--- a/agent/apps/target_gz.py
+++ b/agent/apps/target_gz.py
@@ -20,5 +20,8 @@ def execute_command(IP):
encoding='utf-8')
output = proc.communicate()[0].strip()
-
- return output \ No newline at end of file
+ try:
+ json.loads(output)
+ return output, 200
+ except:
+ return 500 \ No newline at end of file