Documentation ¶
Index ¶
- func Dedup(original []string) []string
- func ExtractHostname(rawUrl string) (string, error)
- func FilterNewLines(s string) string
- func FilterSubdomains(hostname string) (*regexp.Regexp, error)
- func FixURL(base *url.URL, path string) string
- func GetExtension(rawUrl string) string
- func IsAbsoluteURL(rawUrl string) bool
- func IsScriptOrJSON(link string) bool
- func IsSwaggerSchema(resp *colly.Response) bool
- func StripQueryParams(u *url.URL) string
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractHostname ¶
ExtractHostname() extracts the hostname from a URL
func FilterNewLines ¶
func FilterSubdomains ¶
FIXME: 目前要求输入的 hostname 必须为二级子域名 比如,输入 www.example.com 可以匹配 123.example.com 和 123.xxx.example.com 等下级子域名 但输入 123.xxx.example.com 或 example.com 都无法匹配 www.example.com
func GetExtension ¶
Example ¶
fmt.Println(GetExtension("http://www.example.com/path/test.jsp")) fmt.Println(GetExtension("http://www.example.com/path/test.php"))
Output: .jsp .php
func IsAbsoluteURL ¶
func IsScriptOrJSON ¶
func IsSwaggerSchema ¶
func IsSwaggerSchema(resp *colly.Response) bool
func StripQueryParams ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.