Documentation ¶
Index ¶
- Constants
- Variables
- type CertDetails
- type ConfigT
- func (cfg *ConfigT) FindDataDirectory(imageDirectoryEntryType int) (idd ImageDirectoryT)
- func (cfg *ConfigT) FindVerInfoOffset(fileOffset int64, sectionOffset uint32, sectionVirtualAddress uint32) (verInfoOffset int64, len uint32, err error)
- func (cfg *ConfigT) GetCharacteristics() []string
- func (cfg *ConfigT) GetImageSubSystem() string
- func (cfg *ConfigT) GetPEType() string
- func (cfg *ConfigT) GetTimeDateStamp() string
- func (cfg *ConfigT) GetVersionInfo() (vi map[string]string, keys []string, err error)
- func (cfg *ConfigT) HeaderMagic() uint16
- func (cfg *ConfigT) Tell() int64
- func (cfg *ConfigT) VerifyCert(validateExpiredChain bool) (cert *x509.Certificate, details pkcs7.CertDetails, err error)
- type ImageDirectoryT
- type ResourceDirectoryD
- type ResourceDirectoryEntry
- type ResourceDirectoryEntryNamed
- type VS_FIXEDFILEINFO
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 HTTP_TIMEOUT = 15
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 ¶
This section is empty.
Types ¶
type CertDetails ¶
type ConfigT ¶
type ConfigT struct { FileName string OSFile *os.File PEFile *pe.File ExtractCert bool Verbose bool RootCertDir string }
func Initialize ¶
func Initialize(filePath string, verbose bool, rootCertDir string, extractCert bool) (ConfigT, error)
Initialize returns the config for execution
func (*ConfigT) FindDataDirectory ¶
func (cfg *ConfigT) FindDataDirectory(imageDirectoryEntryType int) (idd ImageDirectoryT)
FindDataDirectory
func (*ConfigT) FindVerInfoOffset ¶
func (*ConfigT) GetCharacteristics ¶
GetCharacteristics returns a list of PE characteristics
func (*ConfigT) GetImageSubSystem ¶
func (*ConfigT) GetTimeDateStamp ¶
GetTimeDateStamp returns the date-time stamp in the PE's header
func (*ConfigT) GetVersionInfo ¶
func (*ConfigT) HeaderMagic ¶
func (*ConfigT) VerifyCert ¶
func (cfg *ConfigT) VerifyCert(validateExpiredChain bool) (cert *x509.Certificate, details pkcs7.CertDetails, err error)
type ImageDirectoryT ¶
type ResourceDirectoryD ¶
type ResourceDirectoryEntry ¶
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 }
Click to show internal directories.
Click to hide internal directories.