utils

package
v1.1.18 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelDebug = iota
	LevelInfo
	LevelSuccess
	LevelFailed
	LevelWarning
	LevelError
	LevelFatal
)
View Source
const (
	INT_MAX = int(^uint(0) >> 1)
	INT_MIN = ^INT_MAX
)

Variables

View Source
var (
	Client           *http.Client
	ClientNoRedirect *http.Client
)

Functions

func AddDataToTable added in v1.1.14

func AddDataToTable(table *tablewriter.Table, data []string)

func AddStringToString

func AddStringToString(x string, seps []string, y string) []string

func CheckFinger added in v1.1.8

func CheckFinger(finger string, title string, url string, contentType string, respBody []byte, statusCode int) []string

func Debug

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

func DirBrute

func DirBrute(baseUrl string, dir string) []string

func DisplayHeader

func DisplayHeader(Url string, Method string)

func Error

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

func Errorf

func Errorf(format string, args ...interface{}) error

func Failed

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

func Fatal

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

func FilRead added in v1.1.8

func FilRead(filename string) []string

func FileWrite added in v1.1.9

func FileWrite(filename string, format string, args ...interface{})

func FindFaviconURL

func FindFaviconURL(urlStr string) (string, error)

func FingerScan added in v1.1.8

func FingerScan(url string, method string) (string, string, string, string, []byte, int)

func FirstCharToUpper

func FirstCharToUpper(Name string) string

func GenerateWeakPassword

func GenerateWeakPassword() []string

func HalfCharToUpper

func HalfCharToUpper(Name string) string

func HighLight

func HighLight(data string, keywords []string, fingers []string, Url string)

func HttpGetServerHeader

func HttpGetServerHeader(Url string, NeedTitle bool, Method string) (string, string, string, error)

func IconDetect

func IconDetect(Url string) (string, error)

func Info

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

func InitHttp

func InitHttp()

func InitHttpClient

func InitHttpClient(ThreadsNum int, DownProxy string, Timeout time.Duration) error

func IsVuePath

func IsVuePath(Path string) bool

func LastCharToUpper

func LastCharToUpper(Name string) string

func LogBeautify added in v1.1.8

func LogBeautify(x string, colorAttr color.Attribute, y string, level int)

func MapToJson

func MapToJson(param map[string][]string) string

func Max

func Max(nums ...int) int

func MightBeChineseName

func MightBeChineseName(Name string) bool

func MightBeIdentityCard

func MightBeIdentityCard(IdentityCard string) bool

func MightBePhone

func MightBePhone(Phone string) bool

func Min

func Min(nums ...int) int

func Mmh3Hash32

func Mmh3Hash32(raw []byte) string

func Normalize

func Normalize(Path string, RootPath string) string

func PrintFinger

func PrintFinger(Url string, Depth int)

func PrintTable added in v1.1.11

func PrintTable(Url string, key string, data []SensitiveData)

func Quote

func Quote(x string) string

func RandomString added in v1.1.7

func RandomString(length int) string

func RemoveDuplicateElement

func RemoveDuplicateElement(originals interface{}) (interface{}, error)

func ReplaceWithTable

func ReplaceWithTable(input string) string

func SecList added in v1.1.11

func SecList() string

func SensitiveInfoCollect

func SensitiveInfoCollect(Url string, Content string)

func ShowInfo

func ShowInfo()

func SimHash added in v1.1.8

func SimHash(input []byte) uint64

func Spider

func Spider(RootPath string, Url string, depth int, myMap mapset.Set) error

func StandBase64

func StandBase64(braw []byte) []byte

func StringListToInterfaceList

func StringListToInterfaceList(tmpList []string) []interface{}

func Success

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

func TranslateToEnglish

func TranslateToEnglish(Name string) (string, string, string, string)

func UrlFilter added in v1.1.16

func UrlFilter(Url string) bool

func Warning

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

func WriteToCsv added in v1.1.14

func WriteToCsv(filename string, data []string)

Types

type Fingerprint

type Fingerprint struct {
	Cms      string
	Method   string
	Location string
	Keyword  []string
}

type Packjson

type Packjson struct {
	Fingerprint []Fingerprint
}

type Pair

type Pair struct {
	Key   string
	Value int
}

type PairList

type PairList []Pair

func (PairList) Len

func (p PairList) Len() int

func (PairList) Less

func (p PairList) Less(i, j int) bool

func (PairList) Swap

func (p PairList) Swap(i, j int)

type SensitiveData added in v1.1.11

type SensitiveData struct {
	Content string
	Entropy float64
}

func DeduplicateByContent added in v1.1.11

func DeduplicateByContent(data []SensitiveData) []SensitiveData

Jump to

Keyboard shortcuts

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