Questions tagged [hexdump]

A hex dump is a hexadecimal view of data. Looking at a hex dump of data is commonly done as a part of debugging, or of reverse engineering. In a hex dump, each byte (8-bits) is represented as a two-digit hexadecimal number.

387 questions
134
votes
1 answer

Transform hexadecimal information to binary using a Linux command

I have this binary file on my Linux system... udit@udit-Dabba ~ $ cat file.enc Salted__s�bO��<0�F���Jw!���]�:`C�LKȆ�l Using the hexdump command, I see its information like this: udit@udit-Dabba ~ $ hexdump -C file.enc 00000000 53 61 6c 74 65…
Udit Gupta
  • 3,162
  • 11
  • 43
  • 71
70
votes
9 answers

Convert binary data to hexadecimal in a shell script

I want to convert binary data to hexadecimal, just that, no fancy formatting and all. hexdump seems too clever, and it "overformats" for me. I want to take x bytes from the /dev/random and pass them on as hexadecimal. Preferably I'd like to use only…
davka
  • 13,974
  • 11
  • 61
  • 86
52
votes
4 answers

How to print only the hex values from hexdump without the line numbers or the ASCII table?

following Convert decimal to hexadecimal in UNIX shell script I am trying to print only the hex values from hexdump, i.e. don't print the lines numbers and the ASCII table. But the following command line doesn't print anything: hexdump -n 50 -Cs 10…
0x90
  • 39,472
  • 36
  • 165
  • 245
49
votes
3 answers

Jump to byte address in vim?

I'm investigating a mainly UTF-8 file with lot of long lines. However, the file is not entirely text file, there is some garbage. To find my point of interest I'm using hd and grep. So at some point I know it'm interested in e.g. 0000301a, so I…
Alois Mahdal
  • 10,763
  • 7
  • 51
  • 69
43
votes
2 answers

hexdump output order

I am playing with the Unix hexdump utility. My input file is UTF-8 encoded, containing a single character ñ, which is C3 B1 in hexadecimal UTF-8. hexdump test.txt 0000000 b1c3 0000002 Huh? This shows B1 C3 - the inverse of what I expected! Can…
zedoo
  • 10,562
  • 12
  • 44
  • 55
38
votes
2 answers

how to get hexdump of a structure data

.... finalize(char *hdrs, sendip_data *headers[], int index, sendip_data *data, sendip_data *pack) { ........ For debugging purposes I want a hex dump of the data and pack structures, which are of type sendip_data, a really…
Udit Gupta
  • 3,162
  • 11
  • 43
  • 71
29
votes
3 answers

Use binwalk to extract all files

I have a file music.mp3. After using binwalk, I get the result: pexea12@DESMICE:~/Downloads$ binwalk music.mp3 DECIMAL HEXADECIMAL DESCRIPTION -------------------------------------------------------------------------------- 152318 …
pexea12
  • 1,069
  • 2
  • 18
  • 36
26
votes
4 answers

Using hexdump to output only ASCII

I'm trying to output ASCII values corresponding to some binary data. I have successfully applied the hexdump utility to output hexdump and ASCII side-by-side as below: 00000120 20 20 20 20 3d 20 30 78 30 30 30 30 30 30 33 30 | =…
recluze
  • 1,920
  • 4
  • 21
  • 34
23
votes
8 answers

Hexdump reverse command

The hexdump command converts any file to hex values. But what if I have hex values and I want to reverse the process, is this possible?
maysara
  • 5,873
  • 2
  • 23
  • 34
18
votes
2 answers

Convert a binary string to Hexadecimal and vice-versa in Elixir

How do you convert a binary string to a Hexadecimal String and vice-versa in Elixir? There are a few posts on SO regarding this topic for other "main stream" languages. There's even an SO post that benchmarks various C# implementations How do we do…
Charles Okwuagwu
  • 10,538
  • 16
  • 87
  • 157
17
votes
4 answers

How can I create a binary file using Bash?

How can I create a binary file with consequent binary values in Bash? Like: hexdump testfile 0000000 0100 0302 0504 0706 0908 0b0a 0d0c 0f0e 0000010 1110 1312 1514 1716 1918 1b1a 1d1c 1f1e 0000020 2120 2322 2524 2726 2928 2b2a 2d2c 2f2e 0000030…
mustafa
  • 3,605
  • 7
  • 34
  • 56
17
votes
7 answers

Off-the-Shelf C++ Hex Dump Code

I work a lot with network and serial communications software, so it is often necessary for me to have code to display or log hex dumps of data packets. Every time I do this, I write yet another hex-dump routine from scratch. I'm about to do so…
Kristopher Johnson
  • 81,409
  • 55
  • 245
  • 302
15
votes
4 answers

Viewing blob data as a hexdump with ASCII in the sqlite3 console

I have a column of data in a SQLite table being stored as a blob. Specifically, it is a serialized POJO (java object). Either way, I'd like to view it in the SQLite console as a hex dump, sort of like this: 0000000000 |The correction f| 0000000016 …
E.S.
  • 2,733
  • 6
  • 36
  • 71
11
votes
5 answers

Create Binary files in UNIX

This question was out there for a while and I thought I should offer some bonus points if I can get it to work. What did I do… Recently at work, I wrote a parser that would convert a binary file in a readable format. Binary file isn't an Ascii file…
jaypal singh
  • 74,723
  • 23
  • 102
  • 147
11
votes
1 answer

How can I change the number of columns printed by `hexdump`?

How can I change the number of columns printed by hexdump from the default 16 (to 21)? Or where can I find the place to change the default format string used in hexdump in order to modify the number used there?
Ilya Smagin
  • 5,992
  • 11
  • 40
  • 57
1
2 3
25 26