skip to main
|
skip to sidebar
Derek's random thoughts
Thursday, April 22, 2010
Converting IP Options from binary to hex in Perl
A quick one liner to convert TCP Options from binary to Hex.
my
$tcp_obj
=
NetPacket::TCP
->decode(
$ip_obj
->{data});
my
$tcp_options
=
sprintf
(
"
%08X
"
,
unpack
(
"
N
"
,
$tcp_obj
->{options})).
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)
Blog Archive
▼
2010
(1)
▼
April
(1)
Converting IP Options from binary to hex in Perl
►
2009
(3)
►
November
(2)
►
February
(1)
►
2007
(2)
►
October
(2)
Labels
FreeBSD
(2)
Perl
(2)