Client Search Error
Closed this issue · 1 comments
Calin23 commented
Hello, I use this package for several searches, not every time, but in some cases it returns an error.
cannot unmarshal object into Go struct field Minecraft.matches.minecraft.description of type string
It is possible that Shodan has modified its json structure.
shadowscatcher commented
Sorry for the delay.
Yes, Shodan changed this field to a dynamically typed object (could be string, could be nested dictionary).
I changed it to json.RawMessage
, so you'll have to unmarshal it yourself.
I also added a MinecraftDescription
type for this new nested object, but I can't guarantee it won't change again.
Thank you for the issue!
P.S. Don't trust Shodan's official schema, it is outdated.