🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

github.com/x-way/crawlerdetect

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/x-way/crawlerdetect

v0.2.28
Source
Go
Version published
Created
Source

crawlerdetect

CircleCI Go Report Card PkgGoDev

About

crawlerdetect is a Go version of PHP class @CrawlerDetect.

It helps to detect bots/crawlers/spiders via the user agent and other HTTP-headers. Currently able to detect 1,000's of bots/spiders/crawlers.

Installation

go get github.com/x-way/crawlerdetect

Basic Usage

import "fmt"
import "github.com/x-way/crawlerdetect"

func main() {
    uastring := "curl/7.54.0"
    if crawlerdetect.IsCrawler(uastring) {
        fmt.Println("Found a crawler")
    }
}

Contributing

The patterns and testcases are synced from the PHP repo. If you find a bot/spider/crawler user agent that crawlerdetect fails to detect, please submit a pull request with the regex pattern and a testcase to the upstream PHP repo.

FAQs

Package last updated on 07 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts