07c61c1b1c
First push for beginning of project
23 lines
287 B
Go
23 lines
287 B
Go
package utils
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/ns3777k/go-shodan/v4/shodan"
|
|
)
|
|
|
|
// Client
|
|
var Client *shodan.Client
|
|
|
|
func init() {
|
|
// Get API key
|
|
key, err := getKey()
|
|
if err != nil {
|
|
Red("Error: %s", err.Error())
|
|
os.Exit(1)
|
|
}
|
|
|
|
// Setup client
|
|
Client = shodan.NewClient(nil, key)
|
|
}
|