mirror of
https://github.com/carlospolop/hacktricks
synced 2024-12-28 05:53:52 +00:00
726 B
726 B
Golang
CONNECT method
In golang, the library net/http usually transforms the path to a canonical one before accessing it:
- /flag/ -- Is responded with a redirect to /flag
- /../flag --- Is responded with a redirect to /flag
- /flag/. -- Is responded with a redirect to /flag
However, when the CONNECT method is used this doesn't happen. So, if you need to access some protected resource you can abuse this trick:
curl --path-as-is -X CONNECT http://gofs.web.jctf.pro/../flag