From f7925720791e8eb2083bcfe8a2a0eeeae09c66cd Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Wed, 12 Feb 2020 15:39:20 +0200 Subject: [PATCH] Adjusted island to parse changed host info --- monkey/monkey_island/cc/resources/bootloader.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/monkey/monkey_island/cc/resources/bootloader.py b/monkey/monkey_island/cc/resources/bootloader.py index fac0998cb..bff8a94cd 100644 --- a/monkey/monkey_island/cc/resources/bootloader.py +++ b/monkey/monkey_island/cc/resources/bootloader.py @@ -22,18 +22,14 @@ class Bootloader(flask_restful.Resource): # Used by monkey. can't secure. def post(self, **kw): - data = json.loads(request.data.decode().replace("\n", "")) + data = json.loads(request.data.decode().replace("\n", "").replace("NAME=\"", "").replace("\"\"", "\"")) # Remove local ips local_addr = [i for i in data["ips"] if i.startswith("127")] if local_addr: data["ips"].remove(local_addr[0]) - # Clean up os info - data['os_version'] = data['os_version'].split(" ")[0] - mongo.db.bootloader_telems.insert(data) node_id = NodeService.get_or_create_node_from_bootloader_telem(data) - return make_response({"status": "OK"}, 200)