shodan-cli: Simple golang Shodan command line
shodan-cli
Simple golang Shodan command line client with default query.
Build
$ go get gopkg.in/ns3777k/go-shodan.v2/shodan
$ go get github.com/logrusorgru/aurora$ go build
As usual, you can build executables for multiple platforms :
$ # Linux 32 bits
$ GOARCH=386 go build -ldflags “-s” -o shodan-cli32
$ # windows 32 bits
$ GOOS=windows GOARCH=386 go build -ldflags “-s” -o shodan-cli32.exe
$ # OsX
$ GOOS=darwin go build -ldflags “-s” -o shodan-cliOsX
Usage
To start working with Shodan you need an API key. You can do this at https://www.shodan.io.
Use the API key in $SHODAN environment variable.
On first call shodan-cli
will ask an optional default query stored in .shoddanrc
.
Query sample
IP query sample
Network query sample
Copyright (c) 2018 Yves Agostini
Source: https://github.com/yvesago/