peinfo

package
v0.0.0-...-89d114c Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WIN_CERT_REVISION_1_0 = 0x0100
	WIN_CERT_REVISION_2_0 = 0x0200

	WIN_CERT_TYPE_X509             = 0x0001
	WIN_CERT_TYPE_PKCS_SIGNED_DATA = 0x0002
	WIN_CERT_TYPE_RESERVED_1       = 0x0003
	WIN_CERT_TYPE_TS_STACK_SIGNED  = 0x0004
)
View Source
const (
	RT_VERSION = 16
)

Variables

View Source
var FileOS = map[uint32]string{
	0x00001: "Win16",
	0x00002: "PM-16",
	0x00003: "PM-32",
	0x00004: "Win32",
	0x10000: "DOS",
	0x20000: "OS/2 16-bit",
	0x30000: "OS/2 32-bit",
	0x40000: "Windows NT",
	0x10001: "Windows 16-bit",
	0x10004: "Windows 32-bit",
	0x20002: "OS/2 16-bit PM-16",
	0x30003: "OS/2 32-bit PM-32",
	0x40004: "Windows NT 32-bit",
}

Functions

func SystemCertPool

func SystemCertPool()

https://golang.org/src/crypto/x509/root_windows.go:244 SystemCertPool загружает сертификаты из виндового хранилища (вероятно) Не возвращает сейчас.

Types

type CertDetails

type CertDetails struct {
	Length          uint32
	Revision        uint16
	CertificateType uint16
	DER             []byte
}

type FileT

type FileT struct {
	FileName    string
	OSFile      *os.File
	PEFile      *pe.File
	ExtractCert bool
	Verbose     bool
}

func (*FileT) FindDataDirectory

func (f *FileT) FindDataDirectory(imageDirectoryEntryType int) (idd ImageDirectoryT)

func (*FileT) FindVerInfoOffset

func (f *FileT) FindVerInfoOffset(fileOffset int64, sectionOffset uint32, sectionVirtualAddress uint32) (verInfoOffset int64, len uint32, err error)

func (*FileT) GetCharacteristics

func (f *FileT) GetCharacteristics() []string

func (*FileT) GetImageSubSystem

func (f *FileT) GetImageSubSystem() string

func (*FileT) GetPEType

func (f *FileT) GetPEType() string

func (*FileT) GetTimeDateStamp

func (f *FileT) GetTimeDateStamp() string

func (*FileT) GetVersionInfo

func (f *FileT) GetVersionInfo() (vi map[string]string, keys []string, err error)

func (*FileT) HeaderMagic

func (f *FileT) HeaderMagic() uint16

func (*FileT) Tell

func (f *FileT) Tell() int64

func (*FileT) VerifyCert

func (f *FileT) VerifyCert() (cert *x509.Certificate, verified bool, err error)

type ImageDirectoryT

type ImageDirectoryT struct {
	Type           int
	VirtualAddress uint32
	Size           uint32
	ImageBase      uint64
}

type ResourceDirectoryD

type ResourceDirectoryD struct {
	Characteristics      uint32
	TimeDateStamp        uint32
	MajorVersion         uint16
	MinorVersion         uint16
	NumberOfNamedEntries uint16
	NumberOfIdEntries    uint16
}

type ResourceDirectoryEntry

type ResourceDirectoryEntry struct {
	Name         uint32
	OffsetToData uint32
}

type ResourceDirectoryEntryNamed

type ResourceDirectoryEntryNamed struct {
	Name         uint32
	OffsetToData uint32
}

type VS_FIXEDFILEINFO

type VS_FIXEDFILEINFO struct {
	DwSignature        uint32
	DwStrucVersion     uint32
	DwFileVersionMS    uint32
	DwFileVersionLS    uint32
	DwProductVersionMS uint32
	DwProductVersionLS uint32
	DwFileFlagsMask    uint32
	DwFileFlags        uint32
	DwFileOS           uint32
	DwFileType         uint32
	DwFileSubtype      uint32
	DwFileDateMS       uint32
	DwFileDateLS       uint32
}

Jump to

Keyboard shortcuts

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