diff options
| author | handingkang <[email protected]> | 2024-04-09 21:18:21 +0800 |
|---|---|---|
| committer | handingkang <[email protected]> | 2024-04-09 21:18:21 +0800 |
| commit | 0fe0e0ec4dda1c78bee1701eb74cc9c4d0128cd9 (patch) | |
| tree | 5e4c3dc33d7c41b657cc20767007e484f59924a4 /agent | |
| parent | 7810aa10cc764db5fe262e0612c664a8df149957 (diff) | |
接口定义完善
Diffstat (limited to 'agent')
| -rw-r--r-- | agent/apps/code/test/README.md | 5 | ||||
| -rw-r--r-- | agent/apps/code/test/hello.py | 1 | ||||
| -rw-r--r-- | agent/apps/script.py | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/agent/apps/code/test/README.md b/agent/apps/code/test/README.md new file mode 100644 index 0000000..2dda2f9 --- /dev/null +++ b/agent/apps/code/test/README.md @@ -0,0 +1,5 @@ +# 简介 + +hello.py 是一个测试文件,用于验证主控端任务下发到代理执行的可行性 + +hello.py接收一个字符串,并返回对应的执行输出
\ No newline at end of file diff --git a/agent/apps/code/test/hello.py b/agent/apps/code/test/hello.py index e8b6f5e..8271b56 100644 --- a/agent/apps/code/test/hello.py +++ b/agent/apps/code/test/hello.py @@ -3,4 +3,5 @@ import argparse parser = argparse.ArgumentParser() parser.add_argument('-s', '--string', type=str, help="输出到控制台的字符串", required=True) args = parser.parse_args() +print("hello.py开始执行,执行参数为" + args.string) print("hello" + str(args.string)) diff --git a/agent/apps/script.py b/agent/apps/script.py index f9886b4..1e2a5f3 100644 --- a/agent/apps/script.py +++ b/agent/apps/script.py @@ -14,7 +14,7 @@ executor = ThreadPoolExecutor(5) @bp.post('/') @bp.doc("渗透任务参数接收接口", "返回任务执行状态") @bp.input({ - 'name': String(required=True), + 'policy': String(required=True), 'param': String(required=True) }) def start_script(query_data): |
