Follow us on Twitter!
The important thing is not to stop questioning. - Albert Einstein
Monday, April 21, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 26
Guests Online: 25
Members Online: 1

Registered Members: 82856
Newest Member: djtonyg
Latest Articles
View Thread

HellBound Hackers | Challenges | Timed Challenges

Author

Has anyone actually done timed 1 in python


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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




Edited by rex_mundi on 26-03-13 00:44
Author

RE: Has anyone actually done timed 1 in python?

Uber0n
Member



Posts: 1963
Location: Sweden‭‮
Joined: 13.06.06
Rank:
Hacker Level 3
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 Wink


img230.imageshack.us/img230/724/uber0nsig3hj6.gif
http://uber0n.web. . .
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:
Newbie
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).


izuom.net/sig.gif
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?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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.... Pfft


Author

RE: Has anyone actually done timed 1 in python?

Demons Halo
Member



Posts: 261
Location: Sweden
Joined: 26.03.09
Rank:
Apprentice
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:
Mad User
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]img164.imageshack.us/img164/5713/perlvl0.jpg

clone4.freehostia.com/ubuntu_3.png
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?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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.


Author

RE: Has anyone actually done timed 1 in python?

Demons Halo
Member



Posts: 261
Location: Sweden
Joined: 26.03.09
Rank:
Apprentice
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 Smile

//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?


Member

Your avatar

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


Author

RE: Has anyone actually done timed 1 in python?

Demons Halo
Member



Posts: 261
Location: Sweden
Joined: 26.03.09
Rank:
Apprentice
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?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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...


Author

RE: Has anyone actually done timed 1 in python?

Demons Halo
Member



Posts: 261
Location: Sweden
Joined: 26.03.09
Rank:
Apprentice
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:

Code

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?


Member

Your avatar

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


Author

RE: Timed 1


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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?


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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.hellbo. . .936_0.html




Author

RE: still need help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
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
Member



Posts: 1486
Location: #valhalla
Joined: 08.10.07
Rank:
God
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.


halls-of-valhalla.org/images/affiliateLogo.png voodoorage.halls-of-valhalla.org/images/smallLogo.png
i537.photobucket.com/albums/ff338/ynori77/archenemysig1.jpg
ynori7 http://halls-of-valhalla.org