Documentation ¶
Overview ¶
credit vscan
Index ¶
- Constants
- Variables
- func AddDataToTable(table *tablewriter.Table, data []string)
- func AddStringToString(x string, seps []string, y string) []string
- func ApiDeDuplicate(RootPath string, filename string)
- func CheckFinger(finger string, title string, Url string, contentType string, location string, ...) []string
- func ConfigInit()
- func Debug(format string, args ...interface{})
- func DecodeData(s string) ([]byte, error)
- func DecodePattern(s string) ([]byte, error)
- func DirBrute(baseUrl string, dir string) []string
- func DisplayHeader(Url string, Method string)
- func Error(format string, args ...interface{})
- func Errorf(format string, args ...interface{}) error
- func Failed(format string, args ...interface{})
- func Fatal(format string, args ...interface{})
- func FilReadUrl(filename string) []string
- func FileReadLine(filename string) []string
- func FileWrite(filename string, format string, args ...interface{})
- func FindFaviconURL(urlStr string) (string, error)
- func FingerScan(url string, method string, followRedirect bool) (string, string, string, string, string, []byte, int)
- func FirstCharToUpper(Name string) string
- func GenerateWeakPassword() []string
- func GetCurrentTime() string
- func GetStructCodeMap() map[int][]byte
- func HalfCharToUpper(Name string) string
- func HighLight(data string, keywords []string, fingers []string, Url string)
- func HttpGetServerHeader(Url string, NeedTitle bool, Method string) (string, string, string, error)
- func IconDetect(Url string) (string, error)
- func ImportantApiJudge(ApiResult string, Url string)
- func Info(format string, args ...interface{})
- func InitHttp()
- func InitHttpClient(ThreadsNum int, DownProxy string, Timeout time.Duration) error
- func IsVuePath(Path string) bool
- func LastCharToUpper(Name string) string
- func LogBeautify(x string, colorAttr color.Attribute, y string, level int)
- func MapToJson(param map[string][]string) string
- func Max(nums ...int) int
- func MightBeChineseName(Name string) bool
- func MightBeIdentityCard(IdentityCard string) bool
- func MightBePhone(Phone string) bool
- func Min(nums ...int) int
- func Mmh3Hash32(raw []byte) string
- func Normalize(Path string, RootPath string) string
- func PortScan(IpRange string, PortRange string)
- func PrintFinger(Url string, Depth int)
- func PrintTable(Url string, key string, data []SensitiveData)
- func Quote(x string) string
- func RandomString(length int) string
- func RemoveDuplicateElement(originals interface{}) (interface{}, error)
- func RemoveDuplicatesString(arr []string) []string
- func ReplaceWithTable(input string) string
- func ScanWithIpAndPort(addr []ProtocolInfo)
- func SecList() string
- func SensitiveInfoCollect(Url string, Content string, filename string)
- func SetHeaders(req *http.Request)
- func ShowInfo()
- func SimHash(input []byte) uint64
- func Spider(RootPath string, Url string, depth int, filename string, myMap mapset.Set) error
- func StandBase64(braw []byte) []byte
- func StringListToInterfaceList(tmpList []string) []interface{}
- func Success(format string, args ...interface{})
- func TranslateToEnglish(Name string) (string, string, string, string)
- func UrlFilter(Url string) bool
- func UrlFormated(lines []string) []string
- func Warning(format string, args ...interface{})
- func WriteToCsv(filename string, data []string)
- type Config
- type Details
- type Directive
- type Extras
- type Fingerprint
- type IpHash
- type Match
- type Packjson
- type Pair
- type PairList
- type Probe
- type ProbesRarity
- type ProtocolInfo
- type Result
- type SensitiveData
- type Service
- type ServiceInfo
- type Target
- type VScan
- type Worker
Constants ¶
View Source
const ( LevelInfo = iota LevelSuccess LevelFailed LevelWarning LevelError LevelFatal LevelDebug )
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 ApiDeDuplicate ¶ added in v1.1.24
func CheckFinger ¶ added in v1.1.8
func ConfigInit ¶ added in v1.1.19
func ConfigInit()
func DecodeData ¶ added in v1.1.19
func DecodePattern ¶ added in v1.1.19
func DisplayHeader ¶
func FilReadUrl ¶ added in v1.1.20
func FileReadLine ¶ added in v1.1.20
func FindFaviconURL ¶
func FingerScan ¶ added in v1.1.8
func FirstCharToUpper ¶
func GenerateWeakPassword ¶
func GenerateWeakPassword() []string
func GetCurrentTime ¶ added in v1.1.26
func GetCurrentTime() string
func GetStructCodeMap ¶ added in v1.1.19
解析 nmap-service-probes 中匹配规则字符串,转换成 golang 中可以进行编译的字符串
e.g. (1) pattern: \0\xffHi decoded: []byte{0, 255, 72, 105} 4len (2) pattern: \\0\\xffHI decoded: []byte{92, 0, 92, 120, 102, 102, 72, 105} 8len (3) pattern: \x2e\x2a\x3f\x2b\x7b\x7d\x28\x29\x5e\x24\x7c\x5c decodedStr: \.\*\?\+\{\}\(\)\^\$\|\\
func HalfCharToUpper ¶
func HttpGetServerHeader ¶
func IconDetect ¶
func ImportantApiJudge ¶ added in v1.1.19
func InitHttpClient ¶
func LastCharToUpper ¶
func LogBeautify ¶ added in v1.1.8
func MightBeChineseName ¶
func MightBeIdentityCard ¶
func MightBePhone ¶
func Mmh3Hash32 ¶
func PrintFinger ¶
func PrintTable ¶ added in v1.1.11
func PrintTable(Url string, key string, data []SensitiveData)
func RandomString ¶ added in v1.1.7
func RemoveDuplicateElement ¶
func RemoveDuplicateElement(originals interface{}) (interface{}, error)
func RemoveDuplicatesString ¶ added in v1.1.20
func ReplaceWithTable ¶
func ScanWithIpAndPort ¶ added in v1.1.19
func ScanWithIpAndPort(addr []ProtocolInfo)
func SensitiveInfoCollect ¶
func SetHeaders ¶ added in v1.1.27
func StandBase64 ¶
func StringListToInterfaceList ¶
func StringListToInterfaceList(tmpList []string) []interface{}
func UrlFormated ¶ added in v1.1.19
func WriteToCsv ¶ added in v1.1.14
Types ¶
type Config ¶ added in v1.1.19
type Config struct { Rarity int Routines int SendTimeout time.Duration ReadTimeout time.Duration NULLProbeOnly bool UseAllProbes bool SSLAlwaysTry bool }
VScan 探测时的参数配置
type Details ¶ added in v1.1.19
type Details struct { ProbeName string `json:"probe_name"` ProbeData string `json:"probe_data"` MatchMatched string `json:"match_matched"` IsSoftMatched bool `json:"soft_matched"` }
详细的结果数据(包含具体的 Probe 和匹配规则信息)
type Extras ¶ added in v1.1.19
type Extras struct { VendorProduct string `json:"vendor_product,omitempty"` Version string `json:"version,omitempty"` Info string `json:"info,omitempty"` Hostname string `json:"hostname,omitempty"` OperatingSystem string `json:"operating_system,omitempty"` DeviceType string `json:"device_type,omitempty"` CPE string `json:"cpe,omitempty"` }
对应 NMap versioninfo 信息
type Fingerprint ¶
type Match ¶ added in v1.1.19
type Match struct { IsSoft bool Service string Pattern string VersionInfo string PatternCompiled *regexp2.Regexp }
nmap-service-probes 中每一条规则
func (*Match) MatchPattern ¶ added in v1.1.19
对获取到的 Banner 进行匹配
func (*Match) ParseVersionInfo ¶ added in v1.1.19
type Packjson ¶
type Packjson struct {
Fingerprint []Fingerprint
}
type Probe ¶ added in v1.1.19
type Probe struct { Name string Data string DecodedData []byte Protocol string Ports string SSLPorts string TotalWaitMS int TCPWrappedMS int Rarity int Fallback string Matchs *[]Match }
探针规则,包含该探针规则下的服务匹配条目和其他探测信息
func (*Probe) ContainsPort ¶ added in v1.1.19
func (*Probe) ContainsSSLPort ¶ added in v1.1.19
type ProbesRarity ¶ added in v1.1.19
type ProbesRarity []Probe
ProbesRarity 用于使用 sort 对 Probe 对象按 Rarity 属性值进行排序
func (ProbesRarity) Len ¶ added in v1.1.19
func (ps ProbesRarity) Len() int
func (ProbesRarity) Less ¶ added in v1.1.19
func (ps ProbesRarity) Less(i, j int) bool
func (ProbesRarity) Swap ¶ added in v1.1.19
func (ps ProbesRarity) Swap(i, j int)
type ProtocolInfo ¶ added in v1.1.19
type Result ¶ added in v1.1.19
type Result struct { Target Service `json:"service"` Timestamp int32 `json:"timestamp"` Error string `json:"error"` }
输出的结果数据
type SensitiveData ¶ added in v1.1.11
func DeduplicateByContent ¶ added in v1.1.11
func DeduplicateByContent(data []SensitiveData) []SensitiveData
type Service ¶ added in v1.1.19
type Service struct { Target Name string `json:"name"` Protocol string `json:"protocol"` Banner string `json:"banner"` BannerBytes []byte `json:"banner_bytes"` Extras `json:"extras"` Details `json:"details"` }
获取的端口服务信息
type ServiceInfo ¶ added in v1.1.19
type Target ¶ added in v1.1.19
type Target struct { IP string `json:"ip"` Port int `json:"port"` Protocol string `json:"protocol"` }
待探测的目标端口
func (*Target) GetAddress ¶ added in v1.1.19
Click to show internal directories.
Click to hide internal directories.