Python pty.spawn not working

Thanks, @TazWake and @marlasthemage now I got the shell as tomcat.

But now a new problem is what to do next. Whenever I go each directory only has read-only permissions. Try to download linpeas but getting this “Could not resolve the hostname: github.com”.

Eventually, tried Netcat listener on tomcat shell and sent linpeas from my local machine. Now I can’t run it. With sudo it asks for the password for tomcat and I put what I have but no use at all.

Any hint on what to try next?

TIA