Questions tagged [xxd]
12 questions
18
votes
3 answers
How to convert file data to plain hex?
How to easily convert to/from plain machine-readable hexadecimal data (without any paddings/offsets/character view) with xdd or hexdump?
I'm tired of digging of some special format strings (and finding out that it suddenly starts wrapping lines…
Vi.
- 17,755
14
votes
5 answers
hexdump vs xxd format difference
I was searching for how to do a reverse hexdump and found xxd mentioned. However, it does not seem to work with simply:
xxd -r hexdumpfile > binaryfile
I then compared the difference between outputs of xxd infile and hexdump infile, and found three…
tanon
- 141
13
votes
5 answers
7
votes
1 answer
How do I dump raw binary 'bits' from a file, without line numbers and ASCII interpretation?
How do I dump a "pure" and plain binary sequence of bits?
For example, I have this:
0000000: 10001001 01010000 01001110 01000111 00001101 00001010 .PNG..
0000006: 00011010 00001010 00000000 00000000 00000000 00001101 ......
000000c: 01001001…
learnerX
- 444
6
votes
2 answers
is it possible to reverse xxd to get original file from binary file
i have been using xxd to create a hexa representation of a file(any file like .jpg, .docx, .zip etc), like this,..
$ xxd -p original_file.zip > hexa_format.txt
and to reverse
$ xxd -r -p hexa_format.txt > original_file.zip
if anybody feels…
arvindh
- 163
5
votes
1 answer
Alternative to xxd that returns bytes?
I am on Mac OS X 10.8.2, running a compiled copy of xxd v1.10 (source code) as well as the copy of xxd that comes preinstalled on OS X.
I am trying to generate a Base64-encoded SHA1 signature via a chain of piped commands in Terminal.
Normally I…
Alex Reynolds
- 931
3
votes
1 answer
Norton Internet Security on my Windows 7 system is blocking xxd
xdd is part of Vim, and Norton seems to be blocking it on my Windows 7 computer. How do I work around this? Should I be concerned?
BillKSmith
1
vote
1 answer
Archive binary has reversed hex signature
Context
This is a repost of my StackOverflow question which was incorrectly asked, as it does not relate to programming.
I'm playing Bandit on OverTheWire, and level thirteen requires unzipping various compressed file formats without knowing the…
William Torkington
- 113
- 4
1
vote
2 answers
(git) Bash: how exactly does a line break differ from \n in a variable?
My apologies, I must have made some mistakes when performing the initial tests, as after putting everything into a single script the xxd output does indeed always match the stdouput.
The entire script is here: https://pastebin.pl/view/454913ec
I'm…
1
vote
1 answer
Why does the xxd command not respect byte grouping when operated in reverse?
I am trying to write bytes to a file on my system in a script, and I decided to use xxd (with -r) to achieve this. However, I want it to take endianness into account for each 4 bytes. here is an example i used to test this:
echo "1122334455667788"…
0
votes
1 answer
Using the "xxd -r" command does not convert entire ASCII to text
I'm working on a CTF (Capture The Flag) challenge, and one of the flags is hidden in ASCII
cat /home/alice/flag22
39 64 31 61 65 38 64 35 36 39 63 38 33 65 30 33 64 38 61 38 66 36 31 35 36 38 61 30 66 61 37 64
When I pipe that into the xxd and…
Roger
- 151
0
votes
1 answer
Why does xxd -r change the first byte of my binary file
I'm confused by the behavior of xxd, here's what I'm doing.
I have a xxd dump :
$ head dump
00000000: 7f45 4c46 0201 0103 0000 0000 0000 0000 .ELF............
00000010: 0200 3e00 0100 0000 107f 4400 0000 0000 ..>.......D.....
00000020: 4000 0000…
aflamant
- 3