Follow us on Twitter!
I'd prefer to die standing, than to live on my knees - Che Guevara
Saturday, April 19, 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: 31
Guests Online: 29
Members Online: 2

Registered Members: 82838
Newest Member: w1zarrd
Latest Articles
View Thread

HellBound Hackers | Challenges | Timed Challenges

Author

RE: Timed 6


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 05-09-08 05:16
This one seems easy enough. dictionary to get the 'seventh' = 7 part.
simple parsing for the number.

I'm just having a hard time with the RE to grab a line of html.
I don't wanna spoil, but the html is
<a href="[URL]" class=l onmousedown="return clk(this.href,'','','res','[nth result]',''Wink">
My RE is HIDEOUS.
having " and ' and needing python escapes as weel as re escape makes it worse. Anyone have a relatively simple RE for this?
Author

RE: Timed 6


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 05-09-08 05:21
a good way to do this is the HTMLParser class in python.

And theres a good article and code bank bit for this particular challenge.

read

http://www.hellbo. . .class.html

http://www.hellbo. . .hp?id=1145

as for the capturing of the item needed you could do something like this

google_term=re.findall('<strong>[a-z\s\w]+</strong>', source)[-2]




Edited by on 05-09-08 05:28
Author

RE: Timed 6


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-09-08 00:49
Yes, i have it all.

I use the HTMLParser to find all class=l a href links, then i grab the nth.
I base64.encode() it, then throw it in as an argument, but it does work. I then tried adding some extra info, but i kept that info blank, hoping it would change the method to POST, but it's either not changing it to POST or it's still not working.
Author

RE: Timed 6


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-09-08 00:51
You dont sound like you are doing this in python....


Author

RE: Timed 6


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 07-09-08 19:10
You're right, I don't know what language I'm programming in.
:right:
Code

from HTMLParser import HTMLParser
import base64
...
b64url = base64.b64encode(url)
...
result = opener.open("http://www.hellboundhackers.org/challenges/timed/timed6/index.php?url=%s" % b64url, blankdata)



Author

RE: Timed 6


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 07-09-08 20:10
The_Gman wrote:
You're right, I don't know what language I'm programming in.
:right:
Code

from HTMLParser import HTMLParser
import base64
...
b64url = base64.b64encode(url)
...
result = opener.open("http://www.hellboundhackers.org/challenges/timed/timed6/index.php?url=%s" % b64url, blankdata)





You are using a GET request. Try reading this: http://mail.pytho. . .68493.html


Author

RE: Timed 6


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 10-09-08 23:41
stdio wrote:
The_Gman wrote:
You're right, I don't know what language I'm programming in.
:right:
Code

from HTMLParser import HTMLParser
import base64
...
b64url = base64.b64encode(url)
...
result = opener.open("http://www.hellboundhackers.org/challenges/timed/timed6/index.php?url=%s" % b64url, blankdata)





You are using a GET request. Try reading this: http://mail.pytho. . .68493.html


But I'm including some url encoded data, the manual said it should work as post.

should i even url encode the url=? part?

Thanks
Author

RE: Timed 6


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 10-09-08 23:43
The_Gman wrote:
You're right, I don't know what language I'm programming in.
:right:
Code

from HTMLParser import HTMLParser
import base64
...
b64url = base64.b64encode(url)
...
result = opener.open("http://www.hellboundhackers.org/challenges/timed/timed6/index.php?url=%s" % b64url, blankdata)





Alright sorry man.... try using urllib2's Request class.


Author

RE: Timed 6


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 11-09-08 00:32
I made it so it posts.
This is the header

POST /challenges/timed/timed6/index.php HTTP/1.1
Accept-Encoding: identity
Content-Length: 52
Connection: close
User-Agent: Python-urllib/2.5
Host: www.hellboundhackers.org
Cookie:cookiestuff
Referer: http://www.hellboundhackers.org/index.php
Content-Type: application/x-www-form-urlencoded
url=aHR0cDovL3d3dy5tb3ppbGxhLm9yZy9kb3dubG9hZC5odG1s

The word i got was firefox
4th entry
http://www.mozilla.org/download.html

Does that look right?

Thanks,