The idea I have is to make a netcat server, and when you connect to it, the server runs a python script with which the user can interact. So for example the script asks for a number, and it outputs that number to the power of 3. How can you do that? How do you run a program and redirect the output to the connected user and make them able to interact with it in real time?
Pseudo output:
$ nc 192.168.1.13
Input a number: 2
8
(end)
The script:
print(str(int(input("Input a number: "))**3))
nc
. If you still cannot get the code working, post whatever code you've written so far ( even if it doesn't work ) and then we can discuss how to improve that. – Sergiy Kolodyazhnyy Oct 20 '19 at 09:42