vba

package module
v0.0.0-...-ac1c51a Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: BSD-2-Clause Imports: 5 Imported by: 0

README

go-vba

This package implements the VBA decompression code in Go. It follows the Golang standards for Reader/Writer model.

Example:

import {
  "github/phaag/ole-vba"
)
  
rfd, _ = os.OpenFile(inFile)
wfd, _ = os.OpenFile(outFile, os.O_RDWR|os.O_CREATE, 0755)
vba := vba.NewWriter(wfd)
_, err = io.Copy(vba, rfd)
vba.Close()

If you prefer a function call, you may use the integrated wrapper:

func DecompressFile(inFile, outFile string) (bool, error)

The code follows basically olevba from oletools. The outFile is a simple .txt file containing the decompressed VBA code.

Documentation

Index

Constants

View Source
const VBABuffSize = 4098

max 4096 data + 2 header

Variables

This section is empty.

Functions

func DecompressFile

func DecompressFile(inFile, outFile string) (bool, error)

Types

type VBAWriter

type VBAWriter struct {
	// contains filtered or unexported fields
}

func New

func New() *VBAWriter

func NewWriter

func NewWriter(wr io.Writer) *VBAWriter

func (*VBAWriter) Close

func (vba *VBAWriter) Close() error

func (*VBAWriter) Write

func (vba *VBAWriter) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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