From b38a1e35401ad3f03cd684fd2a61e6a2079cde6c Mon Sep 17 00:00:00 2001 From: zeus Date: Thu, 16 Jul 2020 14:28:49 +0200 Subject: [PATCH] extract base64-binary from xml --- oneliners.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/oneliners.sh b/oneliners.sh index c76fc9c..f573e06 100644 --- a/oneliners.sh +++ b/oneliners.sh @@ -5,3 +5,6 @@ export PKG=vim; for i in $(dpkg -L PKG) ; do if [[ -f "$i" ]] && [[ ! -L "$i" ]] # find all links in the fs, that link to a specific target: find / -type l -exec readlink -nf {} ';' -exec echo " -> {}" ';' | grep "/bin/bash" + +# extract base64-coded binary within a given tag in an xml (1st match) +cat file.xml | sed -n -e 's/.*\(.*\)<\/ns5:Daten>.*/\1/p' | base64 -d