1RZ_AX(1)                  BSD General Commands Manual                 RZ_AX(1)
2

NAME

4     rz-ax — rizin base converter
5

SYNOPSIS

7     rz-ax [-ebBsSvxkKh] [[expr] ...]
8

DESCRIPTION

10     This command is part of the rizin project.
11
12     This command allows you to convert values between positive and negative
13     integer, float, octal, binary and hexadecimal values.
14

OPTIONS

16     -b          Convert from binary string to character (rz-ax -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     -i          Dump stdin to C array in stdout (xxd replacement)
26
27     -I          Convert LONG to/from IP ADDRESS
28
29     -l          Append newline to the decoded output for human friendly-ness
30
31     -K          Show randomart key asciiart for values or hexpairs
32
33     -s          Convert from hex string to character (rz-ax -s 43 4a 50)
34
35     -S          Convert from character to hex string (rz-ax -S C J P)
36
37     -n          Show hexpairs from integer value
38
39     -N          Show hexadecimal C string from integer value
40
41     -u          Convert given value to human readable units format
42
43     -v          Show program version
44
45     -x          Convert a string into a hash
46
47     -h          Show usage help message
48
49     -o          Convert from octal string to char (rz-ax -o 162 62)
50

USAGE

52     Force output mode (numeric base)
53
54       =f    floating point
55       =2    binary
56       =3    ternary
57       =8    octal
58       =10   decimal
59       =16   hexadecimal
60
61     Available variable types are:
62
63       int   ->  hex    rz-ax 10
64       hex   ->  int    rz-ax 0xa
65       -int  ->  hex    rz-ax -77
66       -hex  ->  int    rz-ax 0xffffffb3
67       int   ->  bin    rz-ax b30
68       bin   ->  int    rz-ax 1010d
69       float ->  hex    rz-ax 3.33f
70       hex   ->  float  rz-ax Fx40551ed8
71       oct   ->  hex    rz-ax 35o
72       hex   ->  oct    rz-ax Ox12 (O is a letter)
73       bin   ->  hex    rz-ax 1100011b
74       hex   ->  bin    rz-ax Bx63
75
76     With no arguments, rz-ax reads values from stdin. You can pass one or
77     more values as arguments.
78
79       $ rz-ax 33 0x41 0101b
80       0x21
81       65
82       0x5
83
84     You can do 'unpack' hexpair encoded strings easily.
85
86       $ rz-ax -s 41 42 43
87       ABC
88
89     And it supports some math operations.
90
91       $ rz-ax
92       0x5*101b+5
93       30
94
95     It is a very useful tool for scripting, so you can read floating point
96     values, or get the integer offset of a jump or a stack delta when analyz‐
97     ing programs.
98

SEE ALSO

100     rizin(1), rz-hash(1), rz-find(1), rz-bin(1), rz-diff(1), rz-gg(1),
101     rz-run(1), rz-asm(1)
102

AUTHORS

104     Written by pancake <pancake@nopcode.org>.
105
106                                 Dec 28, 2020
Impressum