Versions in this module Expand all Collapse all v1 v1.0.0 Jun 20, 2024 Changes in this version + const CLASS_EXTENSION + const ENDOFCHAIN + const FORM_EXTENSION + const FREESECT + const MAX_SECTORS + const MAX_SECTOR_SHIFT + const MODULE_EXTENSION + const OLE_SIGNATURE + var BINFILE_NAME = regexp.MustCompile("(?i).bin$") + var MAC_CODEPAGES = map[uint16]string + var OLE_DEBUG *bool + func Debug(arg interface{}) + func DebugPrintf(fmt_str string, args ...interface{}) + func DecompressStream(compressed_container []byte) []byte + type Directory struct + Header DirectoryHeader + Index uint32 + Name string + func NewDirectory(data []byte, index uint32) (*Directory, error) + type DirectoryHeader struct + AB [32]uint16 + CB uint16 + ClsId [16]byte + CreateTime uint64 + Flags byte + ModifyTime uint64 + Mse byte + PropType uint16 + SectStart uint32 + SidChild uint32 + SidLeftSib uint32 + SidRightSib uint32 + Size uint32 + UserFlags uint32 + type OLEFile struct + Directory []*Directory + Fat []uint32 + FatSectors []uint32 + Header OLEHeader + MiniFat []uint32 + MiniSectorSize int + SectorCount int + SectorSize int + func NewOLEFile(data []byte) (*OLEFile, error) + func (self *OLEFile) FindStreamByName(name string) *Directory + func (self *OLEFile) GetStream(index uint32) []byte + func (self *OLEFile) OpenStreamByName(name string) ([]byte, error) + func (self *OLEFile) ReadChain(start uint32) []byte + func (self *OLEFile) ReadFat(sector uint32) uint32 + func (self *OLEFile) ReadMiniChain(start uint32) []byte + func (self *OLEFile) ReadMiniFat(sector uint32) uint32 + func (self *OLEFile) ReadMiniSector(sector uint32) []byte + func (self *OLEFile) ReadSector(sector uint32) []byte + type OLEHeader struct + AbSig [8]byte + ByteOrder uint16 + Clid [16]byte + CsectDif uint32 + CsectFat uint32 + CsectMiniFat uint32 + DllVersion uint16 + MiniSectorCutoff uint32 + MiniSectorShift uint16 + MinorVersion uint16 + Reserved uint16 + Reserved1 uint32 + Reserved2 uint32 + SectDifStart uint32 + SectDirStart uint32 + SectFat [109]uint32 + SectMiniFatStart uint32 + SectorShift uint16 + Signature uint32 + type VBAModule struct + Code string + ModuleName string + StreamName string + Type string + func ExtractMacros(ofdoc *OLEFile) ([]*VBAModule, error) + func ParseBuffer(data []byte) ([]*VBAModule, error) + func ParseFile(filename string) ([]*VBAModule, error)