From 8a42c59bebee4a3dd9e15a838ca61b1475163e6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandino=20Araico=20S=C3=A1nchez?= Date: Sun, 7 Apr 2024 05:31:38 -0600 Subject: [PATCH] Decodificador de hexadecimal escapado --- scripts/hex2text | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 scripts/hex2text diff --git a/scripts/hex2text b/scripts/hex2text new file mode 100755 index 0000000..0128915 --- /dev/null +++ b/scripts/hex2text @@ -0,0 +1,18 @@ +#!/bin/bash + + +if [[ -z $1 ]] ; then + echo "usage: $0 " + exit 1 +fi + +STR=$1 + +sed 's/\\x/:/g' <<< $STR \ + | tr ':' "\n" \ + | while read B ; do + #echo $B + [[ -n $B ]] && printf "\x$B" + done +echo +