diff --git a/core/bindata.go b/core/bindata.go index daca64f..f2318d0 100644 --- a/core/bindata.go +++ b/core/bindata.go @@ -182,6 +182,7 @@ type bintree struct { Func func() (*asset, error) Children map[string]*bintree } + var _bintree = &bintree{nil, map[string]*bintree{ "static": &bintree{nil, map[string]*bintree{ "wappalyzer_fingerprints.json": &bintree{staticWappalyzer_fingerprintsJson, map[string]*bintree{}}, @@ -234,4 +235,3 @@ func _filePath(dir, name string) string { cannonicalName := strings.Replace(name, "\\", "/", -1) return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) } - diff --git a/core/options.go b/core/options.go index 7fc8643..0f15da0 100644 --- a/core/options.go +++ b/core/options.go @@ -8,6 +8,7 @@ import ( type Options struct { Threads *int + Timeout *int OutDir *string Proxy *string ChromePath *string @@ -25,6 +26,7 @@ type Options struct { func ParseOptions() (Options, error) { options := Options{ Threads: flag.Int("threads", 0, "Number of concurrent threads (default number of logical CPUs)"), + Timeout: flag.Int("timeout", 0, "Generic timeout for everithing. (specific timeouts will be ignored if set)"), OutDir: flag.String("out", ".", "Directory to write files to"), Proxy: flag.String("proxy", "", "Proxy to use for HTTP requests"), ChromePath: flag.String("chrome-path", "", "Full path to the Chrome/Chromium executable to use. By default, aquatone will search for Chrome or Chromium"), @@ -41,5 +43,11 @@ func ParseOptions() (Options, error) { flag.Parse() + if *options.Timeout != 0 { + *options.ScanTimeout = *options.Timeout + *options.HTTPTimeout = *options.Timeout + *options.ScanTimeout = *options.Timeout + } + return options, nil } diff --git a/main.go b/main.go index 7caf9ef..f6eeba8 100644 --- a/main.go +++ b/main.go @@ -94,7 +94,11 @@ func main() { sess.Out.Important("Targets : %d\n", len(targets)) sess.Out.Important("Threads : %d\n", *sess.Options.Threads) - sess.Out.Important("Ports : %s\n", strings.Trim(strings.Replace(fmt.Sprint(sess.Ports), " ", ", ", -1), "[]")) + if *sess.Options.Nmap { + sess.Out.Important("Ports : nmap open ports\n") + } else { + sess.Out.Important("Ports : %s\n", strings.Trim(strings.Replace(fmt.Sprint(sess.Ports), " ", ", ", -1), "[]")) + } sess.Out.Important("Output dir : %s\n\n", *sess.Options.OutDir) for _, target := range targets { diff --git a/parsers/nmap.go b/parsers/nmap.go index d38d06d..118b667 100644 --- a/parsers/nmap.go +++ b/parsers/nmap.go @@ -48,6 +48,11 @@ func (p *NmapParser) isHTTPPort(port int) bool { func (p *NmapParser) hostToURLs(host nmap.Host) []string { var urls []string for _, port := range host.Ports { + + if port.State.State != "open" { + continue + } + var protocol string if port.Service.Name == "ssl" { protocol = "https"