core

package
v0.0.0-...-1c0811f Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2020 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VERSION current Metabigor version
	VERSION = "beta v1.6"
	// AUTHOR author of this
	AUTHOR = "@j3ssiejjj"
)

Variables

This section is empty.

Functions

func AppendToContent

func AppendToContent(filename string, data string) (string, error)

AppendToContent append string to a file

func BannerF

func BannerF(format string, data string)

BannerF print info message

func Base64Decode

func Base64Decode(raw string) string

Base64Decode just Base64 Encode

func Base64Encode

func Base64Encode(raw string) string

Base64Encode just Base64 Encode

func BeautifyHeaders

func BeautifyHeaders(res Response) string

BeautifyHeaders beautify response headers

func BeautifyResponse

func BeautifyResponse(res Response) string

BeautifyResponse beautify response

func DebugF

func DebugF(format string, args ...interface{})

DebugF print debug message

func ErrorF

func ErrorF(format string, args ...interface{})

ErrorF print good message

func ExpandLength

func ExpandLength(list []string, length int) []string

ExpandLength make slice to length

func FileExists

func FileExists(filename string) bool

FileExists check if file is exist or not

func FilterIpv4

func FilterIpv4(raw []string) []string

FilterIpv4 only get Ipv4

func FilterIpv6

func FilterIpv6(raw []string) []string

FilterIpv6 only get Ipv6

func FolderExists

func FolderExists(foldername string) bool

FolderExists check if file is exist or not

func GenHash

func GenHash(text string) string

GenHash gen SHA1 hash from string

func GenPorts

func GenPorts(raw string) []string

GenPorts gen list of ports based on input

func GetFileContent

func GetFileContent(filename string) string

GetFileContent Reading file and return content of it

func GetFileNames

func GetFileNames(dir string, ext string) []string

GetFileNames get all file name with extension

func GetTS

func GetTS() string

GetTS get current timestamp and return a string

func GoodF

func GoodF(format string, args ...interface{})

GoodF print good message

func InforF

func InforF(format string, args ...interface{})

InforF print info message

func InitLog

func InitLog(options *Options)

InitLog init log

func IsJSON

func IsJSON(str string) bool

IsJSON check if string is JSON or not

func ReadingFile

func ReadingFile(filename string) []string

ReadingFile Reading file and return content as []string

func ReadingFileUnique

func ReadingFileUnique(filename string) []string

ReadingFileUnique Reading file and return content as []string

func RequestWithChrome

func RequestWithChrome(url string, contentID string, timeout int) string

RequestWithChrome Do request with real browser

func SendGET

func SendGET(url string, options Options) string

SendGET just send GET request

func SendPOST

func SendPOST(url string, options Options) string

SendPOST just send POST request

func StartWithNum

func StartWithNum(raw string) bool

StartWithNum check if string start with number

func StripPath

func StripPath(raw string) string

StripPath just strip some invalid string path

func URLDecode

func URLDecode(raw string) string

URLDecode decode url

func URLEncode

func URLEncode(raw string) string

URLEncode Encode query

func Unique

func Unique(filename string)

Unique unique content of a file and remove blank line

func Unzip

func Unzip(src string, dest string) ([]string, error)

Unzip will decompress a zip archive, moving all files and folders within the zip file (parameter 1) to an output directory (parameter 2).

func WarningF

func WarningF(format string, args ...interface{})

WarningF print good message

func WriteToFile

func WriteToFile(filename string, data string) (string, error)

WriteToFile write string to a file

Types

type NetOptions

type NetOptions struct {
	Asn      string
	Org      string
	Optimize bool
}

NetOptions options for net command

type Options

type Options struct {
	Input      string
	Output     string
	TmpOutput  string
	ConfigFile string
	LogFile    string
	Proxy      string

	Concurrency int
	Delay       int
	SaveRaw     bool
	Timeout     int
	JsonOutput  bool
	Verbose     bool
	Debug       bool
	Scan        ScanOptions
	Net         NetOptions
	Search      SearchOptions
}

Options global options

type Request

type Request struct {
	Timeout  int
	Repeat   int
	Scheme   string
	Host     string
	Port     string
	Path     string
	URL      string
	Proxy    string
	Method   string
	Redirect bool
	Headers  []map[string]string
	Body     string
	Beautify string
}

Request all information about request

type Response

type Response struct {
	HasPopUp       bool
	StatusCode     int
	Status         string
	Headers        []map[string]string
	Body           string
	ResponseTime   float64
	Length         int
	Beautify       string
	BeautifyHeader string
}

Response all information about response

func JustSend

func JustSend(options Options, method string, url string, headers map[string]string) (res Response, err error)

JustSend just sending request

func ParseResponse

func ParseResponse(resp resty.Response) (res Response)

ParseResponse field to Response

type ScanOptions

type ScanOptions struct {
	Ports        string
	Rate         string
	NmapTemplate string
	NmapOverview bool
	ZmapOverview bool
	Detail       bool
	Flat         bool
	All          bool
	IPv4         bool
	IPv6         bool
	SkipOverview bool
	TmpOutput    string
	NmapScripts  string
	GrepString   string
	InputFile    string
}

ScanOptions options for net command

type SearchOptions

type SearchOptions struct {
	Source   string
	Query    string
	Optimize bool
	More     bool
}

SearchOptions options for net command

Jump to

Keyboard shortcuts

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