mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-11-23 05:29:53 +00:00
cstool: update README with more details
This commit is contained in:
parent
14978f878f
commit
fcd1b44a3f
5
HACK.TXT
5
HACK.TXT
@ -17,6 +17,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)
|
||||
@ -35,6 +36,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.
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user