utils

package
v0.0.0-...-e0aa6c4 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2019 License: GPL-3.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Byte = 1 << (iota * 10)
	KiByte
	MiByte
	GiByte
	TiByte
	PiByte
	EiByte
)

IEC Sizes. kibis of bits

View Source
const (
	IByte = 1
	KByte = IByte * 1000
	MByte = KByte * 1000
	GByte = MByte * 1000
	TByte = GByte * 1000
	PByte = TByte * 1000
	EByte = PByte * 1000
)

SI Sizes.

View Source
const Version = "0.0.1 BETA"

Version is a constant variable containing the version number for the Slackord package

Variables

View Source
var CurrentDir, _ = os.Getwd()

CurrentDir is the current directory where Slackord was executed from

View Source
var Debug = false
View Source
var PROXY_ADDR string

define global variables for PROXY ADDR

Functions

func AddAuth

func AddAuth(auth string)

func Attack

func Attack()

func BurpImport

func BurpImport(filename string)

func Bytes

func Bytes(s uint64) string

Bytes produces a human readable representation of an SI size.

See also: ParseBytes.

Bytes(82854982) -> 83 MB

func CheckData

func CheckData() (check bool)

func DefineInsertions

func DefineInsertions()

func DownloadPayloads

func DownloadPayloads(filepath string, url string)

func EditInfo

func EditInfo(attribute string, change string)

func GetFileContentType

func GetFileContentType(out *os.File) (string, error)

Check FileType to make sure it's approved.

func GetPayloadLen

func GetPayloadLen() (length int)

func GetThreads

func GetThreads() (num string)

func IBytes

func IBytes(s uint64) string

IBytes produces a human readable representation of an IEC size.

See also: ParseBytes.

IBytes(82854982) -> 79 MiB

func LoadPayloads

func LoadPayloads(filename string)

import the Payload files here.

func MakeRequest

func MakeRequest(payload string)

func Manual

func Manual()

func ParseBytes

func ParseBytes(s string) (uint64, error)

ParseBytes parses a string representation of bytes into the number of bytes it represents.

See Also: Bytes, IBytes.

ParseBytes("42 MB") -> 42000000, nil ParseBytes("42 mib") -> 44040192, nil

func Pause

func Pause()

func PrintBanner

func PrintBanner()

func PrintInfo

func PrintInfo(attribute string)

func PrintPayloadLen

func PrintPayloadLen() (length string)

func Resume

func Resume()

func SetProxy

func SetProxy(addr string)

func SetThreads

func SetThreads(change int)

func SingleRequest

func SingleRequest()

func Unload

func Unload()

func UnsetProxy

func UnsetProxy()

func Unzip

func Unzip(file string)

Function to unzip the contents of the recently downloaded files.

Types

type Items

type Items struct {
	XMLName     xml.Name `xml:"items"`
	Text        string   `xml:",chardata"`
	BurpVersion string   `xml:"burpVersion,attr"`
	ExportTime  string   `xml:"exportTime,attr"`
	UserAgent   string   `xml:"useragent,attr"`

	Item struct {
		Text string `xml:",chardata"`
		Time string `xml:"time"`
		URL  string `xml:"url"`

		Host struct {
			Text string `xml:",chardata"`
			Ip   string `xml:"ip,attr"`
		} `xml:"host"`
		Port      string `xml:"port"`
		Protocol  string `xml:"protocol"`
		Method    string `xml:"method"`
		Path      string `xml:"path"`
		Extension string `xml:"extension"`

		Request struct {
			Text   string `xml:",chardata"`
			Base64 string `xml:"base64,attr"`
		} `xml:"request"`
		Status         string `xml:"status"`
		Responselength string `xml:"responselength"`
		Mimetype       string `xml:"mimetype"`

		Response struct {
			Text   string `xml:",chardata"`
			Base64 string `xml:"base64,attr"`
		} `xml:"response"`
		Comment string `xml:"comment"`
	} `xml:"item"`
}

Structure created using the online XML parser https://www.onlinetool.io/xmltogo/

type WriteCounter

type WriteCounter struct {
	Total uint64
}

WriteCounter counts the number of bytes written to it. It implements to the io.Writer interface and we can pass this into io.TeeReader() which will report progress on each write cycle.

func (WriteCounter) PrintProgress

func (wc WriteCounter) PrintProgress()

func (*WriteCounter) Write

func (wc *WriteCounter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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