From bd3f108d12542c378543f06cad8f03a974af06ff Mon Sep 17 00:00:00 2001 From: Christopher Talib Date: Wed, 12 Feb 2020 16:54:14 +0100 Subject: [PATCH] Shodan ports in config --- README.md | 3 +++ main.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c22753..53bbd96 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,9 @@ go build // config.yml shodan: key: String (Required) + ports: + - 80 + - 443 // do not forget to set up kafka and create the topic kafka: diff --git a/main.go b/main.go index 84bacb3..594a5cb 100644 --- a/main.go +++ b/main.go @@ -116,7 +116,7 @@ func main() { // shodan client := shodan.NewEnvClient(nil) ch := make(chan *shodan.HostData) - err = client.GetBannersByPorts(context.Background(), []int{80, 443, 8443, 53}, ch) + err = client.GetBannersByPorts(context.Background(), viper.GetIntSlice("shodan.ports"), ch) if err != nil { logrus.Panic(err) }