Time challenge 1 (using python)
It seems that I am having a problem with loading the html source. When I load the source, it says "YOU MUST BE LOGGED IN TO PLAY!". Is it correct in me using the PHPSESSID:
dicHeaders = {'COOKIE': strSession}
req = urllib2.Request(url, None, dicHeaders)```
I do not understand, as this method worked on a different challenge on a different website.
Thanks guys I solved that problem -the moment I read System_meltdown's post- and have created another one!
This new problem is frustrating. I open the link, which is the answer, and I get the message "Wrong string, try again!" Obviously, the machine is telling me that my answer is wrong; but I have analyzed all the angles and my answer checks out.
How did I check my answer, you ask? Well, I printed out: the original html source, which contains the encoded string; the encoded string; the decoded string; the url (answer).
I checked if the printed out encoded string matches with the source. I then took that encoded string and decoded it with a translator, and then compared that decoded string with my program's decoded string, surprise surprise it checked out. All in all, everything seems to check out. I see no reason why it would not work. Haaaa, the joys of programming…
Where do I go from here?
Okey, I have isolated the problem now. I commented out the code which sends the answer, and I ran my code. I obtained the answer, in printed form, and manually entered it into the address bar. I got "Wrong string, try again!"
On to experiment 1.2: I then proceeded to comment out my first request (where I obtain the html source in order to obtain the encoded string) and commented out the sending of the answer, and imputed the encoded string manually into my program. I took the answer, that my program created, and inputed the answer manually and I got the response "You took longer than a second!"; So I take it that that means my answer was correct.
Q?
So, it looks like you finally got it to work (not quick enough, though) when you manually pulled the encoded string from the page's source. Have you checked to make sure that your script is finding the encoded string in its entirety? Try getting it to print a "before" and "after" of the string, then verify.
Zephyr_Pure wrote: So, it looks like you finally got it to work (not quick enough, though) when you manually pulled the encoded string from the page's source. Have you checked to make sure that your script is finding the encoded string in its entirety? Try getting it to print a "before" and "after" of the string, then verify.
I don't think you understand why I did the experiments above; I did them to prove what was wrong with my program. I printed out every useful output that you can think of: the original html source, the html response source (when I submit my answer), the encoded string which I filtered out from the original source, the decrypted source; the final url (answer).
In layman's terms, my program does what it is supposed to do, i.e. if you comment out the retrieving of the original html source. Just to make sure my program filtered the encoded string out correctly, I even gave my program the mass of string to filter. Therefore, the original html source -that my program is receiving via my programs request- is corrupt, or something. Q
SwartMumba wrote: Therefore, the original html source -that my program is receiving via my programs request- is corrupt, or something. Q
hmph, excuses excuses.
keep in mind that unless you're using regular expressions or some other method that I don't know about, the answer you get may be affected by the length of the page HBH spits out back at you. since users are logging in and out, the amount of information in the "members online" section is constantly changing, and your program will have to be written to accommodate that.
lesserlightsofheaven wrote: [quote]SwartMumba wrote: Therefore, the original html source -that my program is receiving via my programs request- is corrupt, or something. Q
hmph, excuses excuses.
keep in mind that unless you're using regular expressions or some other method that I don't know about, the answer you get may be affected by the length of the page HBH spits out back at you. since users are logging in and out, the amount of information in the "members online" section is constantly changing, and your program will have to be written to accommodate that.[/quote]
"hmph, excuses excuses," not actually. I am hypothesizing. With regard to your second paragraph: it does not matter how long the html source is, my program will find the encoded string.
Shrapskater80, I am not quite sure what you mean.