D
D
djok21422021-03-29 23:27:02
Node.js
djok2142, 2021-03-29 23:27:02

Is there a hexdump equivalent for Node.js?

There is a hexdump utility in linux. Executing

it with this command:
# hexdump -v -e '/1 "%02X"' < /key.bin
I get the following line:
F75BC62388A5B99EFD2A5183377B2BA5

How can I get this line using node.js and win10, there is no hexdump utility for win10?

Googled the library https://www.npmjs.com/package/hexdump-nodejs , but I can't figure out how to specify the path to the binary file and how to set the template '/1 "%02X"'?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lynn "Coffee Man", 2021-03-30
@Lynn

fs.readFileSync("/key.bin").toString("hex")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question