Your Turn, Part Two
Hey guys, I solved it.
Thanks to everyone who posted. The error? A newline character AFTER the last '>'
I was worried checking the code and trying different string functions and the answer was always there.
However, the browser didn't show the newline, only when looking in the source code of the webpage.
Well, thanks again
Thanks to everyone who posted. The error? A newline character AFTER the last '>'
I was worried checking the code and trying different string functions and the answer was always there.
However, the browser didn't show the newline, only when looking in the source code of the webpage.
Well, thanks again
-
- Forum Admin
- Posts: 496
- Joined: Sat May 28, 2011 9:14 am
- Location: Germany
-
- Posts: 106
- Joined: Thu Oct 29, 2009 9:21 pm
Code: Select all
0000000: 6e6f 0a no.
-
- Posts: 106
- Joined: Thu Oct 29, 2009 9:21 pm
I'm confused as what you're even trying to do.c0mp4ct wrote:Any hint for me to remove 0a? echo "no" is in the file.Code: Select all
0000000: 6e6f 0a no.
All depends on your internet connection. I ran a web server on my local PC and (temporarily) forwarded the port through my DSL router. Dyndns will be a big help with this setup...
This way you have access to the logs and can experiment.
And BTW: One doesn't have to use PHP to solve this challenge. Other languages are more flexible for this actual purpose
This way you have access to the logs and can experiment.
And BTW: One doesn't have to use PHP to solve this challenge. Other languages are more flexible for this actual purpose
-
- Forum Admin
- Posts: 496
- Joined: Sat May 28, 2011 9:14 am
- Location: Germany
I think I'll try that. I have no idea why this challenge must be so much trouble, especially for the rather simple thing it is asking for. Nevertheless your suggestion seems like a good a way to get a fully-accessible web server.megabreit wrote:All depends on your internet connection. I ran a web server on my local PC and (temporarily) forwarded the port through my DSL router. Dyndns will be a big help with this setup...
This way you have access to the logs and can experiment.
Actually, does it have to be text/plain? When I use curl, I see the following:markobr wrote:Yep, to me it sends 8 requests and accepts answers in text/plain.
EDIT: Answering my own question: At least setting the header explicitly to 'Content-Type: text/plain' does not fix it... at least not on its own. Might still be necessary to do it, or it might not.<= Recv header, 25 bytes (0x19)
0000: 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 Content-Type: te
0010: 78 74 2f 68 74 6d 6c 0d 0a xt/html..
-
- Forum Admin
- Posts: 496
- Joined: Sat May 28, 2011 9:14 am
- Location: Germany
-
- Posts: 106
- Joined: Thu Oct 29, 2009 9:21 pm
-
- Forum Admin
- Posts: 496
- Joined: Sat May 28, 2011 9:14 am
- Location: Germany
Did you read the whole thread?DaymItzJack wrote:I don't see why anyone would have trouble with this challenge.
The problem might be not in the program logic itself, but in the setup/configuration. At least that seems like a not-so-unlikely explanation for the script arguably working fine when being accessed manually.DaymItzJack wrote:All you need is basic programming skills and a server. Did I just have it easy when I did it? My code is literally 7 lines long and worked first time.
-
- Forum Admin
- Posts: 496
- Joined: Sat May 28, 2011 9:14 am
- Location: Germany
Phew, finally made it.
Hint: If you do this challenge in PHP then don't use $_SESSION variables - they need enabled cookies for the standard approach (which just about every website on the planet uses) to work. To be honest, I find it a bit strange that we are supposed to use cookies in other challenges (e.g. 'Type Fastest'), but here they are most likely not supported...
Hint: If you do this challenge in PHP then don't use $_SESSION variables - they need enabled cookies for the standard approach (which just about every website on the planet uses) to work. To be honest, I find it a bit strange that we are supposed to use cookies in other challenges (e.g. 'Type Fastest'), but here they are most likely not supported...
What makes you think that there is only 1 valid way of setting up a web server?? I hope you learned that there is no such 1 way! One goal of all these challenges is to learn! Especially with hacker.org there is everything valid and appropriate that makes you find the solution... even the strangest thing. And if the challenge is setup to not use cookies or even gets confused by cookies... so what? Find out a way to do it within the present environment! Strange is normal and no reason to complain