utils

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableDNSLogs

func EnableDNSLogs() error

EnableDNSLogs through wevutil command line

func FlushDNSCache

func FlushDNSCache() error

FlushDNSCache executes windows command to flush the DNS cache

func HTTPGet

func HTTPGet(client *http.Client, url, outPath string) (err error)

HTTPGet helper function to issue a simple HTTP GET method

func Unzip

func Unzip(zipfile, dest string) (err error)

Unzip helper function to unzip a file to a destination folder source code from : https://stackoverflow.com/questions/20357223/easy-way-to-unzip-file-with-golang

Types

type WindowsLogger

type WindowsLogger struct {
	Channel string
	Source  string
	// contains filtered or unexported fields
}

WindowsLogger structure definition

func NewWindowsLogger

func NewWindowsLogger(channel, source string) (wl *WindowsLogger, err error)

NewWindowsLogger creates a new WindowsLogger structure

func (*WindowsLogger) Close

func (w *WindowsLogger) Close() error

Close closes the logger in a clean fashion

func (*WindowsLogger) Log

func (w *WindowsLogger) Log(eventid int, entrytype, message string)

Log logs a message through powershell Write-EventLog

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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