core

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: MIT Imports: 27 Imported by: 8

Documentation

Index

Constants

View Source
const (
	// VERSION current version of this project
	VERSION = "v1.2"
	// AUTHOR of this project
	AUTHOR = "@j3ssiejjj"
)

Variables

View Source
var DESC = fmt.Sprintf(`Metabigor - Intelligence Tool but without API key - %v by %v`, VERSION, AUTHOR)

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 GetResponse

func GetResponse(baseUrl string, options Options) (string, error)

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 CVEOptions

type CVEOptions struct {
	Software string
	Version  string
}

CVEOptions options for cve command

type CertOptions

type CertOptions struct {
	Clean        bool
	OnlyWildCard bool
}

CertOptions options for cert command

type NetOptions

type NetOptions struct {
	Asn        string
	Org        string
	IP         string
	Domain     string
	SearchType string
	Optimize   bool
	ExactMatch bool
}

NetOptions options for net command

type Options

type Options struct {
	Input     string
	InputFile string

	Inputs     []string
	Output     string
	TmpOutput  string
	ConfigFile string
	LogFile    string
	Proxy      string

	Concurrency int
	Delay       int
	SaveRaw     bool
	Timeout     int
	Retry       int
	JsonOutput  bool
	Verbose     bool
	Quiet       bool
	Debug       bool
	Scan        ScanOptions
	Net         NetOptions
	Search      SearchOptions
	CVE         CVEOptions
	Cert        CertOptions
	Tld         TldOptions
}

Options global options

type RelatedDomain

type RelatedDomain struct {
	Domain    string
	RawData   string
	Technique string
	Source    string
	Output    string
}

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, body 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
	Skip80And443      bool
	SkipOverview      bool
	InputFromRustScan 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

type TldOptions

type TldOptions struct {
	Source string
}

TldOptions options for tld command

Jump to

Keyboard shortcuts

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