How to modify a hex string to LE-format before passing it to `xxd -r` to view its binary contents?
2
votes
1
answer
619
views
The hex string
0068732f6e69622f
represents the ASCII string /bin/sh
, when it's stored in memory in LE-format.
Is there any Linux utiltity that will take the hex string and reverse it bytes (2f62696e2f736800
), such that xxd -r -ps
will display /bin/sh
?
$ echo -n 0068732f6e69622f | xxd -r -ps
hs/nib/
I've looked into xxd -e
, but it's not possible to use it with -r
:
-e little-endian dump (incompatible with -ps,-i,-r).
Asked by Shuzheng
(4931 rep)
Jan 27, 2021, 10:45 AM
Last activity: Jan 27, 2021, 12:16 PM
Last activity: Jan 27, 2021, 12:16 PM