File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / hping2 / utils / README.HEX2BIN
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 22:11:37 2012 UTC (12 years, 10 months ago) by misho
Branches: hping2, MAIN
CVS tags: v2_0_0rc3p7, v2_0_0rc3p5, v2_0_0rc3p4, v2_0_0rc3p0, v2_0_0rc3, HEAD
hping2

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>