nitefood / asn

ASN / RPKI validity / BGP stats / IPv4v6 / Prefix / URL / ASPath / Organization / IP reputation / IP geolocation / IP fingerprinting / Network recon / lookup API server / Web traceroute server
MIT License
1.31k stars 159 forks source link

Use HTTPS when it's available #53

Closed aliask closed 9 months ago

aliask commented 9 months ago

Firstly, thanks for the handy tool!

When the script checks the StopForumSpam API, it uses HTTP instead of HTTPS. https://github.com/nitefood/asn/blob/3097a10df95e39044a612069008616e6d36b17ae/asn#L2295

The API docs mention that the client must support SNI for HTTPS to work. curl has supported this since version 7.18.1 (released in March 2008) so I think it's safe to assume it'll be fine.

As for ip-api.com, it looks like it needs a license to use HTTPS. It would be nice to have an option to provide an API key, similar to what you've done with ipqualityscore.

But even just a comment in the script to mention this is the reason it's using the insecure protocol would be good.

nitefood commented 9 months ago

Good suggestions, thanks for the feedback!