1RAX2(1) BSD General Commands Manual RAX2(1)
2
4 rax2 — radare base converter
5
7 rax2 [-ebBsSvxkKh] [[expr] ...]
8
10 This command is part of the radare project.
11
12 This command allows you to convert values between positive and negative
13 integer, float, octal, binary and hexadecimal values.
14
16 -b Convert from binary string to character (rax2 -b 01000101)
17
18 -k Keep the same base as the input data
19
20 -e Swap endian.
21
22 -F Read C strings from stdin and output in hexpairs. Useful to
23 load shellcodes
24
25 -l Append newline to the decoded output for human friendly-ness
26
27 -K Show randomart key asciiart for values or hexpairs
28
29 -s Convert from hex string to character (rax2 -s 43 4a 50)
30
31 -S Convert from character to hex string (rax2 -S C J P)
32
33 -n Show hexpairs from integer value
34
35 -N Show hexadecimal C string from integer value
36
37 -u Convert given value to human readable units format
38
39 -v Show program version
40
41 -x Convert a string into a hash
42
43 -h Show usage help message
44
45 -o Convert from octal string to char (rax2 -o 162 62)
46
48 Force output mode (numeric base)
49
50 =f floating point
51 =2 binary
52 =3 ternary
53 =8 octal
54 =10 decimal
55 =16 hexadecimal
56
57 Available variable types are:
58
59 int -> hex rax2 10
60 hex -> int rax2 0xa
61 -int -> hex rax2 -77
62 -hex -> int rax2 0xffffffb3
63 int -> bin rax2 b30
64 bin -> int rax2 1010d
65 float -> hex rax2 3.33f
66 hex -> float rax2 Fx40551ed8
67 oct -> hex rax2 35o
68 hex -> oct rax2 Ox12 (O is a letter)
69 bin -> hex rax2 1100011b
70 hex -> bin rax2 Bx63
71
72 With no arguments, rax2 reads values from stdin. You can pass one or more
73 values as arguments.
74
75 $ rax2 33 0x41 0101b
76 0x21
77 65
78 0x5
79
80 You can do 'unpack' hexpair encoded strings easily.
81
82 $ rax2 -s 41 42 43
83 ABC
84
85 And it supports some math operations.
86
87 $ rax2
88 0x5*101b+5
89 30
90
91 It is a very useful tool for scripting, so you can read floating point
92 values, or get the integer offset of a jump or a stack delta when analyz‐
93 ing programs.
94
96 radare2(1), rahash2(1), rafind2(1), rabin2(1), radiff2(1), ragg2(1),
97 rarun2(1), rasm2(1)
98
100 Written by pancake <pancake@nopcode.org>.
101
102 Jul 28, 2017