ns3777k/go-shodan

HostData bug

Closed this issue · 2 comments

I've ran into an issue when searching for argentina where the results contain a number in the version field and Go wants a string.

options := shodan.HostQueryOptions{
		Query: query,
	}

results, err := client.GetHostsForQuery(&options)

With query = argentina results in

json: cannot unmarshal number into Go struct field HostData.version of type string

Not really sure if this is a bug with the library or with Shodan though.

Thanks!

Hey, @adrianlungu! I'll take a look today.

@adrianlungu I've just pushed v1.0.1 tag that should fix the issue. Can you check this?