dex

package
v1.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoIndex = 0xFFFFFFFF

NoIndex 偏移过长

Functions

func TypeList

func TypeList(dex *File, offset int) string

TypeList 获取参数列表

Types

type Class

type Class struct {
	// contains filtered or unexported fields
}

Class 相关

func NewClass

func NewClass(dexFile *File, offset int, idx int) Class

NewClass 实例化Class对象

type ClassData

type ClassData struct {
	// contains filtered or unexported fields
}

ClassData Class 中的数据,包含字段、方法。

func NewClassData

func NewClassData(dexFile *File, offset int) ClassData

NewClassData 初始化ClassData

type CodeItem

type CodeItem struct {
	// contains filtered or unexported fields
}

CodeItem 代码结构

func NewCodeItem

func NewCodeItem(dex *File, offset int) CodeItem

NewCodeItem New CodeItem

type Field

type Field struct {
	// contains filtered or unexported fields
}

Field Field结构

func NewField

func NewField(dex *File, fieldIdx int, access int) Field

NewField New Field

type FieldID

type FieldID struct {
	// contains filtered or unexported fields
}

FieldID FieldID结构

func NewFieldID

func NewFieldID(dex *File, fieldIdx int) FieldID

NewFieldID 新建FieldID对象

type File

type File struct {
	Strings []string // 存放字符串表的数据
	// contains filtered or unexported fields
}

File Dex文件结构

func NewFile

func NewFile(reader io.Reader) (File, error)

NewFile 从APK直接读取Dex到内容,从内存中初始化File

func (*File) ParseStrings

func (d *File) ParseStrings()

ParseStrings 解析字符串表

func (*File) Stream

func (d *File) Stream(offset int) Reader

Stream 从Dex文件中,读一段数据 (TODO 这种情况是否会增加内存?)

func (*File) String

func (d *File) String(index int) string

func (*File) Type

func (d *File) Type(index int) string

Type 获取类名/类型

type Method

type Method struct {
	// contains filtered or unexported fields
}

Method 方法结构

func NewMethod

func NewMethod(dex *File, methodIdx int, acess int, codeOff int) Method

NewMethod new method obj

type MethodID

type MethodID struct {
	// contains filtered or unexported fields
}

MethodID MethodID结构

func NewMethodID

func NewMethodID(dex *File, methodIdx int) MethodID

NewMethodID new method id

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader Dex的数据块+偏移

func (*Reader) Read

func (s *Reader) Read(size int) ([]byte, error)

读的时候,会自动修改指针位置

func (*Reader) ReadCStr

func (s *Reader) ReadCStr(off int) string

ReadCStr 读取ASCII字符串

func (*Reader) U16

func (s *Reader) U16() uint16

U16 read 2 bytes FF FF

func (*Reader) U32

func (s *Reader) U32() uint32

U32 read 4 bytes FF FF FF FF

func (*Reader) U64

func (s *Reader) U64() uint64

U64 read 8 bytes FF FF FF FF FF FF FF FF

func (*Reader) U8

func (s *Reader) U8(flag bool) int32

U8 read 1 bytes FF

func (*Reader) Uleb128

func (s *Reader) Uleb128() uint64

Uleb128 读一个uleb128格式的字符串

type SizeOff

type SizeOff struct {
	// contains filtered or unexported fields
}

SizeOff 一块数据,表示目标数据的大小和偏移

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL