From 580ac932df430e94924ae3c294293f99daf82f40 Mon Sep 17 00:00:00 2001 From: wl-zhao Date: Wed, 18 Dec 2024 14:49:38 +0800 Subject: [PATCH] add mac_addr to check realy exist --- custom_routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_routes.py b/custom_routes.py index c85fec1..9e2dca2 100755 --- a/custom_routes.py +++ b/custom_routes.py @@ -222,6 +222,6 @@ async def shellagent_check_exist(request): data = await request.json() return_dict = { - "exist": os.path.exists(data["path"]) + "exist": uuid.getnode() == data["mac_addr"] and os.path.exists(data["path"]) # really exist, instead of same name } return web.json_response(return_dict, status=200) \ No newline at end of file