fingerprint

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Reg_idMethod       int = 11515 // 识别方式:正则表达式 == regular
	Text_idMethod      int = 11516 // 识别方式:文本 == keyword
	Bin_idMethod       int = 11517 // 识别方式:hex,二进制
	Base64_idMethod    int = 11518 // 识别方式:hash-base64 // Base64_idMethod    int = 11518 // 识别方式:base64
	Md5_idMethod       int = 11519 // 识别方式:md5
	Header_idPart      int = 11520 // 识别区域:header
	Body_idPart        int = 11521 // 识别区域:body
	Raw_idPart         int = 11522 // 识别区域:all = header + body
	Status_code_idPart int = 8998  // 识别区域:status_code
)

Variables

View Source
var FGDataMap []map[string]interface{}

指纹 {id:指纹数据对象}

View Source
var FgData string
View Source
var FgDictFile string
View Source
var FgType map[int]string = map[int]string{
	Reg_idMethod:       "regular",
	Text_idMethod:      "keyword",
	Bin_idMethod:       "hex",
	Base64_idMethod:    "base64",
	Md5_idMethod:       "md5",
	Header_idPart:      "header",
	Body_idPart:        "body",
	Raw_idPart:         "all",
	Status_code_idPart: "status_code",
}
View Source
var FgUrls = []string{}

在httpx请求的时候,需要拼接所有的url

View Source
var MFid *sync.Map = new(sync.Map)

一个url到底和多少组件id关联

View Source
var Max_Count = 10

相同url、cms命中两次就不再匹配

View Source
var Mfavhash *sync.Map = new(sync.Map)

图标每个目标只识别一次

Functions

func CaseMethod

func CaseMethod(szUrl, method, bodyString, favhash, md5Body, hexBody string, finp *Fingerprint) []string

func CheckHoneyport

func CheckHoneyport(a []string) (bool, []string)

func ClearData

func ClearData()

清除数据

func DelTmpFgFile

func DelTmpFgFile()

func Favicohash4key

func Favicohash4key(host, key string) (hash string, md5R string)

求url host hash和md5

key: cache key

func FavicohashMd5

func FavicohashMd5(StatusCode int, header http.Header, body []byte, err error) string

func FingerScan

func FingerScan(headers map[string][]string, body []byte, title string, szUrl string, status_code string) ([]string, []string)

相同的url、组件(产品),>=2 个指纹命中,那么该组件的其他指纹匹配将跳过

func Get4K

func Get4K(m *map[string]interface{}, k string) string

func GetHahsMd5

func GetHahsMd5(body []byte) (hash string, md5R string)

计算hash,md5

func LoadWebfingerprintEhole

func LoadWebfingerprintEhole() error

func LoadWebfingerprintLocal

func LoadWebfingerprintLocal() error

func MergeReqUrl

func MergeReqUrl()

1、合并相同的请求路径 2、合并数据到

func New

func New() error

func PreprocessingFingerScan

func PreprocessingFingerScan(url string) []string

合并所有指纹需要请求的链接,也就是合并所有请求,相同的只请求一次 会多次调用,所以需要cache中间结果

func SvUrl2Id

func SvUrl2Id(szUrl string, finp *Fingerprint, rMz string)

Types

type Fingerprint

type Fingerprint struct {
	Cms           string
	Method        string
	Location      string
	Keyword       []string
	KeywordMathOr bool   // Keyword是否为or关系
	Id            int    // 扩展id属性,通过id关联到组件
	UrlPath       string // 扩展,有的指纹必须是和特定path关联,例如状态码
}

type Packjson

type Packjson struct {
	Fingerprint []*Fingerprint
}
var EholeFinpx *Packjson
var LocalFinpx *Packjson
var (
	Webfingerprint *Packjson
)

func GetWebfingerprintEhole

func GetWebfingerprintEhole() *Packjson

func GetWebfingerprintLocal

func GetWebfingerprintLocal() *Packjson

Jump to

Keyboard shortcuts

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