Sign in to follow this  
Followers 0
VicTT

HTTP Protocol

7 posts in this topic

Can anyone out there teach me the HTTP protocol(what happens client-server side)..Exactly what is sent, and what is replied through a TCP connection to a site..I need to POST some data and I don't have the slightest idea on how to accomplish this..I have general knowledge of HTTP and HTML, but not as low-level as would enable me to write something that would "low-level" send a form to the server..Could anyone PM me if he knows more about this subject than me and even links are welcome..


[quote]Together we might liveDivided we must fall[/quote]

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Can anyone out there teach me the HTTP protocol(what happens client-server side)..Exactly what is sent, and what is replied through a TCP connection to a site..I

install ethereal (a sniffer) on your computer and sniff a HTTP session. You will find everything you need.

Basically HTTP uses a "clear text" protcol, where commands and data are transmitted over the same channel. The basic commands are: GET, POST, HEAD.

Check out this:

telnet www.google.com 80

GET / HTTP/1.0


HTTP/1.0 302 Found
Location: [url=http://www.google.de/cxfer?c=PREF%3D:TM%3D1123235011:S%3D9YwntJAPBrzL6]http://www.google.de/cxfer?c=PREF%3D:TM%3D...3D9YwntJAPBrzL6[/url]
0kY&prev=/
Set-Cookie: PREF=ID=641fef5ba3c0d8c4:CR=1:TM=1123235011:LM=1123235011:S=8H30S5bN
In9Nd0cD; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com
Content-Type: text/html
Server: GWS/2.1
Content-Length: 214
Date: Fri, 05 Aug 2005 09:43:31 GMT
Connection: Keep-Alive

<HTML><HEAD><TITLE>302 Moved</TITLE></HEAD><BODY>
                                                 <H1>302 Moved</H1>
                                                                   The document
has moved
         <A HREF="http://www.google.de/cxfer?c=PREF%3D:TM%3D1123235011:S%3D9Ywnt
JAPBrzL60kY&amp;prev=/">here</A>.
</BODY></HTML>

Everything else can be found in the description of the HTTP protocol at www.w3c.org.

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

www.w3c.org doesn't really help me..Didn't really find what I needed..maybe a more direct link would help..Should I sniff a HTTP session to a site, then try to recreate it..

as in, have a browser connect to localhost, port 80, when port 80 would be listened to by either an automated program that responds to the browser or a hyperterminal session, that lets me respond to the browser requests..

EDIT:

So what would I need to type to get a "legitimate" response from google.com?Like the start page..

Edited by VicTT

[quote]Together we might liveDivided we must fall[/quote]

Share this post


Link to post
Share on other sites

Ok, I'm downloading Ethereal as we speak..thanks for the tip..If I run into any trouble using it, can I count on you to help me?


[quote]Together we might liveDivided we must fall[/quote]

Share this post


Link to post
Share on other sites

www.w3c.org doesn't really help me..Didn't really find what I needed..maybe a more direct link would help..

http://www.w3.org/Protocols/rfc2616/rfc2616.html

Should I sniff a HTTP session to a site, then try to recreate it..

Yes.

as in, have a browser connect to localhost, port 80, when port 80 would be listened to by either an automated program that responds to the browser or a hyperterminal session, that lets me respond to the browser requests..

Not with localhost, as you cannot sniff that traffic.

So what would I need to type to get a "legitimate" response from google.com?Like the start page..

GET / HTTP/1.0

I gave you an example in HTTP 1.0, as 1.1 is slightly more complex.

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Ok, I'm downloading Ethereal as we speak..thanks for the tip..If I run into any trouble using it, can I count on you to help me?

<{POST_SNAPBACK}>

well, depends on the problems you get.

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

www.w3c.org doesn't really help me..Didn't really find what I needed..maybe a more direct link would help..

Here is another link for you. Just stumbled over it... http://www.freeprogrammingresources.com/http.html

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0