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 6


ghost's Avatar
0 0

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]','')"> 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?


ghost's Avatar
0 0

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.


ghost's Avatar
0 0

You dont sound like you are doing this in python….


ghost's Avatar
0 0

You're right, I don't know what language I'm programming in. :right:

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

ghost's Avatar
0 0

The_Gman wrote: You're right, I don't know what language I'm programming in. :right:

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

You are using a GET request. Try reading this: http://mail.python.org/pipermail/python-list/2004-June/268493.html


ghost's Avatar
0 0

stdio wrote: [quote]The_Gman wrote: You're right, I don't know what language I'm programming in. :right:

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

You are using a GET request. Try reading this: http://mail.python.org/pipermail/python-list/2004-June/268493.html[/quote]

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


ghost's Avatar
0 0

The_Gman wrote: You're right, I don't know what language I'm programming in. :right:

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

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


ghost's Avatar
0 0

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,