Documentation
¶
Index ¶
- type Chrome
- func (chrome *Chrome) Preflight(inputUrl *url.URL) (result *PreflightResult, err error)
- func (chrome *Chrome) PrepareHeaderMap()
- func (chrome *Chrome) Screenshot(url *url.URL) (result *ScreenshotResult, err error)
- func (chrome *Chrome) StoreRequest(db *gorm.DB, preflight *PreflightResult, screenshot *ScreenshotResult, ...) (uint, error)
- type ConsoleLog
- type NetworkLog
- type PreflightResult
- type ScreenshotResult
- type Wappalyzer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chrome ¶
type Chrome struct { ResolutionX int ResolutionY int UserAgent string JsCode string Timeout int64 Delay int FullPage bool ChromePath string Proxy string Headers []string HeadersMap map[string]interface{} // http codes to screenshot (used as a filter) ScreenshotCodes []int // save screenies as PDF's instead AsPDF bool // save screenies in db ScreenshotDbStore bool JsonDumpPath string JsonDom bool ProxyUsername string ProxyPassword string // contains filtered or unexported fields }
Chrome contains information about a Google Chrome instance, with methods to run on it.
func (*Chrome) Preflight ¶
func (chrome *Chrome) Preflight(inputUrl *url.URL) (result *PreflightResult, err error)
Preflight will preflight a url
func (*Chrome) PrepareHeaderMap ¶
func (chrome *Chrome) PrepareHeaderMap()
initalize the headers Map. we do this given the format chromedp wants Ref:
https://github.com/chromedp/examples/blob/master/headers/main.go
func (*Chrome) Screenshot ¶
func (chrome *Chrome) Screenshot(url *url.URL) (result *ScreenshotResult, err error)
Screenshot takes a screenshot of a URL, optionally saving network and console events. Ref:
https://github.com/chromedp/examples/blob/255873ca0d76b00e0af8a951a689df3eb4f224c3/screenshot/main.go
func (*Chrome) StoreRequest ¶
func (chrome *Chrome) StoreRequest(db *gorm.DB, preflight *PreflightResult, screenshot *ScreenshotResult, filename string) (uint, error)
StoreRequest will store request info to the DB
type ConsoleLog ¶
type NetworkLog ¶
type PreflightResult ¶
type PreflightResult struct { URL *url.URL HTTPResponse *http.Response HTTPTitle string HTTPTechnologies []string }
PreflightResult contains the results of a preflight run
type ScreenshotResult ¶
type ScreenshotResult struct { Screenshot []byte DOM string // logging ConsoleLog []ConsoleLog NetworkLog []NetworkLog Events string ScreenshotUrl string }
ScreenshotResult contains the results of a screenshot
type Wappalyzer ¶
type Wappalyzer struct {
// contains filtered or unexported fields
}
func NewWappalyzer ¶
func NewWappalyzer() *Wappalyzer
NewWappalyzer returns a new Wappalyzer instance. If an error occured, .error would contain an error()
func (*Wappalyzer) HTMLTitle ¶
func (w *Wappalyzer) HTMLTitle(b []byte) string
HTMLTitle returns the title parsed from an HTML <title> tag.
func (*Wappalyzer) Technologies ¶
func (w *Wappalyzer) Technologies(headers http.Header, body []byte) (tech []string)
Technologies uses wappalyzergo to determine known technologies from headers or an HTTP body