shogo/internal/utils/shodan.go
perp 07c61c1b1c 🎉 Beginning
First push for beginning of project
2023-08-01 23:35:47 +01:00

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)
}