3 ms·
Wouldn't it make more sense to just not support those weird formats? Nobody uses them and they can help attackers (mentioned in the post).
by IshKebab 6y ago
Wouldn't it make more sense to just not support those weird formats? Nobody uses them and they can help attackers (mentioned in the post).
- pferde 6y agoHow do you know nobody uses them? I'd be willing to bet that there are many older in-house scripts puttering away in some dark, webbed corners of internal networks, which rely on this functionality, e.g. because they are getting their input from some obscure network appliances which print IP addresses like that. I would fully expect support for these "weird" formats to be a (enabled by default) build-time option, but it's a good thing that curl maintainer is not just cutting it off right away.
- throwaway823882 6y agoPeople trying to circumvent censorship often look like "attackers". When I was in middle school, I needed to research a paper in the school library computers. Their stupid computers were always messed up; first the proxy settings weren't configured in half the machines (I fixed that, and got scolded), then the anti-virus wasn't working (fixed that, got scolded). Then the proxies wouldn't let me search for my paper. I was a budding hacker, so I figured out the numbering trick mentioned in this article, and was able to bypass the proxy and do my research for my paper. This was a long time ago but I bet the same situation is just as relevant today. (Doubtful that you'd use curl in this scenario, but nice to know they are preserving useful functionality rather than throwing it out)
- cmeacham98 6y agoQuestion: how did this trick help you bypass the proxy? The only way I can think of this possibly helping you is by changing the Host header and that somehow fooling the proxy into allowing your connection through. However some random testing with both a modern browser and a really old version of firefox I have installed shows that it seems to convert the 'weird number format' into a proper IP address, even when using a proxy. In other words, I cannot see how using these weird IPs ever could make a difference from the proxy's perspective.
- kalleboo 6y agoI've seen software that uses the "single decimal number" representation in order to store IP address in a database integer type column
- IshKebab 6y agoThat's how they're stored in memory too, but that's just for storage. It is probably decoded to normal dotted form by the database layer.