Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Timed Challenge (Python)


yours31f's Avatar
Retired
10 0

Well the issue I'm having is that my connection to HBH takes too long. I put a timer in my script and my algorythm to solve challenge 2 takes (apox .0019s) and my total script takes about 2.2s. That leads me to believe that the only thing slowing it down is the connection. Now for the question: Is there a way to speed up this peice of script.

reqH = urllib2.Request('http://www.hellboundhackers.org/challenges/timed/timed2/index.php', None, headerHBH) 
pageH = urllib2.urlopen(reqH)
source = pageH.read()

This peice of script tends to run at about 1.1 seconds. Problem is that on problem 2 you have two seconds you have to have two page loads. Any tips or anything I can read to let me know how to optimise this or am I just out of luck because my connection is too slow?


ghost's Avatar
0 0

I've heard people complain about (the speed of) urllib2 before. Try porting your code to perl.


ghost's Avatar
0 0

MoshBat wrote: Or PHP.

Good one.