ns3777k/go-shodan

Response headers

crazy-max opened this issue · 6 comments

Hi,

First of all thanks for this lib.

I'm currently using your lib to retrieve network alerts through GetBannersByAlerts. Everything works fine but the response headers are not included and they could be relevant to me if they are available:

The headers contain metadata about the alert to help you understand which alert was responsible for generating the notification. Specifically, the following headers are available in the POST request:

  • SHODAN-ALERT-ID: unique ID for the alert
  • SHODAN-ALERT-NAME: name for the alert
  • SHODAN-ALERT-TRIGGER: trigger that caused the notification to get sent
  • SHODAN-SIGNATURE-SHA1: SHA1 signature encoded using your API key to validate the notification's origin

These response headers are about the webhook monitor and I wonder if the same are passed for the network alert streaming endpoint.

If so, can you include them?

Thanks!

hey @crazy-max ! i'll try to take a look this week

@ns3777k Awesome thanks!

@crazy-max I'm not sure I wanna make a new major version, I'll think on duplicating methods 🤔 can you build your project with the PR branch and verify the solution?

@ns3777k Ok will try this out, keep you in touch.

@ns3777k Ok actually those headers are only available through the Shodan Monitor webhook and not in the alert payload unfortunately. Feel free to close #61 and thanks for your time on this!

ok. your welcome 👍