Questions tagged [xxd]

`xxd` is a Linux Hexdump command

On the Linux platform, the command xxd (available via most package managers) works as a hexdump tool.

From man xxd

xxd creates a hex dump of a given file or standard input. It can also 
convert a hex dump back to its original binary form. Like uuencode(1) and 
uudecode(1) it allows the transmission of binary data in a `mail-safe' ASCII 
representation, but has the advantage of decoding to standard output. 
Moreover, it can be used to perform binary file patching.  
107 questions
3
votes
0 answers

Characters D5 and E5

I am processing textual data. Some words are wrapped in special characters I do not understand. Their hex codes are D5 and E5: xxd data: 0000b60: 6520 5375 7072 656d 6520 436f 7572 7420 e Supreme Court 0000b70: 616e 6420 736f 6d65 2073 7461 7465…
choroba
  • 231,213
  • 25
  • 204
  • 289
3
votes
4 answers

How to insert an offset to hexdump with xxd?

Is there an easy way to add an offset to the hex dump generated by xxd ? i.e instead of 0000: 0004: 0008: I should get Offset+0000: Offset+0004: Offset+0008:
Jean
  • 21,665
  • 24
  • 69
  • 119
2
votes
1 answer

How to convert model.tflite to model.cc and model.h on Windows 10

I have created a TensorFlow Lite .tflite model which I plan to use on a microcontroller. However, this file must be converted to a C source file, i.e, a TensorFlow Lite for Microcontrollers model. TensorFlow documentation provides a simple way to…
2
votes
2 answers

xxd: how to simply revert without adding "00000000:"?

Sometimes I have unwanted characters in my files (DB tables, git content, etc). When I list them with xxd I have the UTF-8 code, e.g.: e28099 I would like to know which is this character in bash, so I type: echo -n '00000000: e28099' | xxd -r And I…
user3719454
  • 994
  • 1
  • 9
  • 24
2
votes
0 answers

xxd how to output just hex bytes, no whitespace

Using the xxd command, is it possible to read one byte at a time from the input and to output one byte at a time. No spaces, no newlines, no ending newline? I tried the columns setting and did not get the desired result.
William Entriken
  • 37,208
  • 23
  • 149
  • 195
2
votes
0 answers

How to get back source code files from any .exe file?

I have .exe file compiled from javascript and python. I would like to decompile it and get back the code. I tried many python decompiler libraries but it doesn't work. I tried using `hexdump` or `xxd` commands but I am new to it so I don't really…
Lys
  • 21
  • 1
  • 2
2
votes
3 answers

Script for Hex to ASCII Text Converter

I'm trying to covert hex number into ASCII text and for that I used xxd. But the issue with that it's not throwing any output. For Example, I used: echo…
2
votes
1 answer

Hex format of JPEG, can image end ffd9 be in 9 and a columns

For solving some problems in steganography, I need to look for end of images in hex I am using xxd image.jpeg|grep ffd9 it does return the line having ffd9 when it is in C and D columns but the same does not return anything when it is in 9 and A…
Pro_Noob
  • 53
  • 7
2
votes
2 answers

How to get specific format using hexdump or xxd?

I require the hexdumps of a number of files in a specific format: 00000000 4D 5A 90 00 03 00 00 00 04 00 00 00 FF FF 00 00 However, using hexdump or xxd I can only manage to get the above with a colon after the address and the ASCII text to the…
2
votes
1 answer

ofstream writing extra zero bytes to file on Unix server

Why does the following code write four bytes when run on my local Windows machine using Visual C++, yet writes 4 extra 0 bytes when I upload to my school's Unix server? unsigned long temp = 1025; ofstream file("test",…
Zach
  • 237
  • 4
  • 16
2
votes
1 answer

How to transform the hex signature into a binary signature prior to verification

I need signature data in hex form, so I use: openssl dgst -sha256 -hex -sign ./id_rsa my.data > my.signature The openssl docs note that: Hex signatures cannot be verified using openssl. Instead, use "xxd -r" or similar program to transform the hex…
Dan
  • 4,197
  • 6
  • 34
  • 52
2
votes
0 answers

How to read characters in specified range with xxd?

The argument -l means:stop after writing octets. xxd -l 120 -c 10 test.txt The command will read characters in the range :from 0 (beginning) till 119 ,10 bytes per line in the file test.txt. xxd -l 140 -c 10 test.txt The command will read…
showkey
  • 482
  • 42
  • 140
  • 295
2
votes
1 answer

Searching for a specifc given hex string in multiple images on Linux

I am doing some research on image processing and I wanted to know if its possible to search for a specific hex string/byte array in various images. It would be great if it gives me a list of images that has that specific string. Basically what grep…
plasma33
  • 155
  • 7
2
votes
2 answers

New to awk and sed, How could I improve this? Multiple sed and awk commands

This is the script I've constructed It takes a list of files according to the extension supplied as an argument. It then removes everything before the pattern 00000000: in those files. The pattern 00000000: is preceded by the string
, it then…
Armandur
  • 55
  • 6
2
votes
1 answer

xxd -r without xxd

I'm running on a scaled down version of CentOS 5.5 without many tools available. No xxd, bc, or hd. I can't install any additional utilities, unfortunately. I do have od, dd, awk, and bourne shell (not bash). What I'm trying to do is relatively…
Allen
  • 83
  • 1
  • 1
  • 6