hping3/utils
2022-04-13 18:01:39 +08:00
..
hex2bin.c first draft 2022-04-13 18:01:39 +08:00
Makefile first draft 2022-04-13 18:01:39 +08:00
README.HEX2BIN first draft 2022-04-13 18:01:39 +08:00

hex2bin is an utility to convert a string in hexadecimal format like
"2b2b2b415448300d" (an example to test a stupid modem vulnerability)
in the binary equivalent. For example:

# echo -n "2b2b2b415448300d" | ./hex2bin > modem.string

# cat modem.string
+++ATH0

# ls -l modem.string
-rw-r--r--   1 antirez  users           8 Nov 17 16:01 modem.string

# hping2 --file ./modem.string -d 8 --icmp target.host.org

using switch '-r' hex2bin perform exactly the inverse operation.
for example:

echo "antirez" | ./hex2bin -r

616e746972657a0a