

GET /forums/posting.php?mode=reply&f=19&t=4423 HTTP/1.0
Host: www.hackthissite.org
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091107 Gentoo Firefox/3.5.5 GTB6
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.hackthissite.org/forums/viewtopic.php?f=19&t=4423
Cookie: some_cookie=text; another_cookie=blah; PHPSESSID=EDITED
faazshift wrote:Well, you have to send the cookie containing your session id. In the case of this site, its called PHPSESSID. You send it as part of the cookie header. For example (look at last line):
- Code: Select all
GET /forums/posting.php?mode=reply&f=19&t=4423 HTTP/1.0
Host: www.hackthissite.org
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091107 Gentoo Firefox/3.5.5 GTB6
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.hackthissite.org/forums/viewtopic.php?f=19&t=4423
Cookie: some_cookie=text; another_cookie=blah; PHPSESSID=EDITED
Im not sure how to do that in java, but basically just send the session id cookie.



faazshift wrote:Ah. In php, python, c++, etc, you create a socket, connect it to the webserver, write the request headers, and read the response. Doing a quick google search ('java sockets'), I found one of several step-by-step tutorials: http://www.devarticles.com/c/a/Java/Socket-Programming-in-Java/. Hope this helps!


Users browsing this forum: No registered users and 0 guests