Documentation ¶
Index ¶
- Constants
- Variables
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func GetPageStructure(body io.Reader) ([]string, error)
- func GetSimilarity(a, b []string) float64
- func HostAndPortToURL(host string, port int, protocol string) string
- func MustAsset(name string) []byte
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type Header
- type Logger
- func (l *Logger) Debug(format string, args ...interface{})
- func (l *Logger) Error(format string, args ...interface{})
- func (l *Logger) Fatal(format string, args ...interface{})
- func (l *Logger) Important(format string, args ...interface{})
- func (l *Logger) Info(format string, args ...interface{})
- func (l *Logger) Log(level int, format string, args ...interface{})
- func (l *Logger) SetDebug(d bool)
- func (l *Logger) SetSilent(s bool)
- func (l *Logger) Warn(format string, args ...interface{})
- type Note
- type Options
- type Page
- type Report
- type ReportData
- type ResponsiveURL
- type Session
- func (s *Session) AddNoteToResponsiveURL(url string, text string, noteType string)
- func (s *Session) AddResponsiveURL(url string)
- func (s *Session) AddTagToResponsiveURL(url string, t string, tagType string, link string)
- func (s *Session) Asset(name string) ([]byte, error)
- func (s *Session) BaseFilenameFromURL(stru string) string
- func (s *Session) End()
- func (s *Session) GetFilePath(p string) string
- func (s *Session) ReadFile(p string) ([]byte, error)
- func (s *Session) Start()
- type Stats
- func (s *Stats) Duration() time.Duration
- func (s *Stats) IncrementPortClosed()
- func (s *Stats) IncrementPortOpen()
- func (s *Stats) IncrementRequestFailed()
- func (s *Stats) IncrementRequestSuccessful()
- func (s *Stats) IncrementResponseCode2xx()
- func (s *Stats) IncrementResponseCode3xx()
- func (s *Stats) IncrementResponseCode4xx()
- func (s *Stats) IncrementResponseCode5xx()
- func (s *Stats) IncrementScreenshotFailed()
- func (s *Stats) IncrementScreenshotSuccessful()
- type Tag
Constants ¶
const ( Name = "aquatone" Version = "1.4.1" Author = "Michael Henriksen" Website = "https://github.com/michenriksen/aquatone" )
const ( Host = "host" URL = "url" URLResponsive = "url:responsive" TCPPort = "port:tcp" )
const ( FATAL = 5 ERROR = 4 WARN = 3 IMPORTANT = 2 INFO = 1 DEBUG = 0 )
const (
Template = `` /* 12226-byte string literal not displayed */
)
Variables ¶
var ( SmallPortList = []int{80, 443} MediumPortList = []int{80, 443, 8000, 8080, 8443} LargePortList = []int{80, 81, 443, 591, 2082, 2087, 2095, 2096, 3000, 8000, 8001, 8008, 8080, 8083, 8443, 8834, 8888} XLargePortList = []int{80, 81, 300, 443, 591, 593, 832, 981, 1010, 1311, 2082, 2087, 2095, 2096, 2480, 3000, 3128, 3333, 4243, 4567, 4711, 4712, 4993, 5000, 5104, 5108, 5800, 6543, 7000, 7396, 7474, 8000, 8001, 8008, 8014, 8042, 8069, 8080, 8081, 8088, 8090, 8091, 8118, 8123, 8172, 8222, 8243, 8280, 8281, 8333, 8443, 8500, 8834, 8880, 8888, 8983, 9000, 9043, 9060, 9080, 9090, 9091, 9200, 9443, 9800, 9981, 12443, 16080, 18091, 18092, 20720, 28017} )
Functions ¶
func Asset ¶ added in v1.4.0
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶ added in v1.4.0
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶ added in v1.4.0
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetNames ¶ added in v1.4.0
func AssetNames() []string
AssetNames returns the names of the assets.
func GetSimilarity ¶
func MustAsset ¶ added in v1.4.0
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RestoreAsset ¶ added in v1.4.0
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶ added in v1.4.0
RestoreAssets restores an asset under the given directory recursively
Types ¶
type Header ¶
func (Header) IsInsecure ¶
type Options ¶
type Options struct { Threads *int OutDir *string Proxy *string ChromePath *string Resolution *string Ports *string ScanTimeout *int HTTPTimeout *int ScreenshotTimeout *int Nmap *bool SaveBody *bool Silent *bool Debug *bool }
func ParseOptions ¶
type Page ¶
type Page struct { URL string Status string Headers []Header HeadersPath string BodyPath string ScreenshotPath string HasScreenshot bool Tags []Tag Notes []Note }
func NewCluster ¶
func NewCluster(urls []*ResponsiveURL, session *Session) ([]Page, error)
type Report ¶
type Report struct {
Data ReportData
}
func NewReport ¶
func NewReport(data ReportData) *Report
type ReportData ¶
type ResponsiveURL ¶ added in v1.4.0
func (*ResponsiveURL) AddNote ¶ added in v1.4.0
func (u *ResponsiveURL) AddNote(n Note)
func (*ResponsiveURL) AddTag ¶ added in v1.4.0
func (u *ResponsiveURL) AddTag(t Tag)
type Session ¶
type Session struct { sync.Mutex Version string Options Options `json:"-"` Out *Logger `json:"-"` Stats *Stats ResponsiveURLs map[string]*ResponsiveURL Ports []int EventBus EventBus.Bus `json:"-"` WaitGroup sizedwaitgroup.SizedWaitGroup `json:"-"` }
func NewSession ¶
func (*Session) AddNoteToResponsiveURL ¶ added in v1.4.0
func (*Session) AddResponsiveURL ¶
func (*Session) AddTagToResponsiveURL ¶ added in v1.4.0
func (*Session) BaseFilenameFromURL ¶
func (*Session) GetFilePath ¶
type Stats ¶
type Stats struct { StartedAt time.Time FinishedAt time.Time PortOpen uint32 PortClosed uint32 RequestSuccessful uint32 RequestFailed uint32 ResponseCode2xx uint32 ResponseCode3xx uint32 ResponseCode4xx uint32 ResponseCode5xx uint32 ScreenshotSuccessful uint32 ScreenshotFailed uint32 }
func (*Stats) IncrementPortClosed ¶
func (s *Stats) IncrementPortClosed()
func (*Stats) IncrementPortOpen ¶
func (s *Stats) IncrementPortOpen()
func (*Stats) IncrementRequestFailed ¶
func (s *Stats) IncrementRequestFailed()
func (*Stats) IncrementRequestSuccessful ¶
func (s *Stats) IncrementRequestSuccessful()
func (*Stats) IncrementResponseCode2xx ¶
func (s *Stats) IncrementResponseCode2xx()
func (*Stats) IncrementResponseCode3xx ¶
func (s *Stats) IncrementResponseCode3xx()
func (*Stats) IncrementResponseCode4xx ¶
func (s *Stats) IncrementResponseCode4xx()
func (*Stats) IncrementResponseCode5xx ¶
func (s *Stats) IncrementResponseCode5xx()
func (*Stats) IncrementScreenshotFailed ¶
func (s *Stats) IncrementScreenshotFailed()
func (*Stats) IncrementScreenshotSuccessful ¶
func (s *Stats) IncrementScreenshotSuccessful()