Files
PLG-MuDiCS/display/requests/shellComand.bru
T
2025-10-31 16:51:14 +01:00

24 lines
616 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 | xargs -0 -I{} bash -c 'typ=$(file -b --mime-type -- \"{}\"); size=$(stat -c \"%s\" -- \"{}\"); created=$(stat -c \"%w\" -- \"{}\"); [ \"$created\" = \"-\" ] && created=$(stat -c \"%y\" -- \"{}\"); jq -n --arg name \"{}\" --arg type \"$typ\" --arg size \"$size\" --arg created \"$created\" \"{name:\\$name, type:\\$type, size:\\$size, created:\\$created}\"'"
}
}
settings {
encodeUrl: true
timeout: 0
}