Shodan ports in config
This commit is contained in:
parent
638216e8fa
commit
bd3f108d12
|
@ -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:
|
||||
|
|
2
main.go
2
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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue