Follow us on Twitter!
The measure of a mans life is not how well he dies, but how well he lives.
Thursday, December 08, 2016
Navigation
Home
 Find:
 Information:
Learn
Communicate
Submit
Shop
Challenges
 Exploit:
 Programming:
 Think:
 Track:
 Patch:
 Other:
 Need Help?
Other
Members Online
Total Online: 47
Guests Online: 44
Members Online: 3

Registered Members: 96863
Newest Member: athe0s
Latest Articles
View Thread

HellBound Hackers | Challenges | Timed Challenges

Author

Timed Challenge (Python)

yours31f
Member



Posts: 1678
Location: Dallas Texas
Joined: 27.04.07
Rank:
Elite
Posted on 19-02-10 16:11
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.

Code

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?


Debugging is what programmers do to beta software to make it take up more room on your hard drive if it is running too efficiently.


img259.imageshack.us/img259/3713/sigr.png

yours31f@live.com yours31f@yahoo.com rpwd.info
Author

RE: Timed Challenge (Python)


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 19-02-10 16:42
I've heard people complain about (the speed of) urllib2 before. Try porting your code to perl.


Author

RE: Timed Challenge (Python)


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 19-02-10 17:35
MoshBat wrote:
Or PHP.


Good one.