maybe this will be useful for you, @Jomomo05 from this topic helped me a lot with this one, let me quote him:
" Assuming that you already found the robots.txt file, you have to use gobuster on dir mode using the URL of the disallowed domain AND the disallowed directory. "
in example: subdomain.inlanefreight.htb:1234/directory/"
2 Likes