Thank you for your help, this definitely gets me going in the right
direction!
On Wed, Jun 11, 2014 at 4:16 AM, Marc Tompkins
wrote:
> On Tue, Jun 10, 2014 at 4:08 PM, Jon Engle wrote:
> > Ok, so when I run the code it immediately terminates and never 'listens'
> to
> > the ports in the loop.
Alan Gauld wrote:
> On 11/06/14 00:08, Jon Engle wrote:
>> Ok, so when I run the code it immediately terminates and never 'listens'
>
> This has nothing to do with your immediate problem but...
>
>> ***Code***
>>
>>#!/usr/bin/python # This is server.py file
>> from socket impo
Jon Engle wrote:
> Ok, so when I run the code it immediately terminates and never 'listens'
> to the ports in the loop. I have verified by running netstat -an | grep
> 65530 and the startingPort is not binding.
As I've already hinted the easiest way to keep your listening threads alive
is to use
On Tue, Jun 10, 2014 at 4:08 PM, Jon Engle wrote:
> Ok, so when I run the code it immediately terminates and never 'listens' to
> the ports in the loop. I have verified by running netstat -an | grep 65530
> and the startingPort is not binding.
The problem is that all threads started by a program
On 11/06/14 00:08, Jon Engle wrote:
Ok, so when I run the code it immediately terminates and never 'listens'
This has nothing to do with your immediate problem but...
***Code***
#!/usr/bin/python # This is server.py file
from socket import * #import the socket library
Ok, so when I run the code it immediately terminates and never 'listens' to
the ports in the loop. I have verified by running netstat -an | grep 65530
and the startingPort is not binding.
***Server***
Jons-Mac:Desktop Jon$ python response.py
Please enter starting port: 65530
Jons-Mac:Desktop Jo
Ok, so after making the changes the code does bind the startingPort
variable but that is the only port that gets bound. Also when connecting to
the startingPort I receive the following error:
Please enter starting port: 65520
listening...
...connected!
Traceback (most recent cal
On Tue, Jun 10, 2014 at 2:00 PM, Jon Engle wrote:
> Ok, so after making the changes the code does bind the startingPort
> variable but that is the only port that gets bound. Also when connecting to
> the startingPort I receive the following error:
>
> Please enter starting port: 65520
>
>
On Tue, Jun 10, 2014 at 9:28 AM, Jon Engle wrote:
> for port in range (startingPort, 65535):
> thread.start_new_thread(setup, (port,))
> startingPort=startingPort+1
> #print startingPort
>
I think you just need this:
for port in range (startingPort, 65535):
> thread.start_new_thread(s
On Tue, Jun 10, 2014 at 5:28 PM, Jon Engle wrote:
>
> startingPort=input("\nPlease enter starting port: ")
> startingPort=int(startingPort)
>
> def setup(PORT):
> PORT = startingPort#arbitrary port not currently in use
There's a conflict with this PORT variable.
_
Thank you for your help! This updated code does not "bind" the selected
port to a "listen" state, it simply exits. I feel like part of this has to
do with the creation of a procedure. Any ideas/recommendations on how to
make this loop "bind" to a socket?
#!/usr/bin/python # This is s
Lukas Nemec wrote:
> Hi,
>
> fist - are you really triyng to have open 64 000 ports? ok, i suppose
> you have your reasons, but this is not a good idea - you'll block most
> applications that use these ports ..
>
> The problem is with your main function -
> you have PORT defined, but it is not g
On 10/06/14 00:33, Jon Engle wrote:
I am trying to open ports 1025-65535 with the following code
Why would you want to do that?
It sounds like a great way to cripple your PC as it runs 64000 threads
monitoring each of those ports. And it assumes that nothing else is
using those ports already.
Hi,
fist - are you really triyng to have open 64 000 ports? ok, i suppose
you have your reasons, but this is not a good idea - you'll block most
applications that use these ports ..
The problem is with your main function -
you have PORT defined, but it is not global, it is only local, and whe
I am trying to open ports 1025-65535 with the following code (Mostly found
online with small modifications). I am unable to "bind" anything other than
the one port which is selected as input. What am I missing and how do I
bind all the ports simultaneously?
#!/usr/bin/python # This is se
15 matches
Mail list logo