Follow us on Twitter!
Society leans ever heavily on computers, if you have the power to take out computers you can take out society. - cubeman372
Wednesday, April 23, 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: 16
Guests Online: 15
Members Online: 1

Registered Members: 82876
Newest Member: bhl1986
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

Timed 1 using c++

ghostraider100
Member



Posts: 71
Location:
Joined: 01.08.10
Rank:
Wiseman
Posted on 21-05-11 16:53
Wat kind of skill which is required to beat dis challenges using c++. Could some1 help me plz!
Author

RE: Timed 1 using c++

ghostraider100
Member



Posts: 71
Location:
Joined: 01.08.10
Rank:
Wiseman
Posted on 21-05-11 17:35
I want to know how to grab those things alone.
Author

RE: Timed 1 using c++

techb
Member



Posts: 384
Location:
Joined: 15.02.09
Rank:
Moderate
Posted on 21-05-11 17:38
You will need a way for your program to get the page. C++ could have some libs to help with cookie handling and what-nots, or you could use sockets. Sockets being the best way to go (my opinion). This might help you get started.


www.userbars.com/74460/665255/337-7865-ubda3219.gif
kbcarte.wordpress.com
Author

RE: Timed 1 using c++


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 21-05-11 17:48
techb wrote:
libs to help with cookie handling and what-nots, or you could use sockets.

That's an odd set of choices...


Author

RE: Timed 1 using c++

techb
Member



Posts: 384
Location:
Joined: 15.02.09
Rank:
Moderate
Posted on 21-05-11 18:01
I am in no way a C++ coder, and have only used it on occasion for embedded things. But I would assume there are third party libs to help with this kinda stuff, like cURL or something.


www.userbars.com/74460/665255/337-7865-ubda3219.gif
kbcarte.wordpress.com
Author

RE: Timed 1 using c++


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 21-05-11 18:11
techb wrote:
I am in no way a C++ coder, and have only used it on occasion for embedded things. But I would assume there are third party libs to help with this kinda stuff, like cURL or something.

There are, I'm just saying that what you said made it sound like the choice is between something that helps him manage temporary information stored on his own computer or something that would actually allow him to communicate with the website and allow him to solve it. Just seems sort of... disparate.


Author

RE: Timed 1 using c++

kaden
Member



Posts: 36
Location: Australia
Joined: 11.08.06
Rank:
Newbie
Posted on 22-05-11 14:14
the basics of all the timed challenges is this:

-visit HBH.
-log into your user account.
-visit the timed challenge page, and grab required information.
-process what is given to you.
-submit required information, in the way the challenge tells you to (GET/POST).
-Rip out hair and repeat if it doesn't work.

I used java for all the timed ones I have done. I found it very easy tbh.

I reccomend you do some basic interaction with websites before you try these challenges. Simple GET/POST requests, etc.

will help you a lot.


no one dies a virgin... life fucks us all.
hellboundhackers.org/sig/r/10735.png
Author

RE: Timed 1 using c++


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 22-05-11 16:16
Simple example using HTTP requests (This is in AutoIt, and yes, it's fast enough).
You can easily convert it to an other language, aslong as theres not a large amount of loops, the speed will barely make any difference tho.

Code
Dim $PHPSESSID = 'PHPSESSID=PHPSESSID_HERE;'
Dim $fusion_user = 'fusion_user=FUSION_USER_HERE;'

Dim $HttpWebRequest = ObjCreate('winhttp.winhttprequest.5.1')




GET
Code
$HttpWebRequest.Open('GET', 'http://www.hellboundhackers.org/challenges/timed/timedX/index.php', False)
$HttpWebRequest.SetRequestHeader('Cookie', $PHPSESSID & ' ' & $fusion_user)
$HttpWebRequest.Send()




POST
Code
$HttpWebRequest.Open('POST', 'http://www.hellboundhackers.org/challenges/timed/timedX/index.php', False)
$HttpWebRequest.SetRequestHeader('Cookie', $PHPSESSID & ' ' & $fusion_user)
$HttpWebRequest.SetRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
$HttpWebRequest.Send('POST_DATA')




To get the source of the page after the request simply use
Code
$HttpWebRequest.ResponseText()




AutoIt has alot useful string functions, it's easy, it's fast enough to do the trick, so why not.

Grabbing the word is as easy as (example in Timed1)
Code
__StringBetween($HttpWebRequest.ResponseText(), 'following random string: ', ' and answer like')




But just use any language you feel good with I suppose. I personally don't have a favorite language at all, and I mastered alot of them. Henche, why I sometimes use 5 different languages on a single app.

It's irrelevant to me if others claim something is 'better' I just use whatever does what I require the best. Rewriting it in a language such as C++ will speed up the request by a few ms. However, you have to write about 60 more lines of code. If you ask me, that would be a waste of time.

Sockets being the best way to go (my opinion).

^ Exactly what i'm talking about, why would it be better if it has the same end results? ;-)
Why spend more time on something that completes the challenge in 1 second, if you have 5 seconds to do it.




Edited by on 22-05-11 16:35
Author

RE: Timed 1 using c++


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 27-05-11 02:08
If you really want to try doing it in c++, be prepared to do some reading. Unless you know of a good library to provide the functions necessary for decoding, be prepared to write your own decoder(this was what I did, so I don't know of any libraries off the top of my head you could use). After that, you have to worry about all the http stuff like reading the page, and for that I recommend cURL, but that's just my personal preference.

Also, whatever you do, don't copy and paste any code off of the web without reading up on it and understanding it fully. You'll never learn anything like that, and, afterall, the point of every challenge on this site is to learn from it.