Error message help for python_pty_shell (used in ippsec's walkthrough of machine: popcorn)

Hi all,

I am currently learning various things as I have a go at popcorn.

I followed ippsec’s walkthrough to get an interactive python shell (my exact steps detailed below if needed but although I can only post two links as a new user it is from 14 minutes exactly in ippsec’s walkthrough of popcorn).

In short, I edited the lhost in ( to my ip address, then uploaded it to dev/shm/ on popcorn.

Then I started up the python listener with:

python -b :31337

(link to the python listener file: - it is this file that is returning the error I need help with.)

Then, when I tun,on popcorn, I get the following error message from tcp_pty_shell_handler on my machine:

Traceback (most recent call last):
File “/opt/shell/python-pty-shells/”, line 163, in
File “/opt/shell/python-pty-shells/”, line 78, in handle
pty = PTY()
File “/opt/shell/python-pty-shells/”, line 16, in init
self.pty = open(os.readlink(“/proc/%d/fd/%d” % (pid, slave)), “rb+”)
io.UnsupportedOperation: File or stream is not seekable.
Exception ignored in: <function PTY.del at 0x7f588699bbe0>
Traceback (most recent call last):
File “/opt/shell/python-pty-shells/”, line 56, in del
self.termios.tcsetattr(self.pty, self.termios.TCSAFLUSH, self.oldtermios)
AttributeError: ‘PTY’ object has no attribute ‘pty’

Can anyone help me figure out this error message and what I need to do differently to make this work?
Hopefully I have provided enough information for somebody to help me make sense of this!

Thanks in advance.

It appears that you are encountering an error while trying to set up the interactive python shell using the provided scripts and instructions. The error message indicates an issue with the “” file. Here are a few things you can try to resolve the error:

Verify File Integrity: Ensure that the “” file was downloaded and uploaded correctly without any corruption or modifications.

Check File Permissions: Make sure that the “” file has appropriate permissions to be executed. You can use the “chmod” command to adjust the file permissions if needed.

Update Python Dependencies: Ensure that you have the necessary dependencies and versions required by the script. Check if any additional packages need to be installed or if there are any compatibility issues.

Double-check IP Addresses: Verify that you correctly edited the IP address in the “” file to match your own IP address.

Debugging: To get more information about the error, you can add print statements or use a debugger to identify the exact line causing the issue in the “” file.

Seek Support: Consider reaching out to the developer of the scripts or the community where you found them for assistance. They may have specific troubleshooting steps or insights based on their experience.

Keep in mind that working with such scripts and configurations requires a good understanding of the underlying technologies and security implications. Ensure that you have the necessary permissions and legal authorization to perform these activities in your environment.

Rachel Gomez