I'm working on the Web Pentester Server-side Attacks module, Exploiting SSRF, and struggling with the URL-encoding. In the module, (gopher section) only the special characters are encoded...and THEN because the URL is being sent through an HTTP POST request parameter (dataserver --> which is URL-encoded) we need to URL-encode the entire URL again to make sure the format is correct. So we start with the string below and end with the 'double-encoded?' one below that:
gopher://dateserver.htb:80/_POST%20/admin.php%20HTTP%2F1.1%0D%0AHost:%20dateserver.htb%0D%0AContent-Length:%2013%0D%0AContent-Type:%20application/x-www-form-urlencoded%0D%0A%0D%0Aadminpw%3Dadmin
to this:
dateserver=gopher%3a//dateserver.htb%3a80/_POST%2520/admin.php%2520HTTP%252F1.1%250D%250AHost%3a%2520dateserver.htb%250D%250AContent-Length%3a%252013%250D%250AContent-Type%3a%2520application/x-www-form-urlencoded%250D%250A%250D%250Aadminpw%253Dadmin&date=2024-01-01
Does anyone have any tips on learning this, or how we would learn to only double-encode certain characters? I ask because a 'space' URL encodes to %20 and if I double-encode it in Burp....it goes to %25%32%30....But I believe in the double-encoded string above, the space is %2520? You can see this looking between Content-Type: application in the two strings above.
Basic question is does everyone just use Burp for encoding or is there another method/training tool I can use where I can make the URL mostly readable besides special characters that are required to be encoded/double-encoded?