All Projects → ns3777k → Go Shodan

ns3777k / Go Shodan

Licence: mit
Shodan API client

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Go Shodan

jshodan
Powerful Shodan API client using RxJava and Retrofit
Stars: ✭ 56 (-64.56%)
Mutual labels:  shodan, exploits, security-scanner
Awesome Shodan Queries
🔍 A collection of interesting, funny, and depressing search queries to plug into shodan.io 👩‍💻
Stars: ✭ 2,758 (+1645.57%)
Mutual labels:  security-scanner, shodan
pentesting-multitool
Different utility scripts for pentesting and hacking.
Stars: ✭ 39 (-75.32%)
Mutual labels:  shodan, security-scanner
ShonyDanza
A customizable, easy-to-navigate tool for researching, pen testing, and defending with the power of Shodan.
Stars: ✭ 86 (-45.57%)
Mutual labels:  shodan, exploits
Grinder
🔎 Python framework to automatically discover and enumerate hosts from different back-end systems (Shodan, Censys)
Stars: ✭ 209 (+32.28%)
Mutual labels:  security-scanner, shodan
Shodansploit
🔎 shodansploit > v1.3.0
Stars: ✭ 342 (+116.46%)
Mutual labels:  security-scanner, shodan
Pbscan
Faster and more efficient stateless SYN scanner and banner grabber due to userland TCP/IP stack usage.
Stars: ✭ 122 (-22.78%)
Mutual labels:  security-scanner
Awesome Csirt
Awesome CSIRT is an curated list of links and resources in security and CSIRT daily activities.
Stars: ✭ 132 (-16.46%)
Mutual labels:  exploits
Shodan Dorks
Dorks for shodan.io. Some basic shodan dorks collected from publicly available data.
Stars: ✭ 118 (-25.32%)
Mutual labels:  shodan
Minions
Distributed filesystem scanner
Stars: ✭ 115 (-27.22%)
Mutual labels:  security-scanner
0days In The Wild
Repository for information about 0-days exploited in-the-wild.
Stars: ✭ 149 (-5.7%)
Mutual labels:  exploits
Pigat
pigat ( Passive Intelligence Gathering Aggregation Tool ) 被动信息收集聚合工具
Stars: ✭ 140 (-11.39%)
Mutual labels:  shodan
Gsil
GitHub Sensitive Information Leakage(GitHub敏感信息泄露监控)
Stars: ✭ 1,764 (+1016.46%)
Mutual labels:  security-scanner
Xray
XRay is a tool for recon, mapping and OSINT gathering from public networks.
Stars: ✭ 1,666 (+954.43%)
Mutual labels:  shodan
Nodejsscan
nodejsscan is a static security code scanner for Node.js applications.
Stars: ✭ 1,874 (+1086.08%)
Mutual labels:  security-scanner
Nosqli
NoSql Injection CLI tool, for finding vulnerable websites using MongoDB.
Stars: ✭ 120 (-24.05%)
Mutual labels:  security-scanner
Semgrep Rules
Semgrep rules registry
Stars: ✭ 140 (-11.39%)
Mutual labels:  security-scanner
Security Checker
A PHP dependency vulnerabilities scanner based on the Security Advisories Database.
Stars: ✭ 115 (-27.22%)
Mutual labels:  security-scanner
Penta
Open source all-in-one CLI tool to semi-automate pentesting.
Stars: ✭ 130 (-17.72%)
Mutual labels:  shodan
Springbootvulexploit
SpringBoot 相关漏洞学习资料,利用方法和技巧合集,黑盒安全评估 check list
Stars: ✭ 3,196 (+1922.78%)
Mutual labels:  exploits

go-shodan

Build Status Build status codecov GoDoc MIT License Go Report Card

To start working with Shodan you have to get your token first. You can do this at https://www.shodan.io.

Usage

The import path depends on whether you use go modules:

import "github.com/ns3777k/go-shodan/v4/shodan"	// with go modules enabled (GO111MODULE=on or outside GOPATH)
import "github.com/ns3777k/go-shodan/shodan" // with go modules disabled

Simple example of resolving hostnames:

package main

import (
	"log"
	"context"

	"github.com/ns3777k/go-shodan/v4/shodan" // go modules required
)

func main() {
	client := shodan.NewEnvClient(nil)
	dns, err := client.GetDNSResolve(context.Background(), []string{"google.com", "ya.ru"})

	if err != nil {
		log.Panic(err)
	} else {
		log.Println(dns["google.com"])
	}
}

Output for above:

2015/09/05 18:50:52 173.194.115.35

Streaming example:

package main

import (
	"log"
	"context"

	"github.com/ns3777k/go-shodan/v4/shodan" // go modules required
)

func main() {
	client := shodan.NewEnvClient(nil)
	ch := make(chan *shodan.HostData)
	err := client.GetBannersByASN(context.Background(), []string{"3303", "32475"}, ch)
	if err != nil {
		panic(err)
	}

	for {
		banner, ok := <-ch

		if !ok {
			log.Println("channel was closed")
			break
		}

		log.Println(banner.Product)
	}
}

Tips and tricks

Every method accepts context in the first argument so you can easily cancel any request.

You can also use SetDebug(true) to see the actual request data (method, url, body).

Implemented REST API

Search Methods

  • [x] /shodan/host/{ip}
  • [x] /shodan/host/count
  • [x] /shodan/host/search
  • [x] /shodan/host/search/facets
  • [x] /shodan/host/search/filters
  • [x] /shodan/host/search/tokens
  • [x] /shodan/ports

On-Demand Scanning

  • [x] /shodan/protocols
  • [x] /shodan/scan
  • [x] /shodan/scan/internet
  • [x] /shodan/scan/{id}

Network Alerts

  • [x] /shodan/alert
  • [x] /shodan/alert/{id}/info
  • [x] /shodan/alert/{id}
  • [x] /shodan/alert/info
  • [x] /shodan/alert/triggers
  • [x] /shodan/alert/{id}/notifier/{notifier_id}
  • [x] /shodan/alert/{id}/trigger/{trigger}
  • [x] /shodan/alert/{id}/trigger/{trigger}/ignore/{service}

Notifiers

  • [x] /notifier
  • [x] /notifier/provider
  • [x] /notifier/{id}

Directory Methods

  • [x] /shodan/query
  • [x] /shodan/query/search
  • [x] /shodan/query/tags

Account Methods

  • [x] /account/profile

DNS Methods

  • [x] /dns/resolve
  • [x] /dns/reverse
  • [x] /dns/domain/{domain}

Bulk Data

  • [x] /shodan/data
  • [x] /shodan/data/{dataset}

Manage Organization

  • [x] /org
  • [x] /org/member/{user}

Utility Methods

  • [x] /tools/httpheaders
  • [x] /tools/myip

API Status Methods

  • [x] /api-info

Experimental Methods

  • [x] /labs/honeyscore/{ip}

Exploits

  • [x] /search
  • [x] /count

Implemented Streaming API

Data Streams

  • [x] /shodan/banners
  • [x] /shodan/asn/{asn}
  • [x] /shodan/countries/{countries}
  • [x] /shodan/ports/{ports}

Network Alerts

  • [x] /shodan/alert
  • [x] /shodan/alert/{id}

If a method is absent or something doesn't work properly don't hesitate to create an issue.

Links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].