Join us at IRC!
Your life is ending one minute at a time. If you were to die tomorrow, what would you do today?
Thursday, May 24, 2012
Navigation
Members Online
Total Online: 32
Web Spiders: 16
Guests Online: 31
Members Online: 1

Registered Members: 70180
Newest Member: RAWRFEARME744798
Latest Articles
View Thread

HellBound Hackers | Challenges | Timed Challenges

Author

Has anyone actually done timed 1 in python?

jjbutler88
Colemak User



Posts: 590
Location:
Joined: 22.04.07
Rank:
Guru
Posted on 18-05-08 10:44
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


http://soundcloud.com/altimeter
Author

RE: Has anyone actually done timed 1 in python?

Uber0n
Member



Posts: 1963
Location: Sweden‭‮
Joined: 13.06.06
Rank:
God
Posted on 18-05-08 10:49
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 ;)



http://uber0n.webs.com/
Nope http://uber0n.webs.com/
Author

RE: Has anyone actually done timed 1 in python?

Mouzi
Member



Posts: 144
Location: Finland
Joined: 08.08.06
Rank:
God
Posted on 18-05-08 12:16
I still think people are making this too complicated ;P I did all of them with JS. Of course it's good programming experience though to try doing them in different languages.

EDIT: Oops, I haven't done that fourth one yet.
EDIT2: Now I have (and with JS again).



Steganographs

Edited by Mouzi on 18-05-08 12:48
You would try to hack it anyways.
Author

RE: Has anyone actually done timed 1 in python?

jjbutler88
Colemak User



Posts: 590
Location:
Joined: 22.04.07
Rank:
Guru
Posted on 18-05-08 13:44
YES!

Did it! Took me far too long (3 hours) but I learnt loads about urllib and python in general. Timed 2 here I come.... :p


http://soundcloud.com/altimeter
Author

RE: Has anyone actually done timed 1 in python?

Demons Halo
Member



Posts: 261
Location: Sweden
Joined: 26.03.09
Rank:
Hacker Level 1
Posted on 20-04-09 08:32
how the heck did you do it? :S I can't get it to work under 1.3 sec!! The requests take 1.2 sec and 0.1 for decoding... :/




base_dropper@hotmail.com www.demonshalo.com
Author

RE: Has anyone actually done timed 1 in python?

clone4
Member



Posts: 586
Location: He is back and he's bad!
Joined: 25.11.07
Rank:
God
Posted on 20-04-09 11:57
Demons Halo wrote:
how the heck did you do it? :S I can't get it to work under 1.3 sec!! The requests take 1.2 sec and 0.1 for decoding... :/



Your request takes ages, I think it's a slow connection. And the decoding takes way too much time as well, maybe some code optimization


[img][/img]


spyware - "They see me trollin'..."
<yaragn> ever seen that movie? The Matrix?
<yaragn> with those green lines of flying text?
<yaragn> *THAT'S* Perl

clone_4@hotmail.com
Author

RE: Has anyone actually done timed 1 in python?

COM
Banned



Posts: 800
Location:
Joined: 31.08.07
Rank:
God
Posted on 20-04-09 12:01
Well I don't know any python, but in case it works as in many other languages and you gather the information sent to you in chunks then it might be quicker to just get roughly enough to include the data you're after then not care to receive the rest. Should save you a bit of time.


K'aem'nhi kh'rn, K'aem'nhi kh'r, K'aem'nhi kh'rmnu.
I'a Y'gs-Othoth!
Author

RE: Has anyone actually done timed 1 in python?

Demons Halo
Member



Posts: 261
Location: Sweden
Joined: 26.03.09
Rank:
Hacker Level 1
Posted on 20-04-09 12:05
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.




Edited by Demons Halo on 20-04-09 12:08
base_dropper@hotmail.com www.demonshalo.com
Author

RE: Has anyone actually done timed 1 in python?

s3r1al
Member



Posts: 11
Location:
Joined: 06.03.06
Rank:
Elite
Posted on 20-04-09 12:21
i think the fastest way would be by using sockets directly; construct the headers by hand...



Sanity calms, but madness is more interesting.
190719729 s3r1al_k1ll3r_f13nd@yahoo.com
Author

RE: Has anyone actually done timed 1 in python?

Demons Halo
Member



Posts: 261
Location: Sweden
Joined: 26.03.09
Rank:
Hacker Level 1
Posted on 20-04-09 12:28
O.o

what difference would it make? the socket requests the URL anyway, which the request class does as well. What I need is some kind a syntax (which I've been googling for), where I can specify what chunk of the source I want to retrieve.




base_dropper@hotmail.com www.demonshalo.com
Author

RE: Has anyone actually done timed 1 in python?

s3r1al
Member



Posts: 11
Location:
Joined: 06.03.06
Rank:
Elite
Posted on 20-04-09 12:39
Why would you want to get part of the source, it wouldnt be significantly faster than getting the whole source...



Sanity calms, but madness is more interesting.
190719729 s3r1al_k1ll3r_f13nd@yahoo.com
Author

RE: Has anyone actually done timed 1 in python?

Demons Halo
Member



Posts: 261
Location: Sweden
Joined: 26.03.09
Rank:
Hacker Level 1
Posted on 20-04-09 12:46
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!


base_dropper@hotmail.com www.demonshalo.com
Author

RE: Has anyone actually done timed 1 in python?

s3r1al
Member



Posts: 11
Location:
Joined: 06.03.06
Rank:
Elite
Posted on 20-04-09 12:50
idk... i used sockets and it took me a couple of tries...



Sanity calms, but madness is more interesting.
190719729 s3r1al_k1ll3r_f13nd@yahoo.com
Author

RE: Timed 1

ro9
Member



Posts: 5
Location:
Joined: 12.08.08
Rank:
Hacker Level 1
Posted on 15-01-10 07:44
Need some help...
Keep getting YOU MUST BE LOGGED IN TO PLAY!
Author

RE: Has anyone actually done timed 1 in python?

stdio
Member

Posts: 375
Location: omnipresent
Joined: 06.04.08
Rank:
God
Posted on 15-01-10 10:20
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'm sorry, I cant hear you over the sound of how awesome I am!
www.thewebsiteisdown.com
Author

RE: still need help

ro9
Member



Posts: 5
Location:
Joined: 12.08.08
Rank:
Hacker Level 1
Posted on 15-01-10 19:12
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

Author

RE: Has anyone actually done timed 1 in python?

ynori7
Future Emperor of Earth



Posts: 1481
Location: #valhalla
Joined: 08.10.07
Rank:
Diabolical
Posted on 15-01-10 19:17
Use the code from stdio's post in that thread, and then when you access the timed challenge page use the "opener" variable which contains the all the headers and cookies and stuff.




ynori7 http://halls-of-valhalla.org
Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.