cstool: update README with more details

This commit is contained in:
Nguyen Anh Quynh 2016-10-11 00:20:58 +08:00
parent 1d05c71144
commit 94bb351fe7
2 changed files with 29 additions and 5 deletions

View File

@ -16,6 +16,7 @@ Capstone source is organized as followings.
│   ├── ocaml <- Ocaml bindings + test code
│   └── python <- Python bindings + test code
├── contrib <- Code contributed by community to help Capstone integration
├── cstool <- Cstool
├── docs <- Documentation
├── include <- API headers in C language (*.h)
├── msvc <- Microsoft Visual Studio support (for Windows compile)
@ -34,6 +35,10 @@ the code and try to recompile/reinstall again. This can be done with:
$ ./make.sh
$ sudo ./make.sh install
Then test Capstone with cstool, for example:
$ cstool x32 "90 91"
At the same time, for Java/Ocaml/Python bindings, be sure to always use
the bindings coming with the core to avoid potential incompatibility issue
with older versions.

View File

@ -1,7 +1,26 @@
This directory contains cstool of capstone engine.
To compile, simply run "make" on commandline. And after that, you could use
./cstool <arch+mode> <assembler-string> [start-address-in-hex-format]
to use directly capstone engine.
This directory contains cstool of Capstone Engine.
To see <arch+mode> options are supported, you could input ./cstool
Cstool is a command-line tool to disassemble assembly hex-string.
For example, to decode a hexcode string for Intel 32bit, run:
$ cstool x32 "90 91"
0 90 nop
1 91 xchg eax, ecx
Cstool disassembles the input and prints out the assembly instructions.
On each line, the first column is the instruction offset, the second
column is opcodes, and the rest is the instruction itself.
Cstool is flexible enough to accept all kind of hexcode format. The following
inputs have the same output with the example above.
$ cstool x32 "0x90 0x91"
$ cstool x32 "\x90\x91"
$ cstool x32 "90,91"
$ cstool x32 "90;91"
$ cstool x32 "90+91"
$ cstool x32 "90:91"
To see all the supported options, run ./cstool