RyanJarv/cdn-proxy

Issue with cdn-scanner when using a CIDR block

luchua-bc opened this issue · 2 comments

I'm running cdn-scanner to scan an AWS CIDR block:

cdn-scanner -domain {my_instance}.cloudfront.net cloudfront 3.160.0.0/14

And I got the following:

Ulimit # of files open is currently set to 65326
https://3.160.0.0/14 -- Via Proxy: closed (502), Origin: error (000 -- Get "https://3.160.0.0%2F14/": dial tcp: lookup 3.160.0.0/14: no such host)
http://3.160.0.0/14 -- Via Proxy: closed (502), Origin: error (000 -- Get "http://3.160.0.0%2F14/": dial tcp: lookup 3.160.0.0/14: no such host)

It seems that 3.160.0.0/14 is treated as a single IP instead of a CIDR block. What's the correct command?

Thanks,
Luc

@luchua-bc Sorry for the delay here, I don't think the target selection supports CIDRs right now. If you want to expand the IPs out in to a file though it should accept that though.

https://github.com/RyanJarv/cdn-proxy/blob/main/main.go#L232

Thanks @RyanJarv for confirming the workaround.