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
0
votes
2 answers

Espressif ESP32 web server HTML example

I'm working on an embedded ESP32 design using one of the web server examples included in the esp-idf examples. I'm able to get the device into soft AP mode and display a simple web page. Now that I have that working, I'm trying to build a page with…
user7009351
  • 55
  • 2
  • 5
0
votes
1 answer

Differences between objdump and xxd

I am trying to find a call function in a binary file, so I tried this: Compile my code (in C), Use the command: mips-mti-linux-gnu-objdump -d myapp.elf> objdump.txt My function in objdump.txt file: 9d003350: 42000828 myfunction 0x1 Now, I want to…
Matheus
  • 3
  • 1
  • 3
0
votes
1 answer

Addresses in gdb versus xxd dump

I'm trying to find a line of code in an xxd dump. If I open the executable with gdb and add a breakpoint at the line of code, it shows an address like 0x8212224, but my xxd dump only goes as high as 0x3040080. Is there a way to translate the gdb…
Dtor
  • 590
  • 2
  • 9
0
votes
1 answer

hexdump output vs xxd output

I'm trying to create a hexdump like xxd but there are some differences that I'm trying to resolve. Currently the program processes 10 characters per line as seen on the utmost right column vs 16 in xxd. It also only shows 1 octet per column instead…
John
  • 341
  • 1
  • 6
  • 13
0
votes
1 answer

how to convert bytes to binary in C language

I need to convert bytes into binary, I have a couple of functions which will output the byte representation of a file. Does anybody know how to do this effeciently? I know of several code extensive methods but I'm curious to see the ideas people…
mosawi
  • 1,283
  • 5
  • 25
  • 48
0
votes
1 answer

Bash script that prints out contents of a binary file, one word at a time, without xxd

I'd like to create a BASH script that reads a binary file, word (32-bits) by word and pass that word to an application called devmem. Right now, I have: ... for (( i=0; i<${num_words}; i++ )) do val=$(dd if=${file_name} skip=${i} count=1 bs=4…
user2162449
  • 303
  • 2
  • 13
0
votes
1 answer

when downloading certficate binary data , result is invalid certificate

I'm receiving binary data in php as certificate content and I want to download it to browser . I'm getting this message always when opening it with certificate viewer : hex(19).pfx Could not display 'hex(19).pfx' Reason: Unrecognized or…
SafeY
  • 287
  • 2
  • 6
  • 18
0
votes
1 answer

How to remove group seperator from text file

I have a text file that was created on a windows PC that I'm then opening on a debian machine. I open it in nano and at the bottom it says (Converted from DOS format). When I grab a single line out of the file and look at it's binary representation…
David
  • 14,569
  • 34
  • 78
  • 107
0
votes
2 answers

Parse log containing hex character codes using awk or xxd or something

i have a file that looks like this: . . . 15 02 2013 12:05:07 [DBG] vspd[3327]: VSP 0: RX 452B30303032340D 15 02 2013 12:05:07 [DBG] vspd[3327]: VSP 0: WX 452B30303032340D Sniffer log of serial port communication. How can i…
Maquefel
  • 480
  • 4
  • 16
0
votes
2 answers

Counting the number of fields stored in a variable

I'm working on a basic file carver and I'm currently stuck on calculate the byte position of the file. I've worked out that I need a piece of code to perform the following steps; Locate the $searchQuery in the variable Remove the rest of the string…
Revenant
  • 19
  • 1
  • 4
-1
votes
0 answers

GPG allows importing an invalid secp256k1 public key

I came across a PGP public key that seems invalid. The key is a secp256k1 public key that supported by GPG. In fact, GPG allows importing that key even if it has an invalid secp256k1 public key inside. Running --list-packets on the key shows that…
Andreas Tzionis
  • 1,019
  • 9
  • 17
-1
votes
1 answer

Why is xxd -r cutting off the first character of my string?

I am running the following command: $ echo "50 40 73 73 77 30 72 64 40 31 32 33 21 21 31 32 33" | xxd -r @ssw0rd@123!!123 For the life of me I don't know why the output does not start with 'P'
Dan Neal
  • 51
  • 6
-1
votes
1 answer

Why is DH prime and its hex different in openssl?

From the below, why is prime not same as xxd hex? I am trying to generate my own parameters but not sure what is the math for those values... [root@localhost]# openssl dh -in dhp.pem -text DH Parameters: (1024 bit) prime: …
LinconFive
  • 1,718
  • 1
  • 19
  • 24
-1
votes
1 answer

Opening a binary file in VI and XXD

I am attempting to modify the binary data of an executable program in Linux using Ubuntu. I have a file called a.out. I can dump it in hex using xxd a.out | less. Then in another terminal window, I run vi a.out. Vi's data is slightly different in…
Matthew
  • 3,886
  • 7
  • 47
  • 84
-2
votes
2 answers

C - fwrite - can't open file because it contains invalid characters

I'm writing an array of 3 integers to a file using C's fwrite function but when opening the output file with gedit (using Unicode UTF-8), I get the following error: There was a problem opening the file. The file you opened has invalid characters. …
Vee
  • 1,821
  • 3
  • 36
  • 60