Documentation ¶
Index ¶
- Constants
- Variables
- func AddElement2Set(arr *[]string, e string)
- func GenPayload(testStr string, ends []string) []string
- func GenerateXPath(node *html.Node) string
- func IsEscaped(s string) bool
- func MatchBetween(srcBody interface{}, start string, end string, max int) (int, string)
- func Node2Raw(node *html.Node) string
- func RandSafeString(n int) string
- func RandStrFromCharSet(charSet string, n int) string
- func RandomUpperAndLower(s string) string
- func WalkNode(node *html.Node, handler func(node *html.Node)) error
- func Walker(h interface{}, handler func(node *html.Node)) error
- type DiffInfo
- type MatchNodeInfo
- type MatchType
- type OutputPosType
Constants ¶
View Source
const ( StructLarger = "node1 contains node2" StructSmaller = "node2 contains node1" )
Variables ¶
View Source
var Exports = map[string]interface{}{ "Walker": Walker, "CompareHtml": CompareHtml, "GenerateXPath": GenerateXPath, "Find": FindNodeFromHtml, "RandomUpperAndLower": RandomUpperAndLower, "MatchBetween": MatchBetween, }
Functions ¶
func AddElement2Set ¶
func GenPayload ¶
func GenerateXPath ¶
func MatchBetween ¶
func RandSafeString ¶
func RandStrFromCharSet ¶
func RandomUpperAndLower ¶
RandomUpperAndLower 返回一个随机大小写的字符串 Example: ``` str.RandomUpperAndLower("target“) // TArGeT ```
Types ¶
type DiffInfo ¶
type DiffInfo struct { OriginRaw string FuzzRaw string XpathPos string Reason string Type OutputPosType Node *html.Node }
func CompareHtml ¶
type MatchNodeInfo ¶
type MatchNodeInfo struct { Xpath string TagName string MatchNode *html.Node MatchText string Key, Val, Quote string // contains filtered or unexported fields }
func FindNodeFromHtml ¶
func FindNodeFromHtml(htmlRaw interface{}, matchStr string) []*MatchNodeInfo
func (*MatchNodeInfo) IsAttr ¶
func (m *MatchNodeInfo) IsAttr() bool
func (*MatchNodeInfo) IsCOMMENT ¶
func (m *MatchNodeInfo) IsCOMMENT() bool
func (*MatchNodeInfo) IsText ¶
func (m *MatchNodeInfo) IsText() bool
type OutputPosType ¶
type OutputPosType string
const ( Tag OutputPosType = "Tag" Text OutputPosType = "Text" Attr OutputPosType = "Attr" AttrHref OutputPosType = "AttrHref" AttrOnxxx OutputPosType = "AttrOnxxx" )
Click to show internal directories.
Click to hide internal directories.