Documentation
¶
Index ¶
- Constants
- Variables
- func CalcSha1(items ...interface{}) string
- func CleanupPage(page *rod.Page)
- func GetKeywordType(kw string) string
- type Config
- type ConfigOpt
- func WithBlackDomain(matchStr string) ConfigOpt
- func WithBrowserProxy(url string, userinfo ...string) ConfigOpt
- func WithCaptchaUrl(captchaUrl string) ConfigOpt
- func WithCookie(domain, k, v string) ConfigOpt
- func WithEvalJs(url, js string) ConfigOpt
- func WithFrom(k, v string) ConfigOpt
- func WithHeader(s string) ConfigOpt
- func WithOnRequest(f func(req *Req)) ConfigOpt
- func WithSpiderDepth(depth int) ConfigOpt
- func WithStrictUrlDetect(status bool) ConfigOpt
- func WithTimeout(timeout int) ConfigOpt
- func WithUrlCount(count int) ConfigOpt
- func WithWhiteDomain(matchStr string) ConfigOpt
- type MakeReq
- type Manager
- func (m *Manager) CheckSensitive(element *rod.Element) bool
- func (m *Manager) CloseBrowser(browser *rod.Browser)
- func (m *Manager) ElementInputWords(element *rod.Element, words string) error
- func (m *Manager) GetBrowser() *rod.Browser
- func (m *Manager) GetCurrentUrl(page *rod.Page) (url string, err error)
- func (m *Manager) GetPage(opts proto.TargetCreateTarget, depth int) (*PageBlock, error)
- func (m *Manager) GetReadyState(page *rod.Page) (state string, err error)
- func (m *Manager) PageBack(page *rod.Page) error
- func (m *Manager) PredictX(s string) string
- func (m *Manager) PutBrowser(b *rod.Browser)
- func (m *Manager) PutPage(p *rod.Page)
- func (m *Manager) RemoveParamValue(urlStr string) string
- func (m *Manager) Run() error
- func (m *Manager) RunContext(ctx context.Context) error
- func (m *Manager) WaitLoad(page *rod.Page)
- type PageBlock
- type Req
- func (r *Req) IsHttps() bool
- func (r *Req) Request() *http.Request
- func (r *Req) RequestHeader() map[string][]string
- func (r *Req) RequestRaw() []byte
- func (r *Req) Response() (*http.Response, error)
- func (r *Req) ResponseBody() []byte
- func (r *Req) ResponseHeader() map[string][]string
- func (r *Req) Url() string
- type RequestIf
- type StringFilterwithCount
Constants ¶
View Source
const GETREADYSTATE = `
()=>{
return document.readyState;
}
`
View Source
const GETURL = `
()=>{
return document.URL;
}
`
Variables ¶
View Source
var DefaultKeyword = getDefault
View Source
var StrictKeyword = getStrict
Functions ¶
func CleanupPage ¶
func GetKeywordType ¶
from name & placehold to know input information type like username, password etc.
Types ¶
type ConfigOpt ¶
type ConfigOpt func(c *Config)
func WithBlackDomain ¶
func WithBrowserProxy ¶
func WithCaptchaUrl ¶
func WithCookie ¶
func WithEvalJs ¶
func WithHeader ¶
func WithOnRequest ¶
func WithSpiderDepth ¶
func WithStrictUrlDetect ¶
func WithTimeout ¶
func WithUrlCount ¶
func WithWhiteDomain ¶
type MakeReq ¶
type MakeReq struct {
// contains filtered or unexported fields
}
func (*MakeReq) RequestHeader ¶
func (*MakeReq) ResponseBody ¶
func (*MakeReq) ResponseHeader ¶
type Manager ¶
type Manager struct { BrowserPool rod.BrowserPool Browser *rod.Browser PagePool rod.PagePool StartUrls []string // contains filtered or unexported fields }
func NewManager ¶
func (*Manager) CloseBrowser ¶
func (*Manager) ElementInputWords ¶
input by keyboard
func (*Manager) GetBrowser ¶
func (*Manager) GetCurrentUrl ¶
get current page url by js
func (*Manager) GetReadyState ¶
get page state by js
func (*Manager) PredictX ¶
use key words directly to detect whether url is sensitive a complement of random forest used by detect sensitive url
func (*Manager) PutBrowser ¶
func (*Manager) RemoveParamValue ¶
type Req ¶
type Req struct {
// contains filtered or unexported fields
}
func (*Req) RequestHeader ¶
func (*Req) RequestRaw ¶
func (*Req) ResponseBody ¶
func (*Req) ResponseHeader ¶
type StringFilterwithCount ¶
func NewFilterwithCount ¶
func NewFilterwithCount() *StringFilterwithCount
func NewStringFilterwithCount ¶
func NewStringFilterwithCount(config *filter.Config, container *cuckoo.Filter) *StringFilterwithCount
func (*StringFilterwithCount) Count ¶
func (s *StringFilterwithCount) Count() int64
func (*StringFilterwithCount) Exist ¶
func (s *StringFilterwithCount) Exist(str string) bool
func (*StringFilterwithCount) Insert ¶
func (s *StringFilterwithCount) Insert(str string) bool
返回值是 true,插入成功,false 容器满了, 无法继续添加
Click to show internal directories.
Click to hide internal directories.