wappalyzer

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: MIT Imports: 6 Imported by: 116

README

wappalyzergo

A high performance port of the Wappalyzer Technology Detection Library to Go. Inspired by https://github.com/rverton/webanalyze.

Features

  • Very simple and easy to use, with clear code base.
  • Normalized regexes + auto-updating database of wappalyzer fingerprints.
  • Optimized for performance, parsing html manually for best speed.
Using go get
$ go get github.com/projectdiscovery/wappalyzergo

After this command wappalyzergo library source will be in your current go.mod.

Example

Usage Example:

package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"net/http"

	wappalyzer "github.com/projectdiscovery/wappalyzergo"
)

func main() {
	resp, err := http.DefaultClient.Get("https://www.hackerone.com")
	if err != nil {
		log.Fatal(err)
	}
	data, _ := ioutil.ReadAll(resp.Body) // Ignoring error for example

	wappalyzerClient, err := wappalyzer.New()
	fingerprints := wappalyzerClient.Fingerprint(resp.Header, data)
	fmt.Printf("%v\n", fingerprints)

	// Output: map[Acquia Cloud Platform:{} Amazon EC2:{} Apache:{} Cloudflare:{} Drupal:{} PHP:{} Percona:{} React:{} Varnish:{}]
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompiledFingerprint

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

CompiledFingerprint contains the compiled fingerprints from the tech json

type CompiledFingerprints

type CompiledFingerprints struct {
	// Apps is organized as <name, fingerprint>
	Apps map[string]*CompiledFingerprint
}

CompiledFingerprints contains a map of fingerprints for tech detection

type Fingerprint

type Fingerprint struct {
	Cookies map[string]string   `json:"cookies"`
	JS      []string            `json:"js"`
	Headers map[string]string   `json:"headers"`
	HTML    []string            `json:"html"`
	CSS     []string            `json:"css"`
	Script  []string            `json:"script"`
	Meta    map[string][]string `json:"meta"`
	Implies []string            `json:"implies"`
}

Fingerprint is a single piece of information about a tech validated and normalized

type Fingerprints

type Fingerprints struct {
	// Apps is organized as <name, fingerprint>
	Apps map[string]*Fingerprint `json:"apps"`
}

Fingerprints contains a map of fingerprints for tech detection

type Wappalyze

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

Wappalyze is a client for working with tech detection

func New

func New() (*Wappalyze, error)

New creates a new tech detection instance

func (*Wappalyze) Fingerprint

func (s *Wappalyze) Fingerprint(headers map[string][]string, body []byte) map[string]struct{}

Fingerprint identifies technologies on a target based on headers and response recieved.

Body should not be mutated while this function is being called or it may lead to unexpected things.

func (*Wappalyze) FingerprintWithTitle

func (s *Wappalyze) FingerprintWithTitle(headers map[string][]string, body []byte) (map[string]struct{}, string)

FingerprintWithTitle identifies technologies on a target based on headers and response recieved. It also returns the title of the page.

Body should not be mutated while this function is being called or it may lead to unexpected things.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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