feat(harvester): auto-extract and execute curl commands against box.muse-dev.online
This commit is contained in:
@@ -152,6 +152,17 @@ def parse_tool_calls(text):
|
||||
calls.append((d["op"], d.get("args", {})))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Extract curl command tool calls (e.g. curl ... -d '{"op": "...", "args": ...}')
|
||||
for m in re.finditer(r"curl\s+.*?https?://(?:box\.muse-dev\.online|100\.123\.153\.75:8444|exec\.muse-dev\.online)/exec.*?-[dD]\s+(['\"])(.*?)\1", text or "", re.DOTALL):
|
||||
raw_body = m.group(2)
|
||||
try:
|
||||
d = json.loads(raw_body)
|
||||
if isinstance(d, dict) and "op" in d:
|
||||
calls.append((d["op"], d.get("args", {})))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
return calls
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user