Hi, im new here and i have this one question in Linux Fundamentals (Filter Contents) - HTB Aacademy:
Use cURL from your Pwnbox (not the target machine) to obtain the source code of the “https://www.inlanefreight.com” website and filter all unique paths of that domain. Submit the number of these paths as the answer.
After some tryings i made up to this:
curl https://www.inlanefreight.com | grep https://www.inlanefreight | tr " " "\n" | grep https://www.inlanefreight | sort -u | wc -l
1º curl https://www.inlanefreight.com
- outputs me with src code
2º grep https://www.inlanefreight
- filter all the src code and outputs me only where the website calls the domain & paths
3º tr " " "\n"
- break all the spaces into another line
4º grep https://www.inlanefreight
- and then filters again to outputs me only the lines where the domain & paths are called
5º sort -u
- outputs me unique results
6º wc -l
- outputs me the number of lines in total
But this still brings me the wrong result and i cant figure out what i am doing wrong. Any hints on what am i missing here?
I already seen other posts here about it, but this line of code i wrote by myself and i wanted to understand what i’m doin wrong.