Page 10 of 11

Re: Permanent Programming 11

PostPosted: Tue Nov 30, 2010 12:58 am
by fashizzlepop
asleep777 wrote:So different question with same intent: What next?

Personally, I set up the cookie jar first, then POST with login credentials. The site stores the cookie info and then I move on to the challenge.

Re: Permanent Programming 11

PostPosted: Sat Apr 09, 2011 1:03 pm
by gsingh2011
I think I'm going to end up doing this with javascript, but was anyone able to do it with another lanuage, like C/C++, Java, or Python? I'm trying it with python and I can login easily but when I try to access the programming mission page I get httperror_seek_wrapper: HTTP Error 403: request disallowed by robots.txt. Was anyone able to get around this problem?

EDIT: So I did it easily with javascript, and for anyone who wants to use python, I was using the mechanize library and I had to set_handle_robots(False) so that it wouldn't follow the rules of robots.txt.

Re: Permanent Programming 11

PostPosted: Wed Jun 01, 2011 9:27 pm
by adamcaa
I've written a perl script to login in, parse the character sequence make the shift and submit the answer.
I've checked my script's output against member posts that have completed the mission and my output matches up. However I still get the 'you're answer is wrong' page.

here is the output from my script maybe I can get some pointers?

Starting...
Data String: 56 62 63 29 36 42 32 74 45 20 45
Shift: -15
Solution: GMN,39/Y<#<
Wrong Answer!
Done!

[Edit] Yes! I finally got it using Wireshark and perl module LWP::UserAgent.

Re: Permanent Programming 11

PostPosted: Thu Jun 02, 2011 4:23 am
by b33tr00t
your solution is correct. if you are sure that you are not submitting any extra chars(a space maybe?) with with the answer then look into the field/form names and submit button. also read all the previous posts here. the answer to your problem was already posted. i could refer you to a specific post but i am sure you will find it.

Re: Permanent Programming 11

PostPosted: Wed Jun 15, 2011 5:06 pm
by amardeep234
I just completed it in C, when I read:
Code: Select all
<h2>Congrats</h2></div><div class="light-td">Good Job, amardeep234, You have successfully completed this mission<br />

I yelled, HUZZZAAAAAH! :mrgreen:

The only shortcut I used was using libCurl, I gave up trying to write the socket code my self, I just couldn't do it. libCurl is definitely very nice, so simple to do socket programming with it and so many options :)

I don't think this a spoiler, since I'm not revealing code, simply explaining what I did (coding this will be 100x harder than what you read, though it's a guide for anyone brave enough to try this challenge in C).

I had 3 files, but 4 main things occurred (since curlHTTPrequest was used twice, using different functions):

Code: Select all
./curlHTTPRequest.o [arg] //takes INPUT arg, either GET or POST. (GET function simply GETs HTS prog11 http-page and dump it into text file, POST functions posts decoded string, along with headers etc)

./search.o // finds the STRING & SHIFT in dumped text file from curlHTTPRequest.o, clean it up & output it

./prog11-reverseAsciiShift.o [arg] //takes arguments from search.o OUTPUT (STRING/SHIFT), and does the decoding

// Then back to curlHTTPRequest, which POST the decoded string. This was the most problematic for me, and I couldn't of done it without Wireshark


I definitely learnt a lot from this.

Re: Permanent Programming 11

PostPosted: Wed Jun 22, 2011 7:31 am
by geft
I've done the code, but I'm clueless on what to do next. I'm a beginner who only knows basic C and C++, with hardly any knowledge in networking. How do I program a code which transmits data over the internet? What should I be learning first?

Re: Permanent Programming 11

PostPosted: Wed Jun 22, 2011 8:02 am
by b33tr00t
I've done the code, but I'm clueless on what to do next. I'm a beginner who only knows basic C and C++, with hardly any knowledge in networking. How do I program a code which transmits data over the internet? What should I be learning first?


Look up socket programming. One of the convenient ways is to use libcurl.

Re: Permanent Programming 11

PostPosted: Fri Apr 06, 2012 9:11 pm
by wan26
Well for me this was hard in c++, but isdigit helps if you're doing it this way. ios::trunc if you are going to be placing the cipher from the website in a file and running the program again to test. Also It helps to test using wireshark -and in placing it into a file i could see what went wrong in any formatting by comparing it to packets in the tcp stream.

It took me ages, but it was probably worth it for the other challanges

Curl helps alot,

Re: Permanent Programming 11

PostPosted: Tue Jul 10, 2012 4:34 pm
by EnterQuery
Hi guys,

This is my very first post on the forums, so I'd like to take the time to thank all the people who have put their time into making these challenges and to those who point noobs like me in the right direction. I've learned a lot in a very short time.

I originally tried to take this challenge in Java, but I kept running in to problems related to the built in URL classes as well as the HttpComponents and HttpClient classes by Apache. I just found it to cumbersome to deal with, so I decided to try it in Python. I know doing this in JavaScript is probably the easiest way, but I want to learn more about the browser/server interaction and how to manipulate it.

After spending an evening learning and putting things together in Python (compared to many nights messing with Java and still resulting in code that wouldn't even compile half the time) I think I have something that should work. The extracted string and shift are what they supposed to be and I think I apply the shift correctly. I submit it, whilst keeping in mind the safeguards, but I always get a response that my answer is wrong.

Clearly, I'm doing something wrong... Would someone be so kind to take a look at my code? It's pretty short (disregarding comments and debug code)...

Again, thanks for everything!

[EDIT]: Got it! Turns out I had the wrong idea of how to approach it. I thought that every char in the string should be converted to its ASCII code then altered with shift and then converted to a char again...

Re: Permanent Programming 11

PostPosted: Wed Jul 18, 2012 10:27 am
by ichimeno
Hello dear community! Please excuse my stupid question, but does this mission use the whole ASCII chart? What I mean by that is that does this mission use ASCII chars like 'TAB' ? Does it also use chars that have the dec value between 128-255?

EDIT: Opps, I didn't read the whole thread. I have to use the entire range :D

-- Thu Jul 19, 2012 1:47 pm --

Err sorry for the double-post but I'm having a problem uploading the answer to the website. My program is written in Java and decrypts the generated string successfully. I want to send the answer to Hack This Site using HttpClient from Apache and using POST requests but as a response from the server I get "Brute forcing is not allowed.". Wtf, I'm not bruteforcing the site in anyway :S

Did anyone encounter this problem? I hope I didn't place any spoilers :)

Thank you :)