Documentation
¶
Index ¶
- Constants
- func Debug(arg interface{})
- func DlvBreak()
- func Dump(in interface{}) string
- func GetComponents(path string) []string
- func ParseArray_uint32(profile *OLEProfile, reader io.ReaderAt, offset int64, count int) []uint32
- func ParseString(reader io.ReaderAt, offset int64, length int64) string
- func ParseTerminatedString(reader io.ReaderAt, offset int64) string
- func ParseTerminatedUTF16String(reader io.ReaderAt, offset int64) string
- func ParseUTF16String(reader io.ReaderAt, offset int64, length int64) string
- func ParseUint8(reader io.ReaderAt, offset int64) byte
- func ParseUint16(reader io.ReaderAt, offset int64) uint16
- func ParseUint32(reader io.ReaderAt, offset int64) uint32
- func ParseUint64(reader io.ReaderAt, offset int64) uint64
- func UTF16BytesToUTF8(b []byte, o binary.ByteOrder) string
- type CFHeader
- func (self *CFHeader) CLSID() string
- func (self *CFHeader) DIFATSectorLoc() uint32
- func (self *CFHeader) DebugString() string
- func (self *CFHeader) DirectorySectorLoc() uint32
- func (self *CFHeader) InitialDIFATs() []uint32
- func (self *CFHeader) MajorVersion() uint16
- func (self *CFHeader) MiniFATSectorLoc() uint32
- func (self *CFHeader) MiniSectorCutoff() uint32
- func (self *CFHeader) MiniSectorShift() uint16
- func (self *CFHeader) MinorVersion() uint16
- func (self *CFHeader) NumDIFATSectors() uint32
- func (self *CFHeader) NumDirectorySectors() uint32
- func (self *CFHeader) NumFATSectors() uint32
- func (self *CFHeader) NumMiniFATSectors() uint32
- func (self *CFHeader) SectorSize() uint16
- func (self *CFHeader) Signature() uint64
- func (self *CFHeader) Size() int
- type DirectoryEntry
- type DirectoryHeader
- func (self *DirectoryHeader) ClsId() string
- func (self *DirectoryHeader) CreateTime() uint64
- func (self *DirectoryHeader) DebugString() string
- func (self *DirectoryHeader) Flags() byte
- func (self *DirectoryHeader) ModifyTime() uint64
- func (self *DirectoryHeader) Name() string
- func (self *DirectoryHeader) NameLength() uint16
- func (self *DirectoryHeader) SectorStart() uint32
- func (self *DirectoryHeader) SidChild() uint32
- func (self *DirectoryHeader) SidLeftSib() uint32
- func (self *DirectoryHeader) SidRightSib() uint32
- func (self *DirectoryHeader) Size() int
- func (self *DirectoryHeader) StreamSize() uint64
- func (self *DirectoryHeader) Type() *Enumeration
- func (self *DirectoryHeader) TypeInt() byte
- func (self *DirectoryHeader) UserFlags() uint32
- type DirectoryHeader_
- type Enumeration
- type OLEContext
- func (self *OLEContext) DebugString() string
- func (self *OLEContext) GetDirentry(idx uint64) (*DirectoryEntry, error)
- func (self *OLEContext) ListDirectory(path string) ([]DirectoryEntry, error)
- func (self *OLEContext) ListDirectoryComponents(components []string) ([]DirectoryEntry, error)
- func (self *OLEContext) Open(name string) (io.ReaderAt, *DirectoryEntry, error)
- func (self *OLEContext) OpenDirectoryStream(idx uint64) (io.ReaderAt, int64, error)
- func (self *OLEContext) OpenStream(sector uint32) (*StreamReader, error)
- func (self *OLEContext) ReadSector(sector uint32) ([]byte, error)
- func (self *OLEContext) Stat(name string) (*DirectoryEntry, error)
- type OLEProfile
- type ReadAdapter
- type StreamReader
Constants ¶
View Source
const ( FREESECT = 0xFFFFFFFF ENDOFCHAIN = 0xFFFFFFFE MAX_SECTORS = 1024 )
Variables ¶
This section is empty.
Functions ¶
func GetComponents ¶
func ParseArray_uint32 ¶
func ParseUTF16String ¶
Types ¶
type CFHeader ¶
type CFHeader struct {
Reader io.ReaderAt
Offset int64
Profile *OLEProfile
}
func (*CFHeader) DIFATSectorLoc ¶
func (*CFHeader) DebugString ¶
func (*CFHeader) DirectorySectorLoc ¶
func (*CFHeader) InitialDIFATs ¶
func (*CFHeader) MajorVersion ¶
func (*CFHeader) MiniFATSectorLoc ¶
func (*CFHeader) MiniSectorCutoff ¶
func (*CFHeader) MiniSectorShift ¶
func (*CFHeader) MinorVersion ¶
func (*CFHeader) NumDIFATSectors ¶
func (*CFHeader) NumDirectorySectors ¶
func (*CFHeader) NumFATSectors ¶
func (*CFHeader) NumMiniFATSectors ¶
func (*CFHeader) SectorSize ¶
type DirectoryEntry ¶
type DirectoryHeader ¶
type DirectoryHeader struct {
Reader io.ReaderAt
Offset int64
Profile *OLEProfile
}
func (*DirectoryHeader) ClsId ¶
func (self *DirectoryHeader) ClsId() string
func (*DirectoryHeader) CreateTime ¶
func (self *DirectoryHeader) CreateTime() uint64
func (*DirectoryHeader) DebugString ¶
func (self *DirectoryHeader) DebugString() string
func (*DirectoryHeader) Flags ¶
func (self *DirectoryHeader) Flags() byte
func (*DirectoryHeader) ModifyTime ¶
func (self *DirectoryHeader) ModifyTime() uint64
func (*DirectoryHeader) Name ¶
func (self *DirectoryHeader) Name() string
func (*DirectoryHeader) NameLength ¶
func (self *DirectoryHeader) NameLength() uint16
func (*DirectoryHeader) SectorStart ¶
func (self *DirectoryHeader) SectorStart() uint32
func (*DirectoryHeader) SidChild ¶
func (self *DirectoryHeader) SidChild() uint32
func (*DirectoryHeader) SidLeftSib ¶
func (self *DirectoryHeader) SidLeftSib() uint32
func (*DirectoryHeader) SidRightSib ¶
func (self *DirectoryHeader) SidRightSib() uint32
func (*DirectoryHeader) Size ¶
func (self *DirectoryHeader) Size() int
func (*DirectoryHeader) StreamSize ¶
func (self *DirectoryHeader) StreamSize() uint64
func (*DirectoryHeader) Type ¶
func (self *DirectoryHeader) Type() *Enumeration
func (*DirectoryHeader) TypeInt ¶
func (self *DirectoryHeader) TypeInt() byte
func (*DirectoryHeader) UserFlags ¶
func (self *DirectoryHeader) UserFlags() uint32
type DirectoryHeader_ ¶
type Enumeration ¶
func (Enumeration) DebugString ¶
func (self Enumeration) DebugString() string
type OLEContext ¶
type OLEContext struct {
Reader io.ReaderAt
Profile *OLEProfile
Header *CFHeader
SectorSize uint32
MiniSectorCutoff uint64
MiniSectorSize int64
FatSectors []uint32
Fat []uint32
MiniFat []uint32
Directories []DirectoryEntry
Ministream io.ReaderAt
}
func GetOLEContext ¶
func GetOLEContext(reader io.ReaderAt) (*OLEContext, error)
func (*OLEContext) DebugString ¶
func (self *OLEContext) DebugString() string
func (*OLEContext) GetDirentry ¶
func (self *OLEContext) GetDirentry(idx uint64) (*DirectoryEntry, error)
func (*OLEContext) ListDirectory ¶
func (self *OLEContext) ListDirectory(path string) ([]DirectoryEntry, error)
For now treat all directories as present at the top level.
func (*OLEContext) ListDirectoryComponents ¶
func (self *OLEContext) ListDirectoryComponents( components []string) ([]DirectoryEntry, error)
func (*OLEContext) Open ¶
func (self *OLEContext) Open(name string) (io.ReaderAt, *DirectoryEntry, error)
func (*OLEContext) OpenDirectoryStream ¶
Opens a DirectoryEntry stream based on its index. Automatically reads from the minifat if needed.
func (*OLEContext) OpenStream ¶
func (self *OLEContext) OpenStream(sector uint32) (*StreamReader, error)
Opens a stream using the fat from the first sector.
func (*OLEContext) ReadSector ¶
func (self *OLEContext) ReadSector(sector uint32) ([]byte, error)
func (*OLEContext) Stat ¶
func (self *OLEContext) Stat(name string) (*DirectoryEntry, error)
type OLEProfile ¶
type OLEProfile struct {
Off_CFHeader_Signature int64
Off_CFHeader_CLSID int64
Off_CFHeader_MinorVersion int64
Off_CFHeader_MajorVersion int64
Off_CFHeader_SectorSize int64
Off_CFHeader_MiniSectorShift int64
Off_CFHeader_NumDirectorySectors int64
Off_CFHeader_NumFATSectors int64
Off_CFHeader_DirectorySectorLoc int64
Off_CFHeader_MiniSectorCutoff int64
Off_CFHeader_MiniFATSectorLoc int64
Off_CFHeader_NumMiniFATSectors int64
Off_CFHeader_DIFATSectorLoc int64
Off_CFHeader_NumDIFATSectors int64
Off_CFHeader_InitialDIFATs int64
Off_DirectoryHeader_Name int64
Off_DirectoryHeader_NameLength int64
Off_DirectoryHeader_TypeInt int64
Off_DirectoryHeader_Type int64
Off_DirectoryHeader_Flags int64
Off_DirectoryHeader_SidLeftSib int64
Off_DirectoryHeader_SidRightSib int64
Off_DirectoryHeader_SidChild int64
Off_DirectoryHeader_ClsId int64
Off_DirectoryHeader_UserFlags int64
Off_DirectoryHeader_CreateTime int64
Off_DirectoryHeader_ModifyTime int64
Off_DirectoryHeader_SectorStart int64
Off_DirectoryHeader_StreamSize int64
}
func NewOLEProfile ¶
func NewOLEProfile() *OLEProfile
func (*OLEProfile) CFHeader ¶
func (self *OLEProfile) CFHeader(reader io.ReaderAt, offset int64) *CFHeader
func (*OLEProfile) DirectoryHeader ¶
func (self *OLEProfile) DirectoryHeader(reader io.ReaderAt, offset int64) *DirectoryHeader
type ReadAdapter ¶
func NewReadAdapter ¶
func NewReadAdapter(reader io.ReaderAt) *ReadAdapter
Click to show internal directories.
Click to hide internal directories.