From 513909c38c62d6f286e8144438bd3025ed767337 Mon Sep 17 00:00:00 2001 From: Michalis Papadopoullos Date: Mon, 11 Jan 2021 13:59:30 +0200 Subject: [PATCH] Added adiff, ar, bridge file_read --- _gtfobins/adiff.md | 11 +++++++++++ _gtfobins/ar.md | 9 +++++++++ _gtfobins/bridge.md | 8 ++++++++ 3 files changed, 28 insertions(+) create mode 100644 _gtfobins/adiff.md create mode 100644 _gtfobins/ar.md create mode 100644 _gtfobins/bridge.md diff --git a/_gtfobins/adiff.md b/_gtfobins/adiff.md new file mode 100644 index 0000000..e018484 --- /dev/null +++ b/_gtfobins/adiff.md @@ -0,0 +1,11 @@ +--- +functions: + file-read: + - description: Read files from archives when utils like "tar" are missing. + code: | + OUTFILE=$(mktemp -u) + LFILE=file_to_read + ar r "${OUTFILE}" "${LFILE}" + adiff "${OUTFILE}" /dev/null + ls -la Unpack* +--- diff --git a/_gtfobins/ar.md b/_gtfobins/ar.md new file mode 100644 index 0000000..1a72b35 --- /dev/null +++ b/_gtfobins/ar.md @@ -0,0 +1,9 @@ +--- +functions: + file-read: + code: | + OUTFILE=$(mktemp -u) + LFILE=file_to_read + ar r "${OUTFILE}" "${LFILE}" + cat "${OUTFILE}" +--- diff --git a/_gtfobins/bridge.md b/_gtfobins/bridge.md new file mode 100644 index 0000000..f3ce889 --- /dev/null +++ b/_gtfobins/bridge.md @@ -0,0 +1,8 @@ +--- +functions: + file-read: + - description: Outputs the first line of the file, until the first whitespace, to stderr. + code: | + LFILE=file_to_read + bridge -b "${LFILE}" +---