Rizin
unix-like reverse engineering framework and cli tools
__init__.py File Reference

Go to the source code of this file.

Classes

class  capstone._cs_arch
 
class  capstone._cs_detail
 
class  capstone._cs_insn
 
class  capstone._cs_opt_skipdata
 
class  capstone._cs_opt_mnem
 
class  capstone.CsError
 
class  capstone._dummy_cs
 
class  capstone.CsInsn
 
class  capstone.Cs
 

Namespaces

package  capstone
 

Functions

def capstone._load_lib (path)
 
def capstone.copy_ctypes (src)
 
def capstone.copy_ctypes_list (src)
 
def capstone._setup_prototype (lib, fname, restype, *argtypes)
 
def capstone.cs_version ()
 
def capstone.version_bind ()
 
def capstone.cs_support (query)
 
def capstone.cs_disasm_quick (arch, mode, code, offset, count=0)
 
def capstone.cs_disasm_lite (arch, mode, code, offset, count=0)
 
def capstone._ascii_name_or_default (name, default)
 
def capstone.debug ()
 

Variables

int capstone._python2 = sys.version_info[0] < 3
 
 capstone.range = xrange
 
list capstone.__all__
 
int capstone.CS_API_MAJOR = 4
 
int capstone.CS_API_MINOR = 0
 
int capstone.CS_VERSION_MAJOR = CS_API_MAJOR
 
int capstone.CS_VERSION_MINOR = CS_API_MINOR
 
int capstone.CS_VERSION_EXTRA = 2
 
string capstone.__version__ = "%u.%u.%u" %(CS_VERSION_MAJOR, CS_VERSION_MINOR, CS_VERSION_EXTRA)
 
int capstone.CS_ARCH_ARM = 0
 
int capstone.CS_ARCH_ARM64 = 1
 
int capstone.CS_ARCH_MIPS = 2
 
int capstone.CS_ARCH_X86 = 3
 
int capstone.CS_ARCH_PPC = 4
 
int capstone.CS_ARCH_SPARC = 5
 
int capstone.CS_ARCH_SYSZ = 6
 
int capstone.CS_ARCH_XCORE = 7
 
int capstone.CS_ARCH_M68K = 8
 
int capstone.CS_ARCH_TMS320C64X = 9
 
int capstone.CS_ARCH_M680X = 10
 
int capstone.CS_ARCH_EVM = 11
 
int capstone.CS_ARCH_MAX = 12
 
int capstone.CS_ARCH_ALL = 0xFFFF
 
int capstone.CS_MODE_LITTLE_ENDIAN = 0
 
int capstone.CS_MODE_ARM = 0
 
tuple capstone.CS_MODE_16 = (1 << 1)
 
tuple capstone.CS_MODE_32 = (1 << 2)
 
tuple capstone.CS_MODE_64 = (1 << 3)
 
tuple capstone.CS_MODE_THUMB = (1 << 4)
 
tuple capstone.CS_MODE_MCLASS = (1 << 5)
 
tuple capstone.CS_MODE_V8 = (1 << 6)
 
tuple capstone.CS_MODE_MICRO = (1 << 4)
 
tuple capstone.CS_MODE_MIPS3 = (1 << 5)
 
tuple capstone.CS_MODE_MIPS32R6 = (1 << 6)
 
tuple capstone.CS_MODE_MIPS2 = (1 << 7)
 
tuple capstone.CS_MODE_V9 = (1 << 4)
 
tuple capstone.CS_MODE_QPX = (1 << 4)
 
tuple capstone.CS_MODE_M68K_000 = (1 << 1)
 
tuple capstone.CS_MODE_M68K_010 = (1 << 2)
 
tuple capstone.CS_MODE_M68K_020 = (1 << 3)
 
tuple capstone.CS_MODE_M68K_030 = (1 << 4)
 
tuple capstone.CS_MODE_M68K_040 = (1 << 5)
 
tuple capstone.CS_MODE_M68K_060 = (1 << 6)
 
tuple capstone.CS_MODE_BIG_ENDIAN = (1 << 31)
 
tuple capstone.CS_MODE_MIPS32 = CS_MODE_32
 
tuple capstone.CS_MODE_MIPS64 = CS_MODE_64
 
tuple capstone.CS_MODE_M680X_6301 = (1 << 1)
 
tuple capstone.CS_MODE_M680X_6309 = (1 << 2)
 
tuple capstone.CS_MODE_M680X_6800 = (1 << 3)
 
tuple capstone.CS_MODE_M680X_6801 = (1 << 4)
 
tuple capstone.CS_MODE_M680X_6805 = (1 << 5)
 
tuple capstone.CS_MODE_M680X_6808 = (1 << 6)
 
tuple capstone.CS_MODE_M680X_6809 = (1 << 7)
 
tuple capstone.CS_MODE_M680X_6811 = (1 << 8)
 
tuple capstone.CS_MODE_M680X_CPU12 = (1 << 9)
 
tuple capstone.CS_MODE_M680X_HCS08 = (1 << 10)
 
int capstone.CS_OPT_SYNTAX = 1
 
int capstone.CS_OPT_DETAIL = 2
 
int capstone.CS_OPT_MODE = 3
 
int capstone.CS_OPT_MEM = 4
 
int capstone.CS_OPT_SKIPDATA = 5
 
int capstone.CS_OPT_SKIPDATA_SETUP = 6
 
int capstone.CS_OPT_MNEMONIC = 7
 
int capstone.CS_OPT_UNSIGNED = 8
 
int capstone.CS_OPT_OFF = 0
 
int capstone.CS_OPT_ON = 3
 
int capstone.CS_OP_INVALID = 0
 
int capstone.CS_OP_REG = 1
 
int capstone.CS_OP_IMM = 2
 
int capstone.CS_OP_MEM = 3
 
int capstone.CS_OP_FP = 4
 
int capstone.CS_GRP_INVALID = 0
 
int capstone.CS_GRP_JUMP = 1
 
int capstone.CS_GRP_CALL = 2
 
int capstone.CS_GRP_RET = 3
 
int capstone.CS_GRP_INT = 4
 
int capstone.CS_GRP_IRET = 5
 
int capstone.CS_GRP_PRIVILEGE = 6
 
int capstone.CS_AC_INVALID = 0
 
tuple capstone.CS_AC_READ = (1 << 0)
 
tuple capstone.CS_AC_WRITE = (1 << 1)
 
int capstone.CS_OPT_SYNTAX_DEFAULT = 0
 
int capstone.CS_OPT_SYNTAX_INTEL = 1
 
int capstone.CS_OPT_SYNTAX_ATT = 2
 
int capstone.CS_OPT_SYNTAX_NOREGNAME = 3
 
int capstone.CS_OPT_SYNTAX_MASM = 4
 
int capstone.CS_ERR_OK = 0
 
int capstone.CS_ERR_MEM = 1
 
int capstone.CS_ERR_ARCH = 2
 
int capstone.CS_ERR_HANDLE = 3
 
int capstone.CS_ERR_CSH = 4
 
int capstone.CS_ERR_MODE = 5
 
int capstone.CS_ERR_OPTION = 6
 
int capstone.CS_ERR_DETAIL = 7
 
int capstone.CS_ERR_MEMSETUP = 8
 
int capstone.CS_ERR_VERSION = 9
 
int capstone.CS_ERR_DIET = 10
 
int capstone.CS_ERR_SKIPDATA = 11
 
int capstone.CS_ERR_X86_ATT = 12
 
int capstone.CS_ERR_X86_INTEL = 13
 
int capstone.CS_ERR_X86_MASM = 14
 
int capstone.CS_SUPPORT_DIET = CS_ARCH_ALL + 1
 
int capstone.CS_SUPPORT_X86_REDUCE = CS_ARCH_ALL+2
 
dictionary capstone.CS_AC = {v:k for k,v in locals().items() if k.startswith('CS_AC_')}
 
dictionary capstone.CS_ARCH = {v:k for k,v in locals().items() if k.startswith('CS_ARCH_')}
 
dictionary capstone.CS_ERR = {v:k for k,v in locals().items() if k.startswith('CS_ERR_')}
 
dictionary capstone.CS_GRP = {v:k for k,v in locals().items() if k.startswith('CS_GRP_')}
 
dictionary capstone.CS_MODE = {v:k for k,v in locals().items() if k.startswith('CS_MODE_')}
 
dictionary capstone.CS_OP = {v:k for k,v in locals().items() if k.startswith('CS_OP_')}
 
dictionary capstone.CS_OPT = {v:k for k,v in locals().items() if k.startswith('CS_OPT_')}
 
 capstone.__file__ = inspect.getfile(inspect.currentframe())
 
string capstone._lib = "libcapstone.dylib"
 
bool capstone._found = False
 
 capstone._cs = None
 
list capstone._path_list
 
 capstone.CS_SKIPDATA_CALLBACK = ctypes.CFUNCTYPE(ctypes.c_size_t, ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.c_size_t, ctypes.c_void_p)