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

filedescriptor out of range in select() #67

Closed
jj4st13 opened this issue Feb 20, 2016 · 5 comments
Closed

filedescriptor out of range in select() #67

jj4st13 opened this issue Feb 20, 2016 · 5 comments

Comments

@jj4st13
Copy link

jj4st13 commented Feb 20, 2016

The problem is that the code below.

for i in range(200):
    socket.append(TCP_client.tcplink(Raw, "www.example.com", 80))

when range(100) this code well work but over 100, not work
i want to connect my web server over 100 session.
below stack-trace

Unhandled exception in thread started by <bound method TCP_client._do_control of <scapy.layers.inet.TCP_client object at 0xb56bc36c>>Unhandled exception in thread started by <bound method TCP_client._do_control of <scapy.layers.inet.TCP_client object at 0xb564288c>> 
Traceback (most recent call last):     
File "/usr/local/lib/python2.7/dist-packages/scapy/automaton.py", line 525, in _do_control        
    self.listen_sock = conf.L2listen(**self.socket_kargs) 
File "/usr/local/lib/python2.7/dist-packages/scapy/arch/linux.py", line 461, in __init__   
    _flush_fd(self.ins) 
File "/usr/local/lib/python2.7/dist-packages/scapy/arch/linux.py", line 301, in _flush_fd 
    r,w,e = select([fd],[],[],0) ValueError: filedescriptor out of range in select()
@p-l-
Copy link
Member

p-l- commented Feb 20, 2016

Sorry I cannot read your code or understand your question. Please format your code properly, and include the comprehensive stack-trace if available.

@p-l-
Copy link
Member

p-l- commented Feb 21, 2016

As you can see, this comment is not really more readable than the previous one. While I do appreciate your effort at trying to format your code and output, can you please consider reading GitHub help about Markdown and editing your comments to make them readable? Thanks!

@p-l-
Copy link
Member

p-l- commented Feb 21, 2016

Can you edit you first comment (no need to write another one!) to make your code readable?

@jj4st13
Copy link
Author

jj4st13 commented Feb 22, 2016

i edited first comment

@p-l-
Copy link
Member

p-l- commented Feb 22, 2016

Thanks!

As I understand it, the problem seems unrelated to Scapy, it is a system / Python. See for example this comment in Ansible tracker and this answer on stackoverflow.

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

No branches or pull requests

2 participants