Re: [Tutor] Beginner: Socket object and packets

2015-12-05 Thread Cameron Simpson
On 05Dec2015 13:21, Marc Eymard wrote: Hi tutor, I am trying to locate the first blank line in the first received packet when pinging an internet server using a socket object. First up: everything ALan already said. Next: Note that the HTTP response need not all be in a single packet, thoug

Re: [Tutor] Beginner: Socket object and packets

2015-12-05 Thread Alan Gauld
On 05/12/15 13:21, Marc Eymard wrote: > Hi tutor, > > I am trying to locate the first blank line in the first received packet > when pinging an internet server using a socket object. You need to be careful with your descriptions. ping is a very specific message and uses ICMP echo rather than TCP

Re: [Tutor] Please sent me the output of this code .Please include both cases if input correct and if input wrong .

2015-12-05 Thread Alan Gauld
On 05/12/15 18:48, Deepak Nn wrote: > # Embedded file name: re4.py If you want to know the output run it. If the output you get is not what you expect tell us what you input, what you got out, what you expec6ed. Also tell us which OS and Python versions you are using. Otherwise all I can tell you

[Tutor] Beginner: Socket object and packets

2015-12-05 Thread Marc Eymard
Hi tutor, I am trying to locate the first blank line in the first received packet when pinging an internet server using a socket object. My assumption is there will be a mandatory blank line right after the http headers in accordance with the http protocol. Consider the following: import s

[Tutor] Please sent me the output of this code .Please include both cases if input correct and if input wrong .

2015-12-05 Thread Deepak Nn
# Embedded file name: re4.py import time flag = [102, 108, 97, 103, 123, 112, 121, 116, 104, 111, 110, 95, 114, 111, 99, 107, 115, 125] password = raw_input('Enter secret code to get secret password: ') sleep_hours = 1 print 'Going to sleep. Will check password after %d hours'