techdetect

package
v0.27.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package techdetect provides technology detection for websites using wappalyzergo. It identifies CMS platforms, CDNs, frameworks, and other technologies used by domains.

Index

Constants

View Source
const MaxHTMLSampleSize = 50 * 1024

MaxHTMLSampleSize is the maximum size of HTML to store for debugging (50KB)

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

type Detector struct {
	// contains filtered or unexported fields
}

Detector provides technology detection capabilities

func New

func New() (*Detector, error)

New creates a new technology detector

func (*Detector) Detect

func (d *Detector) Detect(headers http.Header, body []byte) *Result

Detect identifies technologies from HTTP headers and body

func (*Detector) DetectFromResponse

func (d *Detector) DetectFromResponse(resp *http.Response, body []byte) *Result

DetectFromResponse is a convenience method that extracts headers and body from an HTTP response

type Result

type Result struct {
	// Technologies maps technology name to its categories (e.g., {"WordPress": ["CMS"], "Cloudflare": ["CDN"]})
	Technologies map[string][]string `json:"technologies"`
	// RawHeaders contains the HTTP headers from the detection request
	RawHeaders map[string][]string `json:"raw_headers"`
	// HTMLSample contains a truncated sample of the HTML body (max 50KB)
	HTMLSample string `json:"html_sample"`
}

Result contains the detected technologies and raw data for a domain

func (*Result) HeadersJSON

func (r *Result) HeadersJSON() ([]byte, error)

HeadersJSON returns the raw headers as a JSON string for database storage

func (*Result) TechnologiesJSON

func (r *Result) TechnologiesJSON() ([]byte, error)

TechnologiesJSON returns the technologies as a JSON string for database storage

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL