rax2 utility comes along with the radare2 framework, and it's a simple conversion utility, it can convert between binary, decimal, hex, string, etc... You can find examples in the help menu for each option:
root@kali:~# rax2 -h
Usage: rax2 [options] [expression]
int -> hex ; rax2 10
hex -> int ; rax2 0xa
-int -> hex ; rax2 -77
-hex -> int ; rax2 0xffffffb3
int -> bin ; rax2 b30
bin -> int ; rax2 1010d
float -> hex ; rax2 3.33f
hex -> float ; rax2 Fx40551ed8
oct -> hex ; rax2 35o
hex -> oct ; rax2 Ox12 (O is a letter)
bin -> hex ; rax2 1100011b
hex -> bin ; rax2 Bx63
-e swap endianness ; rax2 -e 0x33
-b binstr -> bin ; rax2 -b 01000101 01110110
-s hexstr -> bin ; rax2 -s 43 4a 50
-S bin -> hexstr ; rax2 -S C J P
-v version ; rax2 -V
-x hash string ; rax2 -x linux osx
-k keep base ; rax2 -k 33+3 -> 36
-h help ; rax2 -h
Usage: rax2 [options] [expression]
int -> hex ; rax2 10
hex -> int ; rax2 0xa
-int -> hex ; rax2 -77
-hex -> int ; rax2 0xffffffb3
int -> bin ; rax2 b30
bin -> int ; rax2 1010d
float -> hex ; rax2 3.33f
hex -> float ; rax2 Fx40551ed8
oct -> hex ; rax2 35o
hex -> oct ; rax2 Ox12 (O is a letter)
bin -> hex ; rax2 1100011b
hex -> bin ; rax2 Bx63
-e swap endianness ; rax2 -e 0x33
-b binstr -> bin ; rax2 -b 01000101 01110110
-s hexstr -> bin ; rax2 -s 43 4a 50
-S bin -> hexstr ; rax2 -S C J P
-v version ; rax2 -V
-x hash string ; rax2 -x linux osx
-k keep base ; rax2 -k 33+3 -> 36
-h help ; rax2 -h
root@kali:~# rax2 0x33
51
root@kali:~# rax2 Fx33
51.000000f
root@kali:~# rax2 -b 01000101 01110110
Ev
root@kali:~# rax2 -s 43 4a 50
CJP
root@kali:~#
No comments:
Post a Comment