Skip to content

pholcusvskatana

Apache-2.0 5 1 7,584
Feb 15 2020 v1.4.0(2026-03-03 03:58:32 ago)
17,845 7 28 MIT
Nov 07 2022 v1.8.0(2026-10-05 13:28:18 ago)

Pholcus is a minimalistic web crawler library written in the Go programming language. It is designed to be flexible and easy to use, and it supports concurrent, distributed, and modular crawling.

Note that Pholcus is documented and maintained in the Chinese language and has no english resources other than the code source itself.

Katana is a next-generation web crawling and spidering framework written in Go by ProjectDiscovery. It is designed for fast, comprehensive endpoint and asset discovery and is widely used in the security research and bug bounty communities.

Katana offers multiple crawling modes:

  • Standard mode Fast HTTP-based crawling without a browser. Parses HTML, JavaScript files, and other resources to discover endpoints and links.
  • Headless mode Uses a headless Chrome browser for crawling JavaScript-rendered pages and single-page applications (SPAs).
  • Passive mode Discovers URLs from external sources (Wayback Machine, CommonCrawl, etc.) without actively visiting the target.

Key features include:

  • Scope control Configurable crawl scope with regex patterns for including/excluding URLs, domains, and file extensions.
  • JavaScript parsing Extracts endpoints from JavaScript files, inline scripts, and AJAX requests even in standard (non-headless) mode.
  • Customizable output Filter and format output with field selection, JSON output, and custom templates.
  • Rate limiting Built-in rate limiting and concurrency control to avoid overwhelming targets.
  • Proxy support HTTP and SOCKS5 proxy support with rotation.
  • Form filling Can detect and auto-fill forms to discover endpoints behind form submissions.

While Katana was designed for security research and reconnaissance, its fast crawling capabilities and JavaScript parsing make it equally useful for web scraping discovery and sitemap generation.

Highlights


fastpopularlarge-scale

Example Use


package main

import (
    "github.com/henrylee2cn/pholcus/exec"
    _ "github.com/henrylee2cn/pholcus/spider/standard" // standard spider
)

func main() {
    // create spider object
    spider := exec.NewSpider(exec.NewTask("demo", "https://www.example.com"))
    // add a callback for URL route by regex pattern. In this case it's any route:
    spider.AddRule(".*", "Parse")
    // Start spider
    spider.Start()
}

// define callback here
func Parse(self *exec.Spider, doc *goquery.Document) {
    // callbacks receive HTMl document reference and 
}
package main

import (
    "context"
    "math"

    "github.com/projectdiscovery/katana/pkg/engine/standard"
    "github.com/projectdiscovery/katana/pkg/output"
    "github.com/projectdiscovery/katana/pkg/types"
)

func main() {
    // Configure crawl options
    options := &types.Options{
        MaxDepth:     3,
        FieldScope:   "rdn",        // restrict to root domain
        BodyReadSize: math.MaxInt,
        Timeout:      10,
        Concurrency:  10,
        Parallelism:  10,
        Delay:        0,
        RateLimit:    150,
        Strategy:     "depth-first",
        OnResult: func(result output.Result) {
            // Process each discovered URL
            println(result.Request.URL)
        },
    }

    // Create and run the crawler
    crawlerOptions, _ := types.NewCrawlerOptions(options)
    defer crawlerOptions.Close()

    crawler, _ := standard.New(crawlerOptions)
    defer crawler.Close()

    // Start crawling
    _ = crawler.Crawl("https://example.com")
}

Alternatives / Similar


Was this page helpful?