Has anyone actually done timed 1 in python
Ive come close but everything ive coded takes far far too long. Heres the rough steps im taking:
Opening the index of HBH with cookiejar to log me in Getting the source of the timed 1 page Matching the string with a regexp b64 decoding it and sending it back
All these seem to take longer than a second on they're own. I tried it with PHP/cUrl but I dont know enough PHP, and had loads of problems with the curl stuff. Id prefer to stick with python, but im not sure its even possible.
Note: Please dont send me source code answers, I wanna work this one out on my own, but does anybody know if this is at least possible. Am I over-complicating things?
Cheers
I think you're doing it the right way, although your connection might be too slow. Bring the application to school or something and try it there.
I've beaten it both in VB6 and in GML (with a DLL made in C++), and I know a lot of people did it in PHP. Python should definately be able to beat it as well ;)
I've looked through urllib and urllib2. The easiest way to handle cookies is by using the request class with cookies in the headers.
I'm using a 24mbit/s connection so… I doubt the speed thingy :/
best I could do was 1.3sec @ 07.00 before I went to work while there was 5-6 members online.
@COM. hmm you must be right… I'm using read() [15000:-10000] to minimize the search area, although there must be a way to receive only a bit of the source code right away. I'll check it out :)
//D.H.
what is the problem then? :( :(
I was thinking like: request less data -> less work time.
Reading the full source, sorting out the string and decode it takes less than 0,1 second. It's the requesting and submitting parts that are slow, and they are pretty much as short as they can be:
from urllib2 import *
url='http://www.hellboundhackers.org/challenges/timed/timed1/index.php'
headers = {'COOKIE': 'xxx', 'Referer': 'http://www.hellboundhackers.org/'}
req = Request(url, None, headers)
response = urlopen(req)
It can't be any simpler than that :S the same thing goes for submitting with a little url editing!
ro9 wrote: Need some help… Keep getting YOU MUST BE LOGGED IN TO PLAY!
Did you even read the forum on "Timed 1 in python" The answer to log in isnt even hinted, its blatantly there in more than 1 way to do it.
http://www.hellboundhackers.org/forum/timed_1_in_python-69-12936_0.html
i did login with the code on the thread the one with cookielib but when i open the challenge index i still get ' YOU MUST BE LOGGED IN TO PLAY!'
did try HBH class from the link provided, everything okay except time limit and with HBH class i got 2 line of Set-Cookie and urllib2 just 1 with PHPSESSID i'm trying to understang the difference