Files
PLG-MuDiCS/display/requests/shellComand.bru
T

24 lines
660 B
Plaintext

meta {
name: shellComand
type: http
seq: 1
}
patch {
url: 127.0.0.1:1323/api/shellCommand
body: json
auth: inherit
}
body:json {
{
"command": "find . -maxdepth 1 -mindepth 1 -print0 | while IFS= read -r -d '' f; do\n typ=$(file -b --mime-type -- \"$f\")\n size=$(stat -c '%s' -- \"$f\")\n created=$(stat -c '%w' -- \"$f\")\n [ \"$created\" = \"-\" ] && created=$(stat -c '%y' -- \"$f\")\n jq -n --arg name \"$f\" --arg type \"$typ\" --arg size \"$size\" --arg created \"$created\" '{name:$name, type:$type, size:($size|tonumber), created:$created}' | tr -d '\\n'\n echo\n done\n"
}
}
settings {
encodeUrl: true
timeout: 0
}