亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

directory search
archive archive/tar archive/zip bufio bufio(緩存) builtin builtin(內(nèi)置包) bytes bytes(包字節(jié)) compress compress/bzip2(壓縮/bzip2) compress/flate(壓縮/flate) compress/gzip(壓縮/gzip) compress/lzw(壓縮/lzw) compress/zlib(壓縮/zlib) container container/heap(容器數(shù)據(jù)結(jié)構(gòu)heap) container/list(容器數(shù)據(jù)結(jié)構(gòu)list) container/ring(容器數(shù)據(jù)結(jié)構(gòu)ring) context context(上下文) crypto crypto(加密) crypto/aes(加密/aes) crypto/cipher(加密/cipher) crypto/des(加密/des) crypto/dsa(加密/dsa) crypto/ecdsa(加密/ecdsa) crypto/elliptic(加密/elliptic) crypto/hmac(加密/hmac) crypto/md5(加密/md5) crypto/rand(加密/rand) crypto/rc4(加密/rc4) crypto/rsa(加密/rsa) crypto/sha1(加密/sha1) crypto/sha256(加密/sha256) crypto/sha512(加密/sha512) crypto/subtle(加密/subtle) crypto/tls(加密/tls) crypto/x509(加密/x509) crypto/x509/pkix(加密/x509/pkix) database database/sql(數(shù)據(jù)庫/sql) database/sql/driver(數(shù)據(jù)庫/sql/driver) debug debug/dwarf(調(diào)試/dwarf) debug/elf(調(diào)試/elf) debug/gosym(調(diào)試/gosym) debug/macho(調(diào)試/macho) debug/pe(調(diào)試/pe) debug/plan9obj(調(diào)試/plan9obj) encoding encoding(編碼) encoding/ascii85(編碼/ascii85) encoding/asn1(編碼/asn1) encoding/base32(編碼/base32) encoding/base64(編碼/base64) encoding/binary(編碼/binary) encoding/csv(編碼/csv) encoding/gob(編碼/gob) encoding/hex(編碼/hex) encoding/json(編碼/json) encoding/pem(編碼/pem) encoding/xml(編碼/xml) errors errors(錯誤) expvar expvar flag flag(命令行參數(shù)解析flag包) fmt fmt go go/ast(抽象語法樹) go/build go/constant(常量) go/doc(文檔) go/format(格式) go/importer go/parser go/printer go/scanner(掃描儀) go/token(令牌) go/types(類型) hash hash(散列) hash/adler32 hash/crc32 hash/crc64 hash/fnv html html html/template(模板) image image(圖像) image/color(顏色) image/color/palette(調(diào)色板) image/draw(繪圖) image/gif image/jpeg image/png index index/suffixarray io io io/ioutil log log log/syslog(日志系統(tǒng)) math math math/big math/big math/bits math/bits math/cmplx math/cmplx math/rand math/rand mime mime mime/multipart(多部分) mime/quotedprintable net net net/http net/http net/http/cgi net/http/cookiejar net/http/fcgi net/http/httptest net/http/httptrace net/http/httputil net/http/internal net/http/pprof net/mail net/mail net/rpc net/rpc net/rpc/jsonrpc net/smtp net/smtp net/textproto net/textproto net/url net/url os os os/exec os/signal os/user path path path/filepath(文件路徑) plugin plugin(插件) reflect reflect(反射) regexp regexp(正則表達式) regexp/syntax runtime runtime(運行時) runtime/debug(調(diào)試) runtime/internal/sys runtime/pprof runtime/race(競爭) runtime/trace(執(zhí)行追蹤器) sort sort(排序算法) strconv strconv(轉(zhuǎn)換) strings strings(字符串) sync sync(同步) sync/atomic(原子操作) syscall syscall(系統(tǒng)調(diào)用) testing testing(測試) testing/iotest testing/quick text text/scanner(掃描文本) text/tabwriter text/template(定義模板) text/template/parse time time(時間戳) unicode unicode unicode/utf16 unicode/utf8 unsafe unsafe
characters

  • import "debug/pe"

  • 概述

  • 索引

概述

Package pe實現(xiàn)對 PE(Microsoft Windows Portable Executable)文件的訪問。

索引

  • 常量

  • type COFFSymbol

  • func (sym *COFFSymbol) FullName(st StringTable) (string, error)

  • type DataDirectory

  • type File

  • func NewFile(r io.ReaderAt) (*File, error)

  • func Open(name string) (*File, error)

  • func (f *File) Close() error

  • func (f *File) DWARF() (*dwarf.Data, error)

  • func (f *File) ImportedLibraries() ([]string, error)

  • func (f *File) ImportedSymbols() ([]string, error)

  • func (f *File) Section(name string) *Section

  • type FileHeader

  • type FormatError

  • func (e *FormatError) Error() string

  • type ImportDirectory

  • type OptionalHeader32

  • type OptionalHeader64

  • type Reloc

  • type Section

  • func (s *Section) Data() ([]byte, error)

  • func (s *Section) Open() io.ReadSeeker

  • type SectionHeader

  • type SectionHeader32

  • type StringTable

  • func (st StringTable) String(start uint32) (string, error)

  • type Symbol

包文件

file.go pe.go section.go string.go symbol.go

常量

const (
        IMAGE_FILE_MACHINE_UNKNOWN   = 0x0
        IMAGE_FILE_MACHINE_AM33      = 0x1d3
        IMAGE_FILE_MACHINE_AMD64     = 0x8664
        IMAGE_FILE_MACHINE_ARM       = 0x1c0
        IMAGE_FILE_MACHINE_EBC       = 0xebc
        IMAGE_FILE_MACHINE_I386      = 0x14c
        IMAGE_FILE_MACHINE_IA64      = 0x200
        IMAGE_FILE_MACHINE_M32R      = 0x9041
        IMAGE_FILE_MACHINE_MIPS16    = 0x266
        IMAGE_FILE_MACHINE_MIPSFPU   = 0x366
        IMAGE_FILE_MACHINE_MIPSFPU16 = 0x466
        IMAGE_FILE_MACHINE_POWERPC   = 0x1f0
        IMAGE_FILE_MACHINE_POWERPCFP = 0x1f1
        IMAGE_FILE_MACHINE_R4000     = 0x166
        IMAGE_FILE_MACHINE_SH3       = 0x1a2
        IMAGE_FILE_MACHINE_SH3DSP    = 0x1a3
        IMAGE_FILE_MACHINE_SH4       = 0x1a6
        IMAGE_FILE_MACHINE_SH5       = 0x1a8
        IMAGE_FILE_MACHINE_THUMB     = 0x1c2
        IMAGE_FILE_MACHINE_WCEMIPSV2 = 0x169)
const COFFSymbolSize = 18

type COFFSymbol

COFFSymbol 表示單個 COFF 符號表記錄。

type COFFSymbol struct {
        Name               [8]uint8
        Value              uint32
        SectionNumber      int16
        Type               uint16
        StorageClass       uint8
        NumberOfAuxSymbols uint8}

func (*COFFSymbol) FullName

func (sym *COFFSymbol) FullName(st StringTable) (string, error)

FullName 找到符號 sym 的真實名稱。通常名稱存儲在 sym.Name 中,但如果長度超過8個字符,它將存儲在 COFF 字符串表st中。

type DataDirectory

type DataDirectory struct {
        VirtualAddress uint32
        Size           uint32}

type File

文件表示一個開放的 PE 文件。

type File struct {
        FileHeader
        OptionalHeader interface{} // *OptionalHeader32或 *OptionalHeader64 類型
        Sections       []*Section
        Symbols        []*Symbol    // 刪除了輔助符號記錄的COFF符號
        COFFSymbols    []COFFSymbol // 所有COFF符號(包括輔助符號記錄)
        StringTable    StringTable        // 包含已過濾或未導(dǎo)出的字段}

func NewFile

func NewFile(r io.ReaderAt) (*File, error)

NewFile 創(chuàng)建一個新的文件,用于訪問底層閱讀器中的 PE 二進制文件。

func Open

func Open(name string) (*File, error)

打開使用 os.Open 打開命名文件,并準備將其用作 PE 二進制文件。

func (*File) Close

func (f *File) Close() error

關(guān)閉文件。如果文件是直接使用 NewFile 而不是 Open 來創(chuàng)建的,則 Close 不起作用。

func (*File) DWARF

func (f *File) DWARF() (*dwarf.Data, error)

func (*File) ImportedLibraries

func (f *File) ImportedLibraries() ([]string, error)

ImportedLibraries 返回二進制文件 f 引用的所有庫的名稱,這些庫在動態(tài)鏈接時期預(yù)計將與二進制文件鏈接。

func (*File) ImportedSymbols

func (f *File) ImportedSymbols() ([]string, error)

ImportedSymbols 返回二進制文件f引用的所有符號的名稱,動態(tài)加載時期望其他庫會滿足這些名稱。它不會返回弱符號。

func (*File) Section

func (f *File) Section(name string) *Section

Section 返回給定名稱的第一部分,如果不存在這樣的部分,則返回 nil。

type FileHeader

type FileHeader struct {
        Machine              uint16
        NumberOfSections     uint16
        TimeDateStamp        uint32
        PointerToSymbolTable uint32
        NumberOfSymbols      uint32
        SizeOfOptionalHeader uint16
        Characteristics      uint16}

type FormatError

FormatError 未使用。該類型被保留以便兼容。

type FormatError struct {}

func (*FormatError) Error

func (e *FormatError) Error() string

type ImportDirectory

type ImportDirectory struct {
        OriginalFirstThunk uint32
        TimeDateStamp      uint32
        ForwarderChain     uint32
        Name               uint32
        FirstThunk         uint32        // 包含已過濾或未導(dǎo)出的字段}

type OptionalHeader32

type OptionalHeader32 struct {
        Magic                       uint16
        MajorLinkerVersion          uint8
        MinorLinkerVersion          uint8
        SizeOfCode                  uint32
        SizeOfInitializedData       uint32
        SizeOfUninitializedData     uint32
        AddressOfEntryPoint         uint32
        BaseOfCode                  uint32
        BaseOfData                  uint32
        ImageBase                   uint32
        SectionAlignment            uint32
        FileAlignment               uint32
        MajorOperatingSystemVersion uint16
        MinorOperatingSystemVersion uint16
        MajorImageVersion           uint16
        MinorImageVersion           uint16
        MajorSubsystemVersion       uint16
        MinorSubsystemVersion       uint16
        Win32VersionValue           uint32
        SizeOfImage                 uint32
        SizeOfHeaders               uint32
        CheckSum                    uint32
        Subsystem                   uint16
        DllCharacteristics          uint16
        SizeOfStackReserve          uint32
        SizeOfStackCommit           uint32
        SizeOfHeapReserve           uint32
        SizeOfHeapCommit            uint32
        LoaderFlags                 uint32
        NumberOfRvaAndSizes         uint32
        DataDirectory               [16]DataDirectory}

type OptionalHeader64

type OptionalHeader64 struct {
        Magic                       uint16
        MajorLinkerVersion          uint8
        MinorLinkerVersion          uint8
        SizeOfCode                  uint32
        SizeOfInitializedData       uint32
        SizeOfUninitializedData     uint32
        AddressOfEntryPoint         uint32
        BaseOfCode                  uint32
        ImageBase                   uint64
        SectionAlignment            uint32
        FileAlignment               uint32
        MajorOperatingSystemVersion uint16
        MinorOperatingSystemVersion uint16
        MajorImageVersion           uint16
        MinorImageVersion           uint16
        MajorSubsystemVersion       uint16
        MinorSubsystemVersion       uint16
        Win32VersionValue           uint32
        SizeOfImage                 uint32
        SizeOfHeaders               uint32
        CheckSum                    uint32
        Subsystem                   uint16
        DllCharacteristics          uint16
        SizeOfStackReserve          uint64
        SizeOfStackCommit           uint64
        SizeOfHeapReserve           uint64
        SizeOfHeapCommit            uint64
        LoaderFlags                 uint32
        NumberOfRvaAndSizes         uint32
        DataDirectory               [16]DataDirectory}

type Reloc

Reloc 代表 PE COFF 重新安置。每個部分都包含自己的重定位列表。

type Reloc struct {
        VirtualAddress   uint32
        SymbolTableIndex uint32
        Type             uint16}

type Section

部分提供對 PE COFF 部分的訪問。

type Section struct {
        SectionHeader
        Relocs []Reloc        // 為ReadAt方法嵌入ReaderAt。        // 不要直接嵌入SectionReader        // 避免閱讀Read和尋求Seek。        // 如果客戶想要閱讀和尋求它必須使用        // Open()以避免爭奪搜索偏移量        // 與其他客戶。
        io.ReaderAt        // 包含已過濾或未導(dǎo)出的字段}

func (*Section) Data

func (s *Section) Data() ([]byte, error)

數(shù)據(jù)讀取并返回 PE 部分的內(nèi)容。

func (*Section) Open

func (s *Section) Open() io.ReadSeeker

Open 返回一個新的 ReadSeeker 讀取 PE 部分。

type SectionHeader

SectionHeader 類似于 SectionHeader32,其中 Name 字段被 Go 字符串替換。

type SectionHeader struct {
        Name                 string
        VirtualSize          uint32
        VirtualAddress       uint32
        Size                 uint32
        Offset               uint32
        PointerToRelocations uint32
        PointerToLineNumbers uint32
        NumberOfRelocations  uint16
        NumberOfLineNumbers  uint16
        Characteristics      uint32}

type SectionHeader32

SectionHeader32 表示真實的 PE COFF 部分標題。

type SectionHeader32 struct {
        Name                 [8]uint8
        VirtualSize          uint32
        VirtualAddress       uint32
        SizeOfRawData        uint32
        PointerToRawData     uint32
        PointerToRelocations uint32
        PointerToLineNumbers uint32
        NumberOfRelocations  uint16
        NumberOfLineNumbers  uint16
        Characteristics      uint32}

type StringTable

StringTable 是一個 COFF 字符串表。

type StringTable []byte

func (StringTable) String

func (st StringTable) String(start uint32) (string, error)

字符串從偏移量開始處的 COFF 字符串表st中提取字符串。

type Symbol

符號與 COFFSymbol 類似,名稱字段由 Go 字符串替換。Symbol 也沒有 NumberOfAuxSymbols。

type Symbol struct {
        Name          string
        Value         uint32
        SectionNumber int16
        Type          uint16
        StorageClass  uint8}
Previous article: Next article: