nawledge wrote:I was wrong. I have no idea how to login to hts with java. I've tried many different ways. But my best attempts get the Invalid Referrer page. I remember this being a bad user agent, i think, from earlier challenges. And tried setting the user agent to a mozilla example, to no avail. When I got the string from the page originally i just used my PHPSESSID cookie. It seems the way most posts in java work like /user/login?username=asd&password=234. The site doesn't seem to work that way.. Or maybe I'm missing the actual login page. Can anyone give me a good resource for learning this in java?
sanddbox wrote:nawledge wrote:I was wrong. I have no idea how to login to hts with java. I've tried many different ways. But my best attempts get the Invalid Referrer page. I remember this being a bad user agent, i think, from earlier challenges. And tried setting the user agent to a mozilla example, to no avail. When I got the string from the page originally i just used my PHPSESSID cookie. It seems the way most posts in java work like /user/login?username=asd&password=234. The site doesn't seem to work that way.. Or maybe I'm missing the actual login page. Can anyone give me a good resource for learning this in java?
That's a GET request, not a POST request.
faazshift wrote:Also, if your getting an invalid referer (yes, its misspelled, but thats how its spelled in the HTTP protocol) page, thats simple to fix. Just set the `Referer: ` header to something like `http://www.hackthissite.org/`.
nawledge wrote:Yea, that's what I was talking about in my previous posts. After I get the string and did the math, if I release that connection to post in a new one, will the generated string not change?
The answer is correct, but you needed too much time. You had 3 seconds time, and needed 3.8 seconds.
GET /missions/prog/11/index.php HTTP/1.1
Host: http://www.hackthissite.org
User-Agent: [edited]
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: 115
Connection: keep-alive
Cookie: [edited]
maxflow wrote:hello, i done my programe in c (socket programing), program works it solves the problem, but I can't post the answer, so maybe someone could give me a sample how the post data should look:
POST /missions/prog/11/index.php HTTP 1.0
Referer: http://www.hackthissite.org/missions/prog/11/index.php
Cookie: PHPSESSID=something
Content-Type: application/x-www-form-urlencoded
Content-Length: lenght(solution=answer)
solution=answer
what i mising?
another problem: to check my data I'm writing it to file, in order to make my program work fester i delete the write to file function and sudenly i get accses veluation at address: 0x0..011
with funktion everything works fine
Thanks.
POST /missions/prog/11/index.php HTTP/1.1
Host: www.hackthissite.org
User-Agent: [your user agent]
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: 115
Connection: keep-alive
Referer: http://www.hackthissite.org/missions/prog/11/
Cookie: [your cookie]
Content-Type: application/x-www-form-urlencoded
Content-Length: 82
[there's a double \r\n\r\n here]
solution=Z8jT4JLYm.&submitbutton=submit++++++++++++%28remaining+time%3A+2+seconds%29
xor-logic wrote:I am encountering a specific problem with the program I'm building to do this mission. So far I've written the code to connect to the HTS main page and fire off my login info, then grab the source for the resulting page so I can see if it works or not. Problem is I'm getting "Invalid Referrer". What's going on here?
Users browsing this forum: No registered users and 0 guests